org.openide.text.Line.removeAnnotation()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中org.openide.text.Line.removeAnnotation()方法的一些代码示例,展示了Line.removeAnnotation()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Line.removeAnnotation()方法的具体详情如下:
包路径:org.openide.text.Line
类名称:Line
方法名:removeAnnotation

Line.removeAnnotation介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.api/org-openide-text

/** Remove annotation to this Annotatable class
 * @param anno annotation which will be detached from this class  */
@Override
protected void removeAnnotation(final Annotation anno) {
  super.removeAnnotation(anno);
  final StyledDocument doc = pos.getCloneableEditorSupport().getDocument();
  // document is not opened and so no annotation is attached to it
  if (doc == null) {
    return;
  }
  pos.getCloneableEditorSupport().prepareDocument().waitFinished();
  doc.render(new Runnable() {
    public void run() {
      synchronized (getAnnotations()) {
        if (anno.isInDocument()) {
          anno.setInDocument(false);
          NbDocument.removeAnnotation(doc, anno);
        }
      }
    }
  });
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

/** Remove annotation to this Annotatable class
 * @param anno annotation which will be detached from this class  */
protected void removeAnnotation(Annotation anno) {
  super.removeAnnotation(anno);
  StyledDocument doc = pos.getCloneableEditorSupport ().getDocument ();
  
  // document is not opened and so no annotation is attached to it
  if (doc == null)
    return;
  pos.getCloneableEditorSupport().prepareDocument().waitFinished();
  if (anno.isInDocument()) {
    anno.setInDocument(false);
    NbDocument.removeAnnotation(doc, anno);
  }
}

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

/** Remove annotation to this Annotatable class
 * @param anno annotation which will be detached from this class  */
protected void removeAnnotation(Annotation anno) {
  super.removeAnnotation(anno);
  StyledDocument doc = pos.getCloneableEditorSupport ().getDocument ();
  
  // document is not opened and so no annotation is attached to it
  if (doc == null)
    return;
  pos.getCloneableEditorSupport().prepareDocument().waitFinished();
  if (anno.isInDocument()) {
    anno.setInDocument(false);
    NbDocument.removeAnnotation(doc, anno);
  }
}

相关文章