1 11 package org.eclipse.jdt.internal.core.search.matching; 12 13 import java.io.IOException ; 14 15 import org.eclipse.jdt.core.search.SearchPattern; 16 import org.eclipse.jdt.internal.core.index.EntryResult; 17 import org.eclipse.jdt.internal.core.index.Index; 18 import org.eclipse.jdt.internal.core.search.indexing.IIndexConstants; 19 20 public class SecondaryTypeDeclarationPattern extends TypeDeclarationPattern { 21 22 private final static char[] SECONDARY_PATTERN_KEY = "*/S".toCharArray(); 24 public SecondaryTypeDeclarationPattern() { 25 super(null, null, null, IIndexConstants.SECONDARY_SUFFIX, R_EXACT_MATCH | R_CASE_SENSITIVE); 26 } 27 28 public SecondaryTypeDeclarationPattern(int matchRule) { 29 super(matchRule); 30 } 31 32 public SearchPattern getBlankPattern() { 33 return new SecondaryTypeDeclarationPattern(R_EXACT_MATCH | R_CASE_SENSITIVE); 34 } 35 protected StringBuffer print(StringBuffer output) { 36 output.append("Secondary"); return super.print(output); 38 } 39 40 43 EntryResult[] queryIn(Index index) throws IOException { 44 return index.query(CATEGORIES, SECONDARY_PATTERN_KEY, R_PATTERN_MATCH | R_CASE_SENSITIVE); 45 } 46 47 } 48 | Popular Tags |