예제 #1
0
  public void searchForCompletion(
      Object selectedNode,
      String mathingString,
      String forceBeforeText,
      String forceEndText,
      IFile file,
      IXMLReferenceTo referenceTo,
      IContentAssistProposalRecorder recorder) {

    PoshiNodeAssisitCollectorForXML collector =
        new PoshiNodeAssisitCollectorForXML(
            forceBeforeText, forceEndText, (IXMLReferenceToXML) referenceTo, recorder);

    if (mathingString.contains("#")) {
      mathingString =
          mathingString.substring(mathingString.indexOf("#") + 1, mathingString.length());
    }

    XMLSearcherForXMLUtils.search(selectedNode, mathingString, file, referenceTo, collector, true);
  }
예제 #2
0
  public void searchForHyperlink(
      Object selectedNode,
      int offset,
      String mathingString,
      int startOffset,
      int endOffset,
      IFile file,
      IXMLReferenceTo referenceTo,
      IRegion hyperlinkRegion,
      List<IHyperlink> hyperLinks,
      ITextEditor textEditor) {
    HyperlinkCollectorForXML collector =
        new HyperlinkCollectorForXML(hyperlinkRegion, hyperLinks, startOffset, endOffset);

    if (mathingString.contains("#")) {
      mathingString =
          mathingString.substring(mathingString.indexOf("#") + 1, mathingString.length());
    }

    XMLSearcherForXMLUtils.search(selectedNode, mathingString, file, referenceTo, collector, false);
  }