本文整理汇总了Java中org.netbeans.editor.Utilities.annotateLoggable方法的典型用法代码示例。如果您正苦于以下问题:Java Utilities.annotateLoggable方法的具体用法?Java Utilities.annotateLoggable怎么用?Java Utilities.annotateLoggable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.netbeans.editor.Utilities
的用法示例。
在下文中一共展示了Utilities.annotateLoggable方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createAndInsertNewMark
import org.netbeans.editor.Utilities; //导入方法依赖的package包/类
protected ChainDrawMark createAndInsertNewMark(int pos)
throws BadLocationException {
ChainDrawMark mark = createMark();
try {
EditorPackageAccessor.get().Mark_insert(mark, doc, pos);
} catch (InvalidMarkException e) {
Utilities.annotateLoggable(e);
}
return mark;
}
示例2: PlainTokenContext
import org.netbeans.editor.Utilities; //导入方法依赖的package包/类
private PlainTokenContext() {
super("format-"); // NOI18N
try {
addDeclaredTokenIDs();
} catch (Exception e) {
Utilities.annotateLoggable(e);
}
}
示例3: JavaLayerTokenContext
import org.netbeans.editor.Utilities; //导入方法依赖的package包/类
private JavaLayerTokenContext() {
super("java-layer-"); // NOI18N
try {
addDeclaredTokenIDs();
} catch (Exception e) {
Utilities.annotateLoggable(e);
}
}
示例4: JavaTokenContext
import org.netbeans.editor.Utilities; //导入方法依赖的package包/类
private JavaTokenContext() {
super("java-"); // NOI18N
try {
addDeclaredTokenIDs();
} catch (Exception e) {
Utilities.annotateLoggable(e);
}
}
示例5: compareMark
import org.netbeans.editor.Utilities; //导入方法依赖的package包/类
/** Tests whether the position range is partly or fully inside
* some mark block from the chain.
* @param pos compared position
* @return relation of curMark to the given position
*/
public int compareMark(int pos) {
try {
if (curMark == null) {
curMark = chain;
if (curMark == null) {
return -1; // no marks yet
}
}
int rel;
boolean after = false;
boolean before = false;
while ((rel = curMark.compare(pos)) != 0) { // just match
if (rel > 0) { // this mark after pos
if (before) {
return rel;
}
if (curMark.prev != null) {
after = true;
curMark = curMark.prev;
} else { // end of chain
return rel;
}
} else { // this mark before pos
if (after) {
return rel;
}
if (curMark.next != null) {
before = true;
curMark = curMark.next;
} else { // start of chain
return rel;
}
}
}
return 0; // match
} catch (InvalidMarkException e) {
Utilities.annotateLoggable(e);
return -1; // don't match, but what to return?
}
}