Package ag.ion.noa.search

Examples of ag.ion.noa.search.SearchDescriptor


    if (!document.getDocumentType().equals(IDocument.WRITER))
      return null;

    ITextDocument textDocument = (ITextDocument) document;

    SearchDescriptor searchDescriptor = new SearchDescriptor(
        XMLArtefact.TAG_PATTERN);
    searchDescriptor.setIsCaseSensitive(false);
    searchDescriptor.setUseRegularExpression(true);
    ISearchResult searchResult = textDocument.getSearchService().findAll(
        searchDescriptor);

    List<IArtefactPosition> positions = new ArrayList<IArtefactPosition>();
    for (ITextRange textRange : searchResult.getTextRanges()) {
View Full Code Here


      ITextDocument textDocument = (ITextDocument)document;
      //First some text ...
      textDocument.getTextService().getText().setText("This is a text content for a search example with NOA.");
     
      //OK - now we need a search query
      SearchDescriptor searchDescriptor = new SearchDescriptor("NOA");
      searchDescriptor.setIsCaseSensitive(true);
      //Perform the search ...
      ISearchResult searchResult = textDocument.getSearchService().findFirst(searchDescriptor);
      if(!searchResult.isEmpty()) {
        //...and now select the result
        ITextRange[] textRanges = searchResult.getTextRanges();
View Full Code Here

   * @author Andreas Br�ker
   * @date 10.07.2006
   */
  protected ISearchDescriptor buildSearchDescriptor() {
    String searchContent = comboSearchContent.getText();
    SearchDescriptor searchDescriptor = new SearchDescriptor(searchContent);
    searchDescriptor.setIsCaseSensitive(buttonCaseSensitive.getSelection());
    searchDescriptor.setUseCompleteWords(buttonCompleteWords.getSelection());
    searchDescriptor.setUseRegularExpression(buttonRegularExpression.getSelection());
    searchDescriptor.setUseSimilaritySearch(buttonSimilaritySearch.getSelection());
    return searchDescriptor;
  }
View Full Code Here

TOP

Related Classes of ag.ion.noa.search.SearchDescriptor

Copyright © 2018 www.massapicom. 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.