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:
parent
e3e3ba0e9e
commit
3d6aba8db8
4 changed files with 15 additions and 2 deletions
|
@ -2,6 +2,9 @@
|
||||||
added testBug43503_AmbiguousUsing() and testBug43503_UnableToResolveFunction() to
|
added testBug43503_AmbiguousUsing() and testBug43503_UnableToResolveFunction() to
|
||||||
ParserSymbolTableTest
|
ParserSymbolTableTest
|
||||||
|
|
||||||
|
2003-09-30 Andrew Niefer
|
||||||
|
Updated OtherPatternTests::testMacroPattern() to test for bug43862
|
||||||
|
|
||||||
2003-09-29 Andrew Niefer
|
2003-09-29 Andrew Niefer
|
||||||
added testBug43062 and testConstructorDestructor to FunctionMethodPatternTests
|
added testBug43062 and testConstructorDestructor to FunctionMethodPatternTests
|
||||||
modified resources/search/classDecl.cpp & include.h to include more operators and a constructor
|
modified resources/search/classDecl.cpp & include.h to include more operators and a constructor
|
||||||
|
|
|
@ -195,6 +195,11 @@ public class OtherPatternTests extends BaseSearchTest {
|
||||||
IMatch match = (IMatch) matches.iterator().next();
|
IMatch match = (IMatch) matches.iterator().next();
|
||||||
assertTrue( match.getName().equals( "FOO" ) );
|
assertTrue( match.getName().equals( "FOO" ) );
|
||||||
assertTrue( match.getParentName().equals( "" ));
|
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(){
|
public void testEnumerators(){
|
||||||
|
|
|
@ -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
|
2003-09-29 Andrew Niefer
|
||||||
- fix bug 43062 outline is confused on operator methods containing spaces
|
- fix bug 43062 outline is confused on operator methods containing spaces
|
||||||
- modify CSearchPattern.scanForNames to use same naming convention as TokenDuple.toString()
|
- modify CSearchPattern.scanForNames to use same naming convention as TokenDuple.toString()
|
||||||
|
|
|
@ -132,10 +132,11 @@ public abstract class CSearchPattern implements ICSearchConstants, ICSearchPatte
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private static CSearchPattern createMacroPattern(String patternString, LimitTo limitTo, int matchMode, boolean caseSensitive) {
|
private static CSearchPattern createMacroPattern(String patternString, LimitTo limitTo, int matchMode, boolean caseSensitive) {
|
||||||
if( limitTo != DECLARATIONS )
|
if( limitTo != DECLARATIONS && limitTo != ALL_OCCURRENCES )
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
return new MacroDeclarationPattern( patternString.toCharArray(), matchMode, limitTo, caseSensitive ); }
|
return new MacroDeclarationPattern( patternString.toCharArray(), matchMode, DECLARATIONS, caseSensitive );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param patternString
|
* @param patternString
|
||||||
|
|
Loading…
Add table
Reference in a new issue