Examples of FindReplaceDocumentAdapter


Examples of org.eclipse.jface.text.FindReplaceDocumentAdapter

   * @see org.eclipse.jface.text.TextViewer#getFindReplaceDocumentAdapter()
   */
  protected FindReplaceDocumentAdapter getFindReplaceDocumentAdapter() {
    if (fFindReplaceDocumentAdapter == null) {
      IDocument document= isProjectionMode() ? getDocument() : getVisibleDocument();
      fFindReplaceDocumentAdapter= new FindReplaceDocumentAdapter(document);
    }
    return fFindReplaceDocumentAdapter;
  }
View Full Code Here

Examples of org.eclipse.jface.text.FindReplaceDocumentAdapter

              if (editorPage instanceof ITextEditor) {
                ITextEditor editorTextual = (ITextEditor) editorPage;
                IDocument document = editorTextual
                    .getDocumentProvider().getDocument(
                        editorTextual.getEditorInput());
                FindReplaceDocumentAdapter finder = new FindReplaceDocumentAdapter(
                    document);
                try {
                  IRegion region = finder.find(0,
                      markerToFind, true, true, true,
                      false);
                  editorTextual.selectAndReveal(
                      region.getOffset(),
                      region.getLength());
View Full Code Here

Examples of org.eclipse.jface.text.FindReplaceDocumentAdapter

              if (editorPage instanceof ITextEditor) {
                ITextEditor editorTextual = (ITextEditor) editorPage;
                IDocument document = editorTextual
                    .getDocumentProvider().getDocument(
                        editorTextual.getEditorInput());
                FindReplaceDocumentAdapter finder = new FindReplaceDocumentAdapter(
                    document);
                try {
                  IRegion region = finder.find(0,
                      markerToFind, true, true, true,
                      false);
                  editorTextual.selectAndReveal(
                      region.getOffset(),
                      region.getLength());
View Full Code Here

Examples of org.eclipse.jface.text.FindReplaceDocumentAdapter

      if (fCurrentState == 0) {
        if (fFirstPosition == fDocument.getLength()) {
          this.fHasNext= false;
          return;
        }
        fSearcher= new FindReplaceDocumentAdapter(fDocument);

        // unless we are at the beginning of the document, the completion boundary
        // matches one character. It is enough to move just one character backwards
        // because the boundary pattern has the (....)+ form.
        // see HippieCompletionTest#testForwardSearch().
View Full Code Here

Examples of org.eclipse.jface.text.FindReplaceDocumentAdapter

        if (fFirstPosition <= 1) {
          this.fNext= null;
          this.fHasNext= false;
          return;
        }
        fSearcher= new FindReplaceDocumentAdapter(fDocument);

        // search only at word boundaries
        fSearchPattern= COMPLETION_BOUNDARY + asRegPattern(fPrefix);

        int length= fDocument.getLength();
View Full Code Here

Examples of org.eclipse.jface.text.FindReplaceDocumentAdapter

  private List<IRegion> findAllMatches(String query, boolean isRegex, boolean caseSensitive) {
    final IDocument document = viewer.getDocument();
    if(query.isEmpty() || document == null) {
      return Collections.emptyList();
    }
    final FindReplaceDocumentAdapter search = new FindReplaceDocumentAdapter(document);
    final ArrayList<IRegion> results = new ArrayList<IRegion>();
    int offset = 0;
    while(true) {
      if(offset >= document.getLength()) {
        return results;
      }
      try {
        IRegion match = search.find(offset, query, true, caseSensitive, false, isRegex);
        if(match == null) {
          return results;
        }
        results.add(match);
        offset = match.getOffset() + match.getLength();
View Full Code Here

Examples of org.eclipse.jface.text.FindReplaceDocumentAdapter

      super.setVisibleDocument(document);
      return;
    }

    // In projection mode we don't want to throw away the find/replace document adapter
    FindReplaceDocumentAdapter adapter= fFindReplaceDocumentAdapter;
    super.setVisibleDocument(document);
    fFindReplaceDocumentAdapter= adapter;
  }
View Full Code Here

Examples of org.eclipse.jface.text.FindReplaceDocumentAdapter

   * @see org.eclipse.jface.text.TextViewer#getFindReplaceDocumentAdapter()
   */
  protected FindReplaceDocumentAdapter getFindReplaceDocumentAdapter() {
    if (fFindReplaceDocumentAdapter == null) {
      IDocument document= isProjectionMode() ? getDocument() : getVisibleDocument();
      fFindReplaceDocumentAdapter= new FindReplaceDocumentAdapter(document);
    }
    return fFindReplaceDocumentAdapter;
  }
View Full Code Here

Examples of org.eclipse.jface.text.FindReplaceDocumentAdapter

      super.setVisibleDocument(document);
      return;
    }

    // In projection mode we don't want to throw away the find/replace document adapter
    FindReplaceDocumentAdapter adapter= fFindReplaceDocumentAdapter;
    super.setVisibleDocument(document);
    fFindReplaceDocumentAdapter= adapter;
  }
View Full Code Here

Examples of org.eclipse.jface.text.FindReplaceDocumentAdapter

   * @see org.eclipse.jface.text.TextViewer#getFindReplaceDocumentAdapter()
   */
  protected FindReplaceDocumentAdapter getFindReplaceDocumentAdapter() {
    if (fFindReplaceDocumentAdapter == null) {
      IDocument document= isProjectionMode() ? getDocument() : getVisibleDocument();
      fFindReplaceDocumentAdapter= new FindReplaceDocumentAdapter(document);
    }
    return fFindReplaceDocumentAdapter;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.