1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Patch for Andrew Niefer

Core:
-fix bug43862 - Cannot find macro delcarations using all occurences.
  * modified CSearchPattern.createMacroPattern()

Core.tests:
Updated OtherPatternTests::testMacroPattern() to test for bug43862
This commit is contained in:
John Camelon 2003-09-30 18:18:26 +00:00
parent e3e3ba0e9e
commit 3d6aba8db8
4 changed files with 15 additions and 2 deletions

View file

@ -2,6 +2,9 @@
added testBug43503_AmbiguousUsing() and testBug43503_UnableToResolveFunction() to
ParserSymbolTableTest
2003-09-30 Andrew Niefer
Updated OtherPatternTests::testMacroPattern() to test for bug43862
2003-09-29 Andrew Niefer
added testBug43062 and testConstructorDestructor to FunctionMethodPatternTests
modified resources/search/classDecl.cpp & include.h to include more operators and a constructor

View file

@ -195,6 +195,11 @@ public class OtherPatternTests extends BaseSearchTest {
IMatch match = (IMatch) matches.iterator().next();
assertTrue( match.getName().equals( "FOO" ) );
assertTrue( match.getParentName().equals( "" ));
pattern = SearchEngine.createSearchPattern( "FOO", MACRO, ALL_OCCURRENCES, true );
search( workspace, pattern, scope, resultCollector );
matches = resultCollector.getSearchResults();
assertEquals( matches.size(), 1 );
}
public void testEnumerators(){

View file

@ -1,3 +1,7 @@
2003-09-30 Andrew Niefer
-fix bug43862 - Cannot find macro delcarations using all occurences.
* modified CSearchPattern.createMacroPattern
2003-09-29 Andrew Niefer
- fix bug 43062 outline is confused on operator methods containing spaces
- modify CSearchPattern.scanForNames to use same naming convention as TokenDuple.toString()

View file

@ -132,10 +132,11 @@ public abstract class CSearchPattern implements ICSearchConstants, ICSearchPatte
* @return
*/
private static CSearchPattern createMacroPattern(String patternString, LimitTo limitTo, int matchMode, boolean caseSensitive) {
if( limitTo != DECLARATIONS )
if( limitTo != DECLARATIONS && limitTo != ALL_OCCURRENCES )
return null;
return new MacroDeclarationPattern( patternString.toCharArray(), matchMode, limitTo, caseSensitive ); }
return new MacroDeclarationPattern( patternString.toCharArray(), matchMode, DECLARATIONS, caseSensitive );
}
/**
* @param patternString