本文整理汇总了Java中org.openide.ErrorManager.Annotation方法的典型用法代码示例。如果您正苦于以下问题:Java ErrorManager.Annotation方法的具体用法?Java ErrorManager.Annotation怎么用?Java ErrorManager.Annotation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openide.ErrorManager
的用法示例。
在下文中一共展示了ErrorManager.Annotation方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testSaveThrowsException
import org.openide.ErrorManager; //导入方法依赖的package包/类
public void testSaveThrowsException() throws IOException, BadLocationException, Exception {
fileObject.canWrite = true;
DES des = support();
des.open();
waitEQ();
Document doc = des.openDocument();
doc.insertString(0, "Ahoj", null);
assertTrue("Now it is modified", des.isModified());
fileObject.canWrite = false;
try {
des.saveDocument();
fail("This has to throw exception");
} catch (IOException ex) {
ErrorManager.Annotation[] ann = ErrorManager.getDefault().findAnnotations(ex);
assertNotNull("There are annotations", ann);
}
}
示例2: searchException
import org.openide.ErrorManager; //导入方法依赖的package包/类
/** This exception stoped search */
synchronized void searchException(RuntimeException ex) {
ErrorManager.Annotation[] annotations =
ErrorManager.getDefault().findAnnotations(ex);
for (ErrorManager.Annotation annotation : annotations) {
if (annotation.getSeverity() == ErrorManager.USER) {
finishMessage = annotation.getLocalizedMessage();
if (finishMessage != null) return;
}
}
finishMessage = ex.getLocalizedMessage();
}
示例3: attachAnnotations
import org.openide.ErrorManager; //导入方法依赖的package包/类
public Throwable attachAnnotations(Throwable t, ErrorManager.Annotation[] arr) {
return null;
}
示例4: findAnnotations
import org.openide.ErrorManager; //导入方法依赖的package包/类
public ErrorManager.Annotation[] findAnnotations(Throwable t) {
return null;
}
示例5: attachAnnotations
import org.openide.ErrorManager; //导入方法依赖的package包/类
public Throwable attachAnnotations (Throwable t, ErrorManager.Annotation[] arr) {
return t;
}
示例6: findAnnotations
import org.openide.ErrorManager; //导入方法依赖的package包/类
public ErrorManager.Annotation[] findAnnotations (Throwable t) {
return null;
}