diff --git a/core/org.eclipse.cdt.core.tests/search/org/eclipse/cdt/core/search/tests/OtherPatternTests.java b/core/org.eclipse.cdt.core.tests/search/org/eclipse/cdt/core/search/tests/OtherPatternTests.java index c2d49aa10bb..7cc212ff924 100644 --- a/core/org.eclipse.cdt.core.tests/search/org/eclipse/cdt/core/search/tests/OtherPatternTests.java +++ b/core/org.eclipse.cdt.core.tests/search/org/eclipse/cdt/core/search/tests/OtherPatternTests.java @@ -339,7 +339,9 @@ public class OtherPatternTests extends BaseSearchTest { resultCollector.aboutToStart(); ArrayList matchesList = new ArrayList(); - MatchLocator matchLocator = new MatchLocator( pattern, resultCollector, scope, monitor ); + MatchLocator matchLocator = new MatchLocator( pattern, resultCollector, scope); + matchLocator.setProgressMonitor(monitor); + try { matchLocator.locateMatches( new String [] { path }, workspace, null, matchesList); } catch (InterruptedException e1) { diff --git a/core/org.eclipse.cdt.core/index/ChangeLog b/core/org.eclipse.cdt.core/index/ChangeLog index b7c4b368181..e1e2de21a1b 100644 --- a/core/org.eclipse.cdt.core/index/ChangeLog +++ b/core/org.eclipse.cdt.core/index/ChangeLog @@ -1,3 +1,8 @@ +2004-05-06 Bogdan Gheorghe + Modified AbstractIndexer to encode friends, add friends constant to IIndexConstants, + modified SourceIndexerRequestor to add class specifier on exit instead of enter in order + to be able to encode friends. + 2004-05-05 Bogdan Gheorghe Added code to load and store index enablement setting from a project's descriptor diff --git a/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java b/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java index 3076a6959c7..12bd935f07d 100644 --- a/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java +++ b/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java @@ -18,6 +18,7 @@ import org.eclipse.cdt.core.parser.ast.ASTClassKind; import org.eclipse.cdt.core.parser.ast.ASTNotImplementedException; import org.eclipse.cdt.core.parser.ast.IASTBaseSpecifier; import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier; +import org.eclipse.cdt.core.parser.ast.IASTDeclaration; import org.eclipse.cdt.core.parser.ast.IASTElaboratedTypeSpecifier; import org.eclipse.cdt.core.parser.ast.IASTEnumerationSpecifier; import org.eclipse.cdt.core.parser.ast.IASTEnumerator; @@ -48,6 +49,7 @@ public abstract class AbstractIndexer implements IIndexer, IIndexConstants, ICSe final static int VAR = 5; final static int TYPEDEF = 6; final static int DERIVED = 7; + final static int FRIEND = 8; public static boolean VERBOSE = false; @@ -64,9 +66,9 @@ public abstract class AbstractIndexer implements IIndexer, IIndexConstants, ICSe if (classSpecification.getClassKind().equals(ASTClassKind.CLASS)) { //Get base clauses - Iterator i = classSpecification.getBaseClauses(); - while (i.hasNext()){ - IASTBaseSpecifier baseSpec = (IASTBaseSpecifier) i.next(); + Iterator baseClauses = classSpecification.getBaseClauses(); + while (baseClauses.hasNext()){ + IASTBaseSpecifier baseSpec = (IASTBaseSpecifier) baseClauses.next(); try { IASTTypeSpecifier typeSpec = baseSpec.getParentClassSpecifier(); if (typeSpec instanceof IASTClassSpecifier){ @@ -77,6 +79,24 @@ public abstract class AbstractIndexer implements IIndexer, IIndexConstants, ICSe } catch (ASTNotImplementedException e) {} } + //Get friends + Iterator friends = classSpecification.getFriends(); + while (friends.hasNext()){ + Object decl = friends.next(); + if (decl instanceof IASTClassSpecifier){ + IASTClassSpecifier friendClassSpec = (IASTClassSpecifier) decl; + String[] baseFullyQualifiedName = friendClassSpec.getFullyQualifiedName(); + this.output.addRef(encodeTypeEntry(baseFullyQualifiedName,FRIEND,ICSearchConstants.DECLARATIONS)); + } + else if (decl instanceof IASTFunction){ + + } + else if (decl instanceof IASTMethod){ + // + } + + } + this.output.addRef(encodeTypeEntry(classSpecification.getFullyQualifiedName(),CLASS, ICSearchConstants.DECLARATIONS)); } else if (classSpecification.getClassKind().equals(ASTClassKind.STRUCT)) @@ -315,6 +335,11 @@ public abstract class AbstractIndexer implements IIndexer, IIndexConstants, ICSe case(DERIVED): result[pos++]= DERIVED_SUFFIX; + break; + + case(FRIEND): + result[pos++]=FRIEND_SUFFIX; + break; } result[pos++] = SEPARATOR; //Encode in the following manner @@ -428,6 +453,8 @@ public abstract class AbstractIndexer implements IIndexer, IIndexConstants, ICSe classType = TYPEDEF_SUFFIX; } else if ( searchFor == ICSearchConstants.DERIVED){ classType = DERIVED_SUFFIX; + } else if ( searchFor == ICSearchConstants.FRIEND){ + classType = FRIEND_SUFFIX; } else { //could be TYPE or CLASS_STRUCT, best we can do for these is the prefix return prefix; diff --git a/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/search/indexing/IIndexConstants.java b/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/search/indexing/IIndexConstants.java index 46494a11df1..3619caab228 100644 --- a/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/search/indexing/IIndexConstants.java +++ b/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/search/indexing/IIndexConstants.java @@ -104,6 +104,7 @@ public interface IIndexConstants { char UNION_SUFFIX = 'U'; char TYPEDEF_SUFFIX = 'T'; char DERIVED_SUFFIX = 'D'; + char FRIEND_SUFFIX = 'F'; char TYPE_SUFFIX = 0; char SEPARATOR= '/'; diff --git a/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexerRequestor.java b/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexerRequestor.java index e7feee5eab1..aaf2db0ac96 100644 --- a/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexerRequestor.java +++ b/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexerRequestor.java @@ -258,7 +258,6 @@ public class SourceIndexerRequestor implements ISourceElementRequestor, IIndexCo // TODO Auto-generated method stub //System.out.println("New class spec: " + classSpecification.getName()); - indexer.addClassSpecifier(classSpecification); //System.out.println("enterClassSpecifier"); } @@ -383,6 +382,7 @@ public class SourceIndexerRequestor implements ISourceElementRequestor, IIndexCo */ public void exitClassSpecifier(IASTClassSpecifier classSpecification) { // TODO Auto-generated method stub + indexer.addClassSpecifier(classSpecification); //System.out.println("exitClassSpecifier"); } diff --git a/core/org.eclipse.cdt.core/search/ChangeLog b/core/org.eclipse.cdt.core/search/ChangeLog index e71410d792e..8490ec656df 100644 --- a/core/org.eclipse.cdt.core/search/ChangeLog +++ b/core/org.eclipse.cdt.core/search/ChangeLog @@ -1,3 +1,10 @@ +2004-05-06 Bogdan Gheorghe + Added friend to ICSearchConstants + Created IMatchLocator to allow search users to pass in their own match locators + Modified CSearchPattern to create friend search pattern + Added Friend pattern + Modified MatchLocator to check for class specifiers upon class exit + 2004-04-19 Andrew Niefer speed up BasicSearchMatch.compareTo and .hashCode by reducing number of string objects created. diff --git a/core/org.eclipse.cdt.core/search/org/eclipse/cdt/core/search/ICSearchConstants.java b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/core/search/ICSearchConstants.java index 1b14cb48d78..bf5cafbd041 100644 --- a/core/org.eclipse.cdt.core/search/org/eclipse/cdt/core/search/ICSearchConstants.java +++ b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/core/search/ICSearchConstants.java @@ -105,6 +105,8 @@ public interface ICSearchConstants { public static final SearchFor ENUMTOR = new SearchFor( 15 ); + public static final SearchFor FRIEND = new SearchFor( 16 ); + /* Nature of match */ /** diff --git a/core/org.eclipse.cdt.core/search/org/eclipse/cdt/core/search/IMatchLocator.java b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/core/search/IMatchLocator.java new file mode 100644 index 00000000000..adedcc246e4 --- /dev/null +++ b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/core/search/IMatchLocator.java @@ -0,0 +1,29 @@ +/* + * Created on Apr 29, 2004 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ +package org.eclipse.cdt.core.search; + +import java.util.ArrayList; +import org.eclipse.cdt.core.model.IWorkingCopy; +import org.eclipse.cdt.core.parser.ISourceElementRequestor; +import org.eclipse.core.resources.IWorkspace; +import org.eclipse.core.runtime.IProgressMonitor; + +/** + * @author bgheorgh + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ +public interface IMatchLocator + extends + ISourceElementRequestor, + ICSearchConstants { + + public void locateMatches( String [] paths, IWorkspace workspace, IWorkingCopy[] workingCopies,ArrayList matches ) throws InterruptedException; + + public void setProgressMonitor(IProgressMonitor progressMonitor); +} diff --git a/core/org.eclipse.cdt.core/search/org/eclipse/cdt/core/search/SearchEngine.java b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/core/search/SearchEngine.java index f8da889f1d3..d2acb3c6fce 100644 --- a/core/org.eclipse.cdt.core/search/org/eclipse/cdt/core/search/SearchEngine.java +++ b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/core/search/SearchEngine.java @@ -147,13 +147,21 @@ public class SearchEngine implements ICSearchConstants{ return CSearchPattern.createPattern( stringPattern, searchFor, limitTo, mode, isCaseSensitive ); } + + public void search(IWorkspace workspace, ICSearchPattern pattern, ICSearchScope scope, ICSearchResultCollector collector, boolean excludeLocalDeclarations) throws InterruptedException { + + MatchLocator matchLocator = new MatchLocator(pattern,collector,scope); + matchLocator.setShouldExcludeLocalDeclarations(excludeLocalDeclarations); + + search(workspace, pattern, scope, collector, excludeLocalDeclarations, matchLocator); + } /** * @param _workspace * @param pattern * @param _scope * @param _collector */ - public void search(IWorkspace workspace, ICSearchPattern pattern, ICSearchScope scope, ICSearchResultCollector collector, boolean excludeLocalDeclarations) throws InterruptedException { + public void search(IWorkspace workspace, ICSearchPattern pattern, ICSearchScope scope, ICSearchResultCollector collector, boolean excludeLocalDeclarations, IMatchLocator matchLocator) throws InterruptedException { if( VERBOSE ) { System.out.println("Searching for " + pattern + " in " + scope); //$NON-NLS-1$//$NON-NLS-2$ } @@ -192,9 +200,8 @@ public class SearchEngine implements ICSearchConstants{ null ); subMonitor = (progressMonitor == null ) ? null : new SubProgressMonitor( progressMonitor, 95 ); - - MatchLocator matchLocator = new MatchLocator( pattern, collector, scope, subMonitor ); - matchLocator.setShouldExcludeLocalDeclarations( excludeLocalDeclarations ); + + matchLocator.setProgressMonitor(subMonitor); if( progressMonitor != null && progressMonitor.isCanceled() ) throw new InterruptedException(); diff --git a/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java index c4034fd9da8..2f8792d4f83 100644 --- a/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java +++ b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java @@ -114,12 +114,15 @@ public abstract class CSearchPattern implements ICSearchConstants, ICSearchPatte CSearchPattern pattern = null; if( searchFor == TYPE || searchFor == CLASS || searchFor == STRUCT || searchFor == ENUM || searchFor == UNION || searchFor == CLASS_STRUCT || - searchFor == TYPEDEF ) + searchFor == TYPEDEF ) { pattern = createClassPattern( patternString, searchFor, limitTo, matchMode, caseSensitive ); } else if ( searchFor == DERIVED){ pattern = createDerivedPattern(patternString, searchFor, limitTo, matchMode, caseSensitive ); - } else if ( searchFor == METHOD || searchFor == FUNCTION ){ + } else if ( searchFor == FRIEND){ + pattern = createFriendPattern(patternString, searchFor, limitTo, matchMode, caseSensitive ); + } + else if ( searchFor == METHOD || searchFor == FUNCTION ){ pattern = createMethodPattern( patternString, searchFor, limitTo, matchMode, caseSensitive ); } else if ( searchFor == FIELD || searchFor == VAR || searchFor == ENUMTOR){ pattern = createFieldPattern( patternString, searchFor, limitTo, matchMode, caseSensitive ); @@ -424,6 +427,32 @@ public abstract class CSearchPattern implements ICSearchConstants, ICSearchPatte return new DerivedTypesPattern( name, (char[][])list.toArray( qualifications ), searchFor, limitTo, matchMode, caseSensitive ); } + + private static CSearchPattern createFriendPattern(String patternString, SearchFor searchFor, LimitTo limitTo, int matchMode, boolean caseSensitive) { + + + IScanner scanner =null; + try { + scanner = + ParserFactory.createScanner( + new StringReader(patternString), + "TEXT", //$NON-NLS-1$ + new ScannerInfo(), + ParserMode.QUICK_PARSE, + ParserLanguage.CPP, + callback, nullLog, null); + } catch (ParserFactoryError e1) { + } + + searchFor = FRIEND; + + LinkedList list = scanForNames( scanner, null ); + + char[] name = (char [])list.removeLast(); + char [][] qualifications = new char[0][]; + + return new FriendPattern( name, (char[][])list.toArray( qualifications ), searchFor, limitTo, matchMode, caseSensitive ); + } /** * @param scanner * @param object diff --git a/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/FriendPattern.java b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/FriendPattern.java new file mode 100644 index 00000000000..3fc6798ddac --- /dev/null +++ b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/FriendPattern.java @@ -0,0 +1,105 @@ +/* + * Created on May 5, 2004 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ +package org.eclipse.cdt.internal.core.search.matching; + + +import java.util.Iterator; +import org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate; +import org.eclipse.cdt.core.parser.ast.ASTNotImplementedException; +import org.eclipse.cdt.core.parser.ast.IASTBaseSpecifier; +import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier; +import org.eclipse.cdt.core.parser.ast.IASTTypeSpecifier; +import org.eclipse.cdt.internal.core.search.indexing.AbstractIndexer; + +/** + * @author bgheorgh + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ +public class FriendPattern extends ClassDeclarationPattern { + + /** + * @param name + * @param containers + * @param searchFor + * @param limit + * @param mode + * @param caseSensitive + */ + public FriendPattern(char[] name, char[][] containers, SearchFor searchFor, LimitTo limit, int mode, boolean caseSensitive) { + super(name, containers, searchFor, limit, mode, caseSensitive); + } + + public char[] indexEntryPrefix() { + return AbstractIndexer.bestTypePrefix( + searchFor, + getLimitTo(), + simpleName, + qualifications, + _matchMode, + _caseSensitive + ); + } + + protected boolean matchIndexEntry() { + if( decodedType != FRIEND_SUFFIX ){ + return false; + } + + return super.matchIndexEntry(); + } + + public int matchLevel( ISourceElementCallbackDelegate node, LimitTo limit ){ + + if (!( node instanceof IASTClassSpecifier )) { + return IMPOSSIBLE_MATCH; + } + + if( ! canAccept( limit ) ) + return IMPOSSIBLE_MATCH; + + IASTClassSpecifier tempNode = (IASTClassSpecifier) node; + Iterator i = tempNode.getFriends(); + + boolean matchFlag=false; + + while (i.hasNext()){ + Object friend = i.next(); + if (friend instanceof IASTClassSpecifier) + { + IASTClassSpecifier classSpec = (IASTClassSpecifier) friend; + String[] baseFullyQualifiedName = classSpec.getFullyQualifiedName(); + + //check name, if simpleName == null, its treated the same as "*" + if( simpleName != null && !matchesName( simpleName, classSpec.getName().toCharArray() ) ){ + continue; + } + + + char [][] qualName = new char [ baseFullyQualifiedName.length - 1 ][]; + for( int j = 0; j < baseFullyQualifiedName.length - 1; j++ ){ + qualName[j] = baseFullyQualifiedName[j].toCharArray(); + } + //check containing scopes + if( !matchQualifications( qualifications, qualName ) ){ + continue; + } + + matchFlag = true; + break; + } + } + + + + if (matchFlag) + return ACCURATE_MATCH; + + return IMPOSSIBLE_MATCH; + } +} diff --git a/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/MatchLocator.java b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/MatchLocator.java index 72b863d72d9..dbf7f836762 100644 --- a/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/MatchLocator.java +++ b/core/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/MatchLocator.java @@ -23,7 +23,6 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; - import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.model.CoreModel; import org.eclipse.cdt.core.model.IWorkingCopy; @@ -34,15 +33,16 @@ import org.eclipse.cdt.core.parser.IScanner; import org.eclipse.cdt.core.parser.IScannerInfo; import org.eclipse.cdt.core.parser.IScannerInfoProvider; import org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate; -import org.eclipse.cdt.core.parser.ISourceElementRequestor; import org.eclipse.cdt.core.parser.ParserFactory; import org.eclipse.cdt.core.parser.ParserFactoryError; import org.eclipse.cdt.core.parser.ParserLanguage; import org.eclipse.cdt.core.parser.ParserMode; import org.eclipse.cdt.core.parser.ParserUtil; import org.eclipse.cdt.core.parser.ScannerInfo; +import org.eclipse.cdt.core.parser.ast.ASTNotImplementedException; import org.eclipse.cdt.core.parser.ast.IASTASMDefinition; import org.eclipse.cdt.core.parser.ast.IASTAbstractTypeSpecifierDeclaration; +import org.eclipse.cdt.core.parser.ast.IASTBaseSpecifier; import org.eclipse.cdt.core.parser.ast.IASTClassReference; import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier; import org.eclipse.cdt.core.parser.ast.IASTCodeScope; @@ -72,17 +72,18 @@ import org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration; import org.eclipse.cdt.core.parser.ast.IASTTemplateInstantiation; import org.eclipse.cdt.core.parser.ast.IASTTemplateParameterReference; import org.eclipse.cdt.core.parser.ast.IASTTemplateSpecialization; +import org.eclipse.cdt.core.parser.ast.IASTTypeSpecifier; import org.eclipse.cdt.core.parser.ast.IASTTypedefDeclaration; import org.eclipse.cdt.core.parser.ast.IASTTypedefReference; import org.eclipse.cdt.core.parser.ast.IASTUsingDeclaration; import org.eclipse.cdt.core.parser.ast.IASTUsingDirective; import org.eclipse.cdt.core.parser.ast.IASTVariable; import org.eclipse.cdt.core.parser.ast.IASTVariableReference; -import org.eclipse.cdt.core.search.ICSearchConstants; import org.eclipse.cdt.core.search.ICSearchPattern; import org.eclipse.cdt.core.search.ICSearchResultCollector; import org.eclipse.cdt.core.search.ICSearchScope; import org.eclipse.cdt.core.search.IMatch; +import org.eclipse.cdt.core.search.IMatchLocator; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; @@ -100,7 +101,7 @@ import org.eclipse.core.runtime.Path; * To change the template for this generated type comment go to * Window>Preferences>Java>Code Generation>Code and Comments */ -public class MatchLocator implements ISourceElementRequestor, ICSearchConstants { +public class MatchLocator implements IMatchLocator{ ArrayList matchStorage; @@ -109,12 +110,11 @@ public class MatchLocator implements ISourceElementRequestor, ICSearchConstants /** * */ - public MatchLocator( ICSearchPattern pattern, ICSearchResultCollector collector, ICSearchScope scope, IProgressMonitor monitor) { + public MatchLocator( ICSearchPattern pattern, ICSearchResultCollector collector, ICSearchScope scope) { super(); searchPattern = pattern; resultCollector = collector; - searchScope = scope; - progressMonitor = monitor; + searchScope = scope; } public boolean acceptProblem(IProblem problem) { return DefaultProblemHandler.ruleOnProblem(problem, ParserMode.COMPLETE_PARSE ); } @@ -293,6 +293,7 @@ public class MatchLocator implements ISourceElementRequestor, ICSearchConstants } public void exitClassSpecifier(IASTClassSpecifier classSpecification) { + check(DECLARATIONS, classSpecification); popScope(); } @@ -633,4 +634,11 @@ public class MatchLocator implements ISourceElementRequestor, ICSearchConstants // TODO Auto-generated method stub return false; } + + /* (non-Javadoc) + * @see org.eclipse.cdt.core.search.IMatchLocator#setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor) + */ + public void setProgressMonitor(IProgressMonitor progressMonitor) { + this.progressMonitor = progressMonitor; + } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchMessages.properties index e5c10b5f1fa..a7b80e61fa6 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchMessages.properties @@ -39,6 +39,7 @@ CSearchPage.searchFor.union= U&nion CSearchPage.searchFor.enum= &Enumeration CSearchPage.searchFor.enumr = Enume&rator CSearchPage.searchFor.derived = &Derived +CSearchPage.searchFor.friend = &Friend CSearchPage.searchFor.any= An&y Element CSearchPage.searchFor.classStruct= &Class / Struct diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchPage.java index cd1019a7052..e08a4e83518 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchPage.java @@ -627,7 +627,7 @@ public class CSearchPage extends DialogPage implements ISearchPage, ICSearchCons private static List fgPreviousSearchPatterns = new ArrayList(20); private Button[] fSearchFor; - private SearchFor[] fSearchForValues = { CLASS_STRUCT, FUNCTION, VAR, UNION, METHOD, FIELD, ENUM, ENUMTOR, NAMESPACE, DERIVED, UNKNOWN_SEARCH_FOR }; + private SearchFor[] fSearchForValues = { CLASS_STRUCT, FUNCTION, VAR, UNION, METHOD, FIELD, ENUM, ENUMTOR, NAMESPACE, UNKNOWN_SEARCH_FOR }; private String[] fSearchForText= { CSearchMessages.getString("CSearchPage.searchFor.classStruct"), //$NON-NLS-1$ @@ -639,7 +639,6 @@ public class CSearchPage extends DialogPage implements ISearchPage, ICSearchCons CSearchMessages.getString("CSearchPage.searchFor.enum"), //$NON-NLS-1$ CSearchMessages.getString("CSearchPage.searchFor.enumr"), //$NON-NLS-1$ CSearchMessages.getString("CSearchPage.searchFor.namespace"), //$NON-NLS-1$ - CSearchMessages.getString("CSearchPage.searchFor.derived"), //$NON-NLS-1$ CSearchMessages.getString("CSearchPage.searchFor.any") }; //$NON-NLS-1$