本文整理了Java中org.eclipse.core.runtime.Status.getCode()
方法的一些代码示例,展示了Status.getCode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Status.getCode()
方法的具体详情如下:
包路径:org.eclipse.core.runtime.Status
类名称:Status
方法名:getCode
暂无
代码示例来源:origin: org.eclipse.core/runtime
/**
* Logs performance event failures to the platform's performance log
*/
private void logFailure(PerformanceStats stats, String pluginId, long elapsed) {
//may have failed to get the performance log service
if (log == null)
return;
if (pluginId == null)
pluginId = Platform.PI_RUNTIME;
String msg = "Performance failure: " + stats.getEvent() + " blame: " + stats.getBlameString() + " context: " + stats.getContext() + " duration: " + elapsed; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
Status status = new Status(IStatus.WARNING, pluginId, 1, msg, new RuntimeException());
log.log(new FrameworkLogEntry(status, status.getPlugin(), status.getSeverity(), status.getCode(), status.getMessage(), 0, status.getException(), null));
}
代码示例来源:origin: stackoverflow.com
public class ResponseImpl implements Response {
private HttpServletResponse response;
public ResponseImpl(HttpServletResponse response, Status status) {
this.response = response;
this.response.setStatus(status.getCode());
}
public OutputStream getOutputStream() {
return response.getOutputStream();
}
// ...
}
代码示例来源:origin: stackoverflow.com
@Entity
public class Project {
private Long id;
private int statusCode;
@Id @GeneratedValue
public Long getId() {
return this.id;
}
private void setId(Long id) {
this.id = id;
}
@Transient
public Status getStatus () {
return Status.parse(this.statusCode);
}
public void setStatus(Status status) {
this.statusCode = status.getCode();
}
protected int getStatusCode() {
return statusCode;
}
protected void setStatusCode(int statusCode) {
this.statusCode = statusCode;
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.core.runtime
/**
* Logs performance event failures to the platform's performance log
*/
private void logFailure(PerformanceStats stats, String pluginId, long elapsed) {
//may have failed to get the performance log service
if (log == null)
return;
if (pluginId == null)
pluginId = Platform.PI_RUNTIME;
String msg = "Performance failure: " + stats.getEvent() + " blame: " + stats.getBlameString() + " context: " + stats.getContext() + " duration: " + elapsed; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
Status status = new Status(IStatus.WARNING, pluginId, 1, msg, new RuntimeException());
log.log(new FrameworkLogEntry(status, status.getPlugin(), status.getSeverity(), status.getCode(), status.getMessage(), 0, status.getException(), null));
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.core.runtime
/**
* Logs performance event failures to the platform's performance log
*/
private void logFailure(PerformanceStats stats, String pluginId, long elapsed) {
//may have failed to get the performance log service
if (log == null)
return;
if (pluginId == null)
pluginId = Platform.PI_RUNTIME;
String msg = "Performance failure: " + stats.getEvent() + " blame: " + stats.getBlameString() + " context: " + stats.getContext() + " duration: " + elapsed; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
Status status = new Status(IStatus.WARNING, pluginId, 1, msg, new RuntimeException());
log.log(new FrameworkLogEntry(status, status.getPlugin(), status.getSeverity(), status.getCode(), status.getMessage(), 0, status.getException(), null));
}
内容来源于网络,如有侵权,请联系作者删除!