gpt4 book ai didi

org.netbeans.modules.web.common.api.WebUtils.getResultIterator()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 20:45:05 26 4
gpt4 key购买 nike

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

WebUtils.getResultIterator介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-jsf

@Override
  public void run(ResultIterator resultIterator) throws Exception {
    ResultIterator htmlRi = WebUtils.getResultIterator(resultIterator, "text/html"); //NOI18N
    if (htmlRi != null) {
      Parser.Result pr = htmlRi.getParserResult();
      if (pr instanceof HtmlParsingResult) {
        result.set((HtmlParsingResult) pr);
      }
    }
  }
});

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-css-prep

@Override
  public void run(ResultIterator resultIterator) throws Exception {
    ResultIterator cssRI = WebUtils.getResultIterator(resultIterator, "text/css");
    if (cssRI != null) {
      CssParserResult result = (CssParserResult) cssRI.getParserResult();
      if (result != null) {
        model_ref.set(CPModel.getModel(result));
      }
    }
  }
});

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-inspect

@Override
  public void run(ResultIterator resultIterator) throws Exception {
    ResultIterator ri = WebUtils.getResultIterator(resultIterator, "text/html"); // NOI18N
    if (ri != null) {
      Parser.Result result = ri.getParserResult();
      delegate.setContext(file);
      org.netbeans.modules.html.editor.lib.api.elements.Node sourceNode =
          sourceElementHandle.resolve(result);
      if (sourceNode != null) {
        delegate.setHtmlSourceElementHandle((OpenTag)sourceNode, result.getSnapshot(), file);
        RP.post(new Runnable() {
          @Override
          public void run() {
            delegate.actionPerformed(null);
          }
        });
      }
    }
  }
});

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-inspect

@Override
public void run(ResultIterator resultIterator) throws Exception {
  ResultIterator htmlResultIterator = WebUtils.getResultIterator(resultIterator, "text/html"); // NOI18N
  final int offsetToShow;
  if (htmlResultIterator == null) {
    offsetToShow = 0;
  } else {
    HtmlParsingResult result = (HtmlParsingResult)htmlResultIterator.getParserResult();
    Node nodeToShow = Utilities.findNode(result, node);
    Snapshot snapshot = htmlResultIterator.getSnapshot();
    int snapshotOffset = nodeToShow.from();
    offsetToShow = snapshot.getOriginalOffset(snapshotOffset);
  }
  EventQueue.invokeLater(new Runnable() {
    @Override
    public void run() {
      CSSUtils.openAtOffset(fob, offsetToShow);
    }
  });
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-css-prep

@Override
public void run(ResultIterator ri) throws ParseException {
  ResultIterator cssri = WebUtils.getResultIterator(ri, "text/css");
  if (cssri != null) {
    CssParserResult result = (CssParserResult) cssri.getParserResult();
    if (result.getParseTree() != null) {
      //the parser result seems to be quite ok,
      //in case of serious parse issue the parse root is null
      RefactoringElementContext context = new RefactoringElementContext(result, caretOffset, selectionStart, selectionEnd);
      ui = context.isRefactoringAllowed() ? createRefactoringUI(context) : null;
    }
  }
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com