本文整理了Java中org.dadacoalition.yedit.YEditLog.logException()
方法的一些代码示例,展示了YEditLog.logException()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YEditLog.logException()
方法的具体详情如下:
包路径:org.dadacoalition.yedit.YEditLog
类名称:YEditLog
方法名:logException
暂无
代码示例来源:origin: oyse/yedit
public static void logException( Throwable exception ){
logException( exception, "Unexpected exception: " );
}
代码示例来源:origin: RepreZen/KaiZen-OpenAPI-Editor
@Override
public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
try {
return doRunInWorkspace(monitor);
} catch (CoreException e) {
return e.getStatus();
} catch (OperationCanceledException e) {
return Status.CANCEL_STATUS;
} catch (Exception e) {
// in case of an exception the Worker treats it with
// an ERROR status in org.eclipse.core.internal.jobs.Worker.handleException(InternalJob, Throwable)
// and shows a modal dialog by WorkbenchStatusDialogManagerImpl
YEditLog.logException(e);
return Status.CANCEL_STATUS;
} finally {
monitor.done();
}
}
代码示例来源:origin: RepreZen/KaiZen-OpenAPI-Editor
protected static void clearMarkers(IFile file) {
int depth = IResource.DEPTH_INFINITE;
try {
file.deleteMarkers(IMarker.PROBLEM, true, depth);
} catch (CoreException e) {
YEditLog.logException(e);
YEditLog.logger.warning("Failed to delete markers:\n" + e.toString());
}
}
代码示例来源:origin: oyse/yedit
private String getTokenString(IDocument document){
try {
return document.get(scanner.getTokenOffset(), scanner.getTokenLength());
} catch (BadLocationException e) {
YEditLog.logException(e, "Finding todo tag failed" );
return "";
}
}
代码示例来源:origin: RepreZen/KaiZen-OpenAPI-Editor
public Set<SwaggerError> validate(JsonDocument document) {
final ErrorProcessor processor = new ErrorProcessor(document.getYaml(), schema);
final Set<SwaggerError> errors = new HashSet<>();
JsonSchema jsonSchema = null;
try {
jsonSchema = factory.getJsonSchema(schema);
} catch (ProcessingException e) {
YEditLog.logException(e);
return errors;
}
try {
errors.addAll(processor.processReport(jsonSchema.validate(document.asJson(), true)));
} catch (ProcessingException e) {
errors.addAll(processor.processMessage(e.getProcessingMessage()));
}
return errors;
}
代码示例来源:origin: oyse/yedit
public TemplateStore getTemplateStore() {
if (templateStore == null) {
templateStore = new ContributionTemplateStore(getContextTypeRegistry(), getDefault().getPreferenceStore(), TEMPLATE_STORE_ID);
try {
templateStore.load();
} catch (IOException e) {
YEditLog.logException(e);
}
}
return templateStore;
}
代码示例来源:origin: oyse/yedit
private TaskTag constructTodoTag(String tokenString, IDocument document) {
int lineNumber = 1;
try {
lineNumber = document.getLineOfOffset(scanner.getTokenOffset()) + 1;
} catch (BadLocationException e) {
YEditLog.logException(e, "Failed to get the correct line number" );
}
TaskTagPreference ttp = getFoundTagType(tokenString);
String message = getTodoTagMessage(tokenString, ttp.tag);
return new TaskTag(ttp.tag, ttp.severity, lineNumber, message);
}
代码示例来源:origin: RepreZen/KaiZen-OpenAPI-Editor
static IMarker addMarker(SwaggerError error, IFile target, IDocument document) {
IMarker marker = null;
try {
marker = target.createMarker(IMarker.PROBLEM);
marker.setAttribute(IMarker.SEVERITY, error.getLevel());
marker.setAttribute(IMarker.MESSAGE, error.getMessage());
marker.setAttribute(IMarker.LINE_NUMBER, error.getLine());
} catch (CoreException e) {
YEditLog.logException(e);
YEditLog.logger.warning("Failed to create marker for syntax error: \n" + e.toString());
}
return marker;
}
代码示例来源:origin: oyse/yedit
public void dispose() {
try {
colorManager.dispose();
if (idleTimer != null) {
idleTimer.dispose();
}
Activator.getDefault().getPreferenceStore().removePropertyChangeListener(propertyChangeListener);
super.dispose();
} catch (InterruptedException e) {
YEditLog.logException(e);
}
}
代码示例来源:origin: oyse/yedit
YEditLog.logException(e, "Failure during doubleclick action");
代码示例来源:origin: oyse/yedit
file.deleteMarkers(IMarker.PROBLEM, true, depth);
} catch (CoreException e) {
YEditLog.logException(e);
YEditLog.logger.warning("Failed to delete markers:\n" + e.toString() );
YEditLog.logException(e);
YEditLog.logger.warning("Failed to create marker for syntax error: \n" + e.toString() );
代码示例来源:origin: oyse/yedit
@Override
public IRegion getDamageRegion(ITypedRegion partition, DocumentEvent e, boolean documentPartitioningChanged){
IRegion damagedRegion = null;
try {
IDocument doc = e.getDocument();
IRegion damagedLine = doc.getLineInformationOfOffset(e.getOffset());
// the damaged line is too long so calculate a smaller region to damage instead of the
// whole line.
if(damagedLine.getLength() > MAX_COMPLETE_LINE_DAMAGE ){
damagedRegion = calculateRegionToDamage(e.getOffset(), doc);
} else {
damagedRegion = super.getDamageRegion(partition, e, documentPartitioningChanged);
}
} catch (BadLocationException ex) {
YEditLog.logException(ex, "Failed to get the region for a document change.");
}
return damagedRegion;
}
代码示例来源:origin: oyse/yedit
file.deleteMarkers(IMarker.TASK, true, depth);
} catch (CoreException e) {
YEditLog.logException(e);
YEditLog.logger.warning("Failed to delete task markers:\n" + e.toString() );
YEditLog.logException(e);
代码示例来源:origin: oyse/yedit
YEditLog.logException(e, "Replacing special chars in unquoted scalars failed" );
内容来源于网络,如有侵权,请联系作者删除!