Eclipse CDT
Pre-release 3.0

org.eclipse.cdt.core.search
Class OrPattern

java.lang.Object
  extended by org.eclipse.cdt.internal.core.search.matching.CSearchPattern
      extended by org.eclipse.cdt.core.search.OrPattern
All Implemented Interfaces:
ICSearchConstants, ICSearchPattern

public class OrPattern
extends org.eclipse.cdt.internal.core.search.matching.CSearchPattern


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.cdt.internal.core.search.matching.CSearchPattern
org.eclipse.cdt.internal.core.search.matching.CSearchPattern.Requestor
 
Field Summary
 
Fields inherited from class org.eclipse.cdt.internal.core.search.matching.CSearchPattern
_caseSensitive, _limitTo, _matchMode, ACCURATE_MATCH, fSearchForValues, IMPOSSIBLE_MATCH, INACCURATE_MATCH, POSSIBLE_MATCH
 
Constructor Summary
OrPattern()
           
 
Method Summary
 void addPattern(ICSearchPattern pattern)
           
 boolean canAccept(ICSearchConstants.LimitTo limit)
           
protected  void decodeIndexEntry(IEntryResult entryResult)
          Decodes the index entry
 void feedIndexRequestor(org.eclipse.cdt.internal.core.search.IIndexSearchRequestor requestor, int detailLevel, int[] fileRefs, int[][] offsets, int[][] offsetLengths, IndexInput input, ICSearchScope scope)
          Feed the requestor according to the current search pattern
 void findIndexMatches(IndexInput input, org.eclipse.cdt.internal.core.search.IIndexSearchRequestor requestor, int detailLevel, IProgressMonitor progressMonitor, ICSearchScope scope)
          Query a given index for matching entries.
 char[] indexEntryPrefix()
          Answers the suitable prefix that should be used in order to query indexes for the corresponding item.
protected  boolean matchIndexEntry()
          Checks whether an entry matches the current search pattern
 int matchLevel(org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate node, ICSearchConstants.LimitTo limit)
           
protected  void resetIndexInfo()
          Called to reset any variables used in the decoding of index entries, this ensures that the matchIndexEntry is not polluted by index info from previous entries.
 
Methods inherited from class org.eclipse.cdt.internal.core.search.matching.CSearchPattern
createPattern, createScanner, createScanner, getLimitTo, getMatchLocatable, matchesName, matchQualifications, matchQualifications, parse, parse, scanForParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrPattern

public OrPattern()
Method Detail

addPattern

public void addPattern(ICSearchPattern pattern)
Parameters:
pattern -

matchLevel

public int matchLevel(org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate node,
                      ICSearchConstants.LimitTo limit)
Returns:

canAccept

public boolean canAccept(ICSearchConstants.LimitTo limit)
Specified by:
canAccept in interface ICSearchPattern
Overrides:
canAccept in class org.eclipse.cdt.internal.core.search.matching.CSearchPattern

findIndexMatches

public void findIndexMatches(IndexInput input,
                             org.eclipse.cdt.internal.core.search.IIndexSearchRequestor requestor,
                             int detailLevel,
                             IProgressMonitor progressMonitor,
                             ICSearchScope scope)
                      throws IOException
Description copied from class: org.eclipse.cdt.internal.core.search.matching.CSearchPattern
Query a given index for matching entries.

Overrides:
findIndexMatches in class org.eclipse.cdt.internal.core.search.matching.CSearchPattern
Throws:
IOException

feedIndexRequestor

public void feedIndexRequestor(org.eclipse.cdt.internal.core.search.IIndexSearchRequestor requestor,
                               int detailLevel,
                               int[] fileRefs,
                               int[][] offsets,
                               int[][] offsetLengths,
                               IndexInput input,
                               ICSearchScope scope)
                        throws IOException
Description copied from class: org.eclipse.cdt.internal.core.search.matching.CSearchPattern
Feed the requestor according to the current search pattern

Specified by:
feedIndexRequestor in class org.eclipse.cdt.internal.core.search.matching.CSearchPattern
Throws:
IOException

resetIndexInfo

protected void resetIndexInfo()
Description copied from class: org.eclipse.cdt.internal.core.search.matching.CSearchPattern
Called to reset any variables used in the decoding of index entries, this ensures that the matchIndexEntry is not polluted by index info from previous entries.

Specified by:
resetIndexInfo in class org.eclipse.cdt.internal.core.search.matching.CSearchPattern

decodeIndexEntry

protected void decodeIndexEntry(IEntryResult entryResult)
Description copied from class: org.eclipse.cdt.internal.core.search.matching.CSearchPattern
Decodes the index entry

Specified by:
decodeIndexEntry in class org.eclipse.cdt.internal.core.search.matching.CSearchPattern

indexEntryPrefix

public char[] indexEntryPrefix()
Description copied from class: org.eclipse.cdt.internal.core.search.matching.CSearchPattern
Answers the suitable prefix that should be used in order to query indexes for the corresponding item. The more accurate the prefix and the less false hits will have to be eliminated later on.

Specified by:
indexEntryPrefix in class org.eclipse.cdt.internal.core.search.matching.CSearchPattern

matchIndexEntry

protected boolean matchIndexEntry()
Description copied from class: org.eclipse.cdt.internal.core.search.matching.CSearchPattern
Checks whether an entry matches the current search pattern

Specified by:
matchIndexEntry in class org.eclipse.cdt.internal.core.search.matching.CSearchPattern

Eclipse CDT
Pre-release 3.0

Copyright (c) IBM Corp. and others 2004. All Rights Reserved.