mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Patch for Bogdan : Search for function with no parameters VS ignore parameters.
This commit is contained in:
parent
90c0309950
commit
2937f68a8c
6 changed files with 314 additions and 269 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
2004-02-06 Bogdan Gheorghe
|
||||||
|
Added FunctionMethodPatternTests.testMethodDeclarationWithNoParameters
|
||||||
|
|
||||||
2004-02-08 John Camelon
|
2004-02-08 John Camelon
|
||||||
Moved testErrorHandling_1() from failed tests to CompleteParseASTTest.
|
Moved testErrorHandling_1() from failed tests to CompleteParseASTTest.
|
||||||
Moved testBug44340() from failed tests to CompleteParseASTTest.
|
Moved testBug44340() from failed tests to CompleteParseASTTest.
|
||||||
|
|
|
@ -27,6 +27,8 @@ void forwardFunction();
|
||||||
|
|
||||||
class Direction{
|
class Direction{
|
||||||
void turn();
|
void turn();
|
||||||
|
void turn(int);
|
||||||
|
void turnAgain(void);
|
||||||
};
|
};
|
||||||
class Right : public Direction {
|
class Right : public Direction {
|
||||||
void turn() { }
|
void turn() { }
|
||||||
|
|
|
@ -105,6 +105,27 @@ public class FunctionMethodPatternTests extends BaseSearchTest {
|
||||||
assertEquals( matches.size(), 1 );
|
assertEquals( matches.size(), 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testMethodWithNoParameters(){
|
||||||
|
ICSearchPattern pattern = SearchEngine.createSearchPattern( "turn( )", METHOD, DECLARATIONS, true );
|
||||||
|
|
||||||
|
search( workspace, pattern, scope, resultCollector );
|
||||||
|
Set matches = resultCollector.getSearchResults();
|
||||||
|
assertEquals( matches.size(), 2 );
|
||||||
|
|
||||||
|
pattern = SearchEngine.createSearchPattern( "turn(void)", METHOD, DECLARATIONS, true );
|
||||||
|
|
||||||
|
search( workspace, pattern, scope, resultCollector );
|
||||||
|
matches = resultCollector.getSearchResults();
|
||||||
|
assertEquals( matches.size(), 2 );
|
||||||
|
|
||||||
|
pattern = SearchEngine.createSearchPattern( "turnAgain()", METHOD, DECLARATIONS, true );
|
||||||
|
|
||||||
|
search( workspace, pattern, scope, resultCollector );
|
||||||
|
matches = resultCollector.getSearchResults();
|
||||||
|
assertEquals( matches.size(), 1 );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void testOperators_bug43063_bug42979(){
|
public void testOperators_bug43063_bug42979(){
|
||||||
ICSearchPattern pattern = SearchEngine.createSearchPattern( "operator \\*", METHOD, DECLARATIONS, true );
|
ICSearchPattern pattern = SearchEngine.createSearchPattern( "operator \\*", METHOD, DECLARATIONS, true );
|
||||||
|
|
||||||
|
@ -196,7 +217,7 @@ public class FunctionMethodPatternTests extends BaseSearchTest {
|
||||||
ICSearchPattern pattern = SearchEngine.createSearchPattern( "turn", METHOD, DECLARATIONS, true );
|
ICSearchPattern pattern = SearchEngine.createSearchPattern( "turn", METHOD, DECLARATIONS, true );
|
||||||
search( workspace, pattern, scope, resultCollector );
|
search( workspace, pattern, scope, resultCollector );
|
||||||
Set matches = resultCollector.getSearchResults();
|
Set matches = resultCollector.getSearchResults();
|
||||||
assertEquals( matches.size(), 2 );
|
assertEquals( matches.size(), 3 );
|
||||||
|
|
||||||
pattern = SearchEngine.createSearchPattern( "Direction::turn", METHOD, DEFINITIONS, true );
|
pattern = SearchEngine.createSearchPattern( "Direction::turn", METHOD, DEFINITIONS, true );
|
||||||
search( workspace, pattern, scope, resultCollector );
|
search( workspace, pattern, scope, resultCollector );
|
||||||
|
|
|
@ -1,269 +1,276 @@
|
||||||
2004-02-05 Alain Magloire
|
2004-02-06 Bogdan Gheorghe
|
||||||
PR 51221
|
|
||||||
Reformat Patch from Bogdan base on Thomas Fletcher original patch
|
- Modified CSearchPattern.scanforParameters. If no parameters are passed in
|
||||||
In a nutshell, it moves the search operation into a runnable which
|
as part of a function/method search, void is assigned as a parameter type.
|
||||||
can be passed to a progress dialog.
|
|
||||||
|
- Modified MethodDeclarationPattern to check for void parameter types
|
||||||
* search/org/eclipse/cdt/core/search/BasicSearchResultCollector.java
|
|
||||||
|
2004-02-05 Alain Magloire
|
||||||
2004-01-26 John Camelon
|
PR 51221
|
||||||
Updated clients to use new Scanner logging service.
|
Reformat Patch from Bogdan base on Thomas Fletcher original patch
|
||||||
|
In a nutshell, it moves the search operation into a runnable which
|
||||||
2003-10-23 Bogdan Gheorghe
|
can be passed to a progress dialog.
|
||||||
|
|
||||||
- Added AcceptMatchOperation to get around Bug 45324. The search
|
* search/org/eclipse/cdt/core/search/BasicSearchResultCollector.java
|
||||||
operation is no longer a WorkspaceModifyOperation (which used to
|
|
||||||
lock the workspace for the duration of search). Instead, we now
|
2004-01-26 John Camelon
|
||||||
lock the workspace only when we tag the resources with markers.
|
Updated clients to use new Scanner logging service.
|
||||||
|
|
||||||
- Modified SearchEngine : we now receive a list of matches
|
2003-10-23 Bogdan Gheorghe
|
||||||
from the search that we pass into the AcceptMatchOperation.
|
|
||||||
|
- Added AcceptMatchOperation to get around Bug 45324. The search
|
||||||
- Modified MatchLocator to add matches to passed in list instead
|
operation is no longer a WorkspaceModifyOperation (which used to
|
||||||
of reporting them right away
|
lock the workspace for the duration of search). Instead, we now
|
||||||
|
lock the workspace only when we tag the resources with markers.
|
||||||
- Modified JobManager: -added in jobToIgnore parm to unblock dependency
|
|
||||||
jobs
|
- Modified SearchEngine : we now receive a list of matches
|
||||||
|
from the search that we pass into the AcceptMatchOperation.
|
||||||
|
|
||||||
2003-10-06 Bogdan Gheorghe
|
- Modified MatchLocator to add matches to passed in list instead
|
||||||
- added createCFileSearchScope() to SearchEngine.java to improve
|
of reporting them right away
|
||||||
code complete performance
|
|
||||||
|
- Modified JobManager: -added in jobToIgnore parm to unblock dependency
|
||||||
2003-10-01 Andrew Niefer
|
jobs
|
||||||
- fix bug 44026 by checking scope before reporting match in MatchLocator.report
|
|
||||||
|
|
||||||
2003-10-01 Andrew Niefer
|
2003-10-06 Bogdan Gheorghe
|
||||||
- fix BasicSearchMatch.equals() for bug43988
|
- added createCFileSearchScope() to SearchEngine.java to improve
|
||||||
|
code complete performance
|
||||||
2003-09-30 Bogdan Gheorghe
|
|
||||||
- changed logging in JobManager to use new ICLogConstants
|
2003-10-01 Andrew Niefer
|
||||||
|
- fix bug 44026 by checking scope before reporting match in MatchLocator.report
|
||||||
2003-09-30 Andrew Niefer
|
|
||||||
-fix bug43862 - Cannot find macro delcarations using all occurences.
|
2003-10-01 Andrew Niefer
|
||||||
* modified CSearchPattern.createMacroPattern
|
- fix BasicSearchMatch.equals() for bug43988
|
||||||
|
|
||||||
2003-09-29 Andrew Niefer
|
2003-09-30 Bogdan Gheorghe
|
||||||
- fix bug 43062 outline is confused on operator methods containing spaces
|
- changed logging in JobManager to use new ICLogConstants
|
||||||
- modify CSearchPattern.scanForNames to use same naming convention as TokenDuple.toString()
|
|
||||||
- modify MatchLocator.report to use IASTOffsetableNamedElement.getNameEndOffset()
|
2003-09-30 Andrew Niefer
|
||||||
|
-fix bug43862 - Cannot find macro delcarations using all occurences.
|
||||||
2003-09-29 Andrew Niefer
|
* modified CSearchPattern.createMacroPattern
|
||||||
-bug42911 - Search: cannot find beyond use of data member
|
|
||||||
- fix NPE's in BasicSearchMatch.equals & hashCode
|
2003-09-29 Andrew Niefer
|
||||||
|
- fix bug 43062 outline is confused on operator methods containing spaces
|
||||||
2003-09-29 Andrew Niefer
|
- modify CSearchPattern.scanForNames to use same naming convention as TokenDuple.toString()
|
||||||
-fix NPE if IScannerInfoProvider returns null IScannerInfo
|
- modify MatchLocator.report to use IASTOffsetableNamedElement.getNameEndOffset()
|
||||||
|
|
||||||
2003-09-25 Andrew Niefer
|
2003-09-29 Andrew Niefer
|
||||||
- bug43129 - Cannot search for definitions of global variables
|
-bug42911 - Search: cannot find beyond use of data member
|
||||||
- check definitions for variables, fields, enumerators and namespaces
|
- fix NPE's in BasicSearchMatch.equals & hashCode
|
||||||
- handle enter/exitLinkageSpecification
|
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/MatchLocator.java
|
2003-09-29 Andrew Niefer
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
-fix NPE if IScannerInfoProvider returns null IScannerInfo
|
||||||
|
|
||||||
2003-09-25 Bogdan Gheorghe
|
2003-09-25 Andrew Niefer
|
||||||
- added SearchFor INCLUDE in ICSearchConstants
|
- bug43129 - Cannot search for definitions of global variables
|
||||||
- added acceptIncludeDeclaration to IIndexSearchRequestor
|
- check definitions for variables, fields, enumerators and namespaces
|
||||||
- modified PathCollector to acceptIncludeDeclarations
|
- handle enter/exitLinkageSpecification
|
||||||
- modified CSearchPattern to create an IncludePattern
|
* search/org/eclipse/cdt/internal/core/search/matching/MatchLocator.java
|
||||||
- added IncludePattern.java
|
* search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
||||||
|
|
||||||
2003-09-25 Andrew Niefer
|
2003-09-25 Bogdan Gheorghe
|
||||||
- partial fix for 43664 Modify Matchlocator to not try and create a link if we have no
|
- added SearchFor INCLUDE in ICSearchConstants
|
||||||
resource, instead just use the path
|
- added acceptIncludeDeclaration to IIndexSearchRequestor
|
||||||
|
- modified PathCollector to acceptIncludeDeclarations
|
||||||
2003-09-23 Andrew Niefer
|
- modified CSearchPattern to create an IncludePattern
|
||||||
fix bug 43498 Search with ? fails on first letter of second word
|
- added IncludePattern.java
|
||||||
-modifications to CSearchPattern.scanForNames()
|
|
||||||
-add getSimpleName to MethodDeclarationPattern
|
2003-09-25 Andrew Niefer
|
||||||
|
- partial fix for 43664 Modify Matchlocator to not try and create a link if we have no
|
||||||
2003-09-19 Andrew Niefer
|
resource, instead just use the path
|
||||||
fix bug 43327 Code Complete finds local variables
|
|
||||||
- modified MatchLocator to not report local declarations when boolean is set
|
2003-09-23 Andrew Niefer
|
||||||
- modified SearchEngine.search to take an additional parameter "excludeLocalDeclarations"
|
fix bug 43498 Search with ? fails on first letter of second word
|
||||||
|
-modifications to CSearchPattern.scanForNames()
|
||||||
2003-09-15 Andrew Niefer
|
-add getSimpleName to MethodDeclarationPattern
|
||||||
- modify CSearchPattern to handle escaping wildcards (bug43063)
|
|
||||||
- modify enterFunctionBody and enterMethodBody to fix bug42979
|
2003-09-19 Andrew Niefer
|
||||||
- search for Parameter References
|
fix bug 43327 Code Complete finds local variables
|
||||||
|
- modified MatchLocator to not report local declarations when boolean is set
|
||||||
2003-09-13 Andrew Niefer
|
- modified SearchEngine.search to take an additional parameter "excludeLocalDeclarations"
|
||||||
-Searching for Typedefs: (bug42902)
|
|
||||||
- modified setElementInfo in BasicSearchResultCollector
|
2003-09-15 Andrew Niefer
|
||||||
- added TYPEDEF to ICSearchConstants
|
- modify CSearchPattern to handle escaping wildcards (bug43063)
|
||||||
- modified CSearchPattern & ClassDeclarationPattern
|
- modify enterFunctionBody and enterMethodBody to fix bug42979
|
||||||
- implemented acceptTypedef* in MatchLocator
|
- search for Parameter References
|
||||||
- modified BasicSearchMatch to implement Comparable
|
|
||||||
|
2003-09-13 Andrew Niefer
|
||||||
2003-09-11 Andrew Niefer
|
-Searching for Typedefs: (bug42902)
|
||||||
- Modified ICSearchResultCollector.createMatch to not take a parent parameter
|
- modified setElementInfo in BasicSearchResultCollector
|
||||||
- modified BasicSearchResultCollector to create the parent string from the fully qualified name of the node
|
- added TYPEDEF to ICSearchConstants
|
||||||
- modified MatchLocator to keep track of most recent declaration for reporting purposes
|
- modified CSearchPattern & ClassDeclarationPattern
|
||||||
- modified MatchLocator.report to use the most recent declaration
|
- implemented acceptTypedef* in MatchLocator
|
||||||
|
- modified BasicSearchMatch to implement Comparable
|
||||||
2003-09-09 Andrew Niefer
|
|
||||||
pattern matching on function parameters:
|
2003-09-11 Andrew Niefer
|
||||||
- modified scanForParameters in CSearchPattern
|
- Modified ICSearchResultCollector.createMatch to not take a parent parameter
|
||||||
- added getParamString in CSearchPattern
|
- modified BasicSearchResultCollector to create the parent string from the fully qualified name of the node
|
||||||
- modified matchLevel in MethodDeclarationPattern
|
- modified MatchLocator to keep track of most recent declaration for reporting purposes
|
||||||
|
- modified MatchLocator.report to use the most recent declaration
|
||||||
Enumeration references
|
|
||||||
- modified acceptEnumeratorReference in MatchLocator
|
2003-09-09 Andrew Niefer
|
||||||
|
pattern matching on function parameters:
|
||||||
2003-09-05 Andrew Niefer
|
- modified scanForParameters in CSearchPattern
|
||||||
- fix searching for enumerators
|
- added getParamString in CSearchPattern
|
||||||
|
- modified matchLevel in MethodDeclarationPattern
|
||||||
2003-09-03 Andrew Niefer
|
|
||||||
- added CLASS_STRUCT to the SearchFor constants
|
Enumeration references
|
||||||
- Modified CSearchPattern to handle CLASS_STRUCT
|
- modified acceptEnumeratorReference in MatchLocator
|
||||||
|
|
||||||
2003-08-26 Bogdan Gheorghe
|
2003-09-05 Andrew Niefer
|
||||||
- Added debug tracing statements to SearchEngine
|
- fix searching for enumerators
|
||||||
- Modified scanForNames in CSearchPattern to treat append
|
|
||||||
a token after "~" to allow for destructors search
|
2003-09-03 Andrew Niefer
|
||||||
- Added scope checking to MatchLocator
|
- added CLASS_STRUCT to the SearchFor constants
|
||||||
- Added debug trace statements to MatchLocator
|
- Modified CSearchPattern to handle CLASS_STRUCT
|
||||||
|
|
||||||
2003-08-20 Bogdan Gheorghe
|
2003-08-26 Bogdan Gheorghe
|
||||||
- Changed matching and reporting functions to handle nodes
|
- Added debug tracing statements to SearchEngine
|
||||||
of type IElaboratedTypeSpecifier
|
- Modified scanForNames in CSearchPattern to treat append
|
||||||
|
a token after "~" to allow for destructors search
|
||||||
2003-08-12 Bogdan Gheorghe
|
- Added scope checking to MatchLocator
|
||||||
- Rolled field and variable search patterns into one pattern, in
|
- Added debug trace statements to MatchLocator
|
||||||
order to allow for qualified var searches
|
|
||||||
|
2003-08-20 Bogdan Gheorghe
|
||||||
2003-08-11 Andrew Niefer
|
- Changed matching and reporting functions to handle nodes
|
||||||
- Added Macro ICSearchConstant
|
of type IElaboratedTypeSpecifier
|
||||||
- Added acceptMacro to IIndexSearchRequestor and PathCollector
|
|
||||||
- Added MacroDeclaration Pattern
|
2003-08-12 Bogdan Gheorghe
|
||||||
- Rolled method and function patterns into one method pattern
|
- Rolled field and variable search patterns into one pattern, in
|
||||||
- Added WorkingCopy support to search
|
order to allow for qualified var searches
|
||||||
|
|
||||||
2003-08-08 Bogdan Gheorghe
|
2003-08-11 Andrew Niefer
|
||||||
- Added CreateSearchScope to create a search scope out of
|
- Added Macro ICSearchConstant
|
||||||
CElements
|
- Added acceptMacro to IIndexSearchRequestor and PathCollector
|
||||||
- Filled out CSearchScope to enable:
|
- Added MacroDeclaration Pattern
|
||||||
- adding a project to scope, include referenced projects
|
- Rolled method and function patterns into one method pattern
|
||||||
- adding individual CElements to scope
|
- Added WorkingCopy support to search
|
||||||
|
|
||||||
2003-08-08 Andrew Niefer
|
2003-08-08 Bogdan Gheorghe
|
||||||
- add function parameter information to search results
|
- Added CreateSearchScope to create a search scope out of
|
||||||
|
CElements
|
||||||
2003-08-06 Andrew Niefer
|
- Filled out CSearchScope to enable:
|
||||||
- Create OrPattern which matches for search if any of its constituent patterns matches
|
- adding a project to scope, include referenced projects
|
||||||
- modified MatchLocator to support the OrPattern
|
- adding individual CElements to scope
|
||||||
- searching for All occurences now uses the OrPattern
|
|
||||||
|
2003-08-08 Andrew Niefer
|
||||||
2003-08-01 Andrew Niefer
|
- add function parameter information to search results
|
||||||
- Modified BasicSearchResultCollector to only accept matches it has not already seen
|
|
||||||
- fixed bug in finding a resource when entering includes
|
2003-08-06 Andrew Niefer
|
||||||
|
- Create OrPattern which matches for search if any of its constituent patterns matches
|
||||||
2003-07-29 Andrew Niefer
|
- modified MatchLocator to support the OrPattern
|
||||||
Refactoring Search result collection:
|
- searching for All occurences now uses the OrPattern
|
||||||
- Modified ICSearchResultCollector
|
|
||||||
- Modified IMatch
|
2003-08-01 Andrew Niefer
|
||||||
- Modified MatchLocator to reflect changes in ICSearchResultCollector
|
- Modified BasicSearchResultCollector to only accept matches it has not already seen
|
||||||
- Created BasicSearchMatch implements IMatch
|
- fixed bug in finding a resource when entering includes
|
||||||
- Created BasicSearchResultCollector implements ICSearchResultCollector
|
|
||||||
|
2003-07-29 Andrew Niefer
|
||||||
2003-07-28 Andrew Niefer
|
Refactoring Search result collection:
|
||||||
- added abstract CSearchPattern.resetIndexInfo fix bug with searching with globally
|
- Modified ICSearchResultCollector
|
||||||
qualified names
|
- Modified IMatch
|
||||||
- fixed bug in CSearchPattern.matchQualifications to do with globally qualified names
|
- Modified MatchLocator to reflect changes in ICSearchResultCollector
|
||||||
- fixed bug in CSearchPattern.createFunctionPattern to do with parameter lists.
|
- Created BasicSearchMatch implements IMatch
|
||||||
|
- Created BasicSearchResultCollector implements ICSearchResultCollector
|
||||||
2003-07-25 Bogdan Gheorghe
|
|
||||||
- Added refs to PathCollector
|
2003-07-28 Andrew Niefer
|
||||||
- Filled in feedIndexRequestor for the new search patterns
|
- added abstract CSearchPattern.resetIndexInfo fix bug with searching with globally
|
||||||
- Fixed the FunctionDeclarationPattern to work with no parms
|
qualified names
|
||||||
|
- fixed bug in CSearchPattern.matchQualifications to do with globally qualified names
|
||||||
2003-07-24 Andrew Niefer
|
- fixed bug in CSearchPattern.createFunctionPattern to do with parameter lists.
|
||||||
- Implemented decodeIndexEntry & matchIndexEntry for all patterns
|
|
||||||
- changed MatchLocator to use a COMPLETE_PARSE.
|
2003-07-25 Bogdan Gheorghe
|
||||||
|
- Added refs to PathCollector
|
||||||
2003-07-23 Andrew Niefer
|
- Filled in feedIndexRequestor for the new search patterns
|
||||||
-Changed ICSearchPattern.matchLevel to take a ISourceElementCallbackDelegate
|
- Fixed the FunctionDeclarationPattern to work with no parms
|
||||||
-Changed ICSearchResultCollector.createMatch to take a ISourceElementCallbackDelegate
|
|
||||||
-first implementations of:
|
2003-07-24 Andrew Niefer
|
||||||
-CSearchPattern.createFunctionPattern
|
- Implemented decodeIndexEntry & matchIndexEntry for all patterns
|
||||||
-CSearchPattern.createVariablePattern
|
- changed MatchLocator to use a COMPLETE_PARSE.
|
||||||
-CSearchPattern.createMethodPattern
|
|
||||||
-preliminary matching for remaining patterns
|
2003-07-23 Andrew Niefer
|
||||||
-handling of remaining parser callbacks
|
-Changed ICSearchPattern.matchLevel to take a ISourceElementCallbackDelegate
|
||||||
-generating index Prefixes for the patterns
|
-Changed ICSearchResultCollector.createMatch to take a ISourceElementCallbackDelegate
|
||||||
|
-first implementations of:
|
||||||
2003-07-14 Andrew Niefer
|
-CSearchPattern.createFunctionPattern
|
||||||
-Modified SearchFor instances in ICSearchConstants to more closely match what we are searching for
|
-CSearchPattern.createVariablePattern
|
||||||
-added IMatch interface, it represents matches found by the search engine, implementors can store
|
-CSearchPattern.createMethodPattern
|
||||||
whatever information they like, see ICSearchResultCollector::createMatch
|
-preliminary matching for remaining patterns
|
||||||
-added createMatch to the ICSearchResultCollector interface, the result collector is responsible for
|
-handling of remaining parser callbacks
|
||||||
implementing IMatch to store whatever data they want out of the AST nodes.
|
-generating index Prefixes for the patterns
|
||||||
-added skeleton patterns:
|
|
||||||
search/org/eclipse/cdt/internal/core/search/matching/FieldDeclarationPattern.java
|
2003-07-14 Andrew Niefer
|
||||||
search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java
|
-Modified SearchFor instances in ICSearchConstants to more closely match what we are searching for
|
||||||
search/org/eclipse/cdt/internal/core/search/matching/MethodDeclarationPattern.java
|
-added IMatch interface, it represents matches found by the search engine, implementors can store
|
||||||
search/org/eclipse/cdt/internal/core/search/matching/NamespaceDeclarationPattern.java
|
whatever information they like, see ICSearchResultCollector::createMatch
|
||||||
search/org/eclipse/cdt/internal/core/search/matching/VariableDeclarationPattern.java
|
-added createMatch to the ICSearchResultCollector interface, the result collector is responsible for
|
||||||
-added beginnings of CSearchPattern::create*Pattern functions
|
implementing IMatch to store whatever data they want out of the AST nodes.
|
||||||
-modifications to MatchLocator to keep track of current scope
|
-added skeleton patterns:
|
||||||
-added CSearchPattern::matchQualifications
|
search/org/eclipse/cdt/internal/core/search/matching/FieldDeclarationPattern.java
|
||||||
|
search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java
|
||||||
2003-07-10 Bogdan Gheorghe
|
search/org/eclipse/cdt/internal/core/search/matching/MethodDeclarationPattern.java
|
||||||
Provided implementation for ICSearchScope.java, CSearchScope.java
|
search/org/eclipse/cdt/internal/core/search/matching/NamespaceDeclarationPattern.java
|
||||||
|
search/org/eclipse/cdt/internal/core/search/matching/VariableDeclarationPattern.java
|
||||||
Hooked up new CWorkspaceScope, PathCollector, PatternSearchJob in SearchEngine.java
|
-added beginnings of CSearchPattern::create*Pattern functions
|
||||||
|
-modifications to MatchLocator to keep track of current scope
|
||||||
Provided implementation for PatternSearchJob.java - PatternSearchJob is where the first part
|
-added CSearchPattern::matchQualifications
|
||||||
of the search occurs - using an IndexSelector to filter the indexes, it gets the indexes from
|
|
||||||
the IndexManager and then uses the passed in pattern to find the index matched. Once it finds
|
2003-07-10 Bogdan Gheorghe
|
||||||
an index match it adds the file path to the PathCollector.
|
Provided implementation for ICSearchScope.java, CSearchScope.java
|
||||||
|
|
||||||
Modified CSearchPattern - added support to find index entries.
|
Hooked up new CWorkspaceScope, PathCollector, PatternSearchJob in SearchEngine.java
|
||||||
|
|
||||||
Modified ClassDeclarationPattern - added support to decode, match and report
|
Provided implementation for PatternSearchJob.java - PatternSearchJob is where the first part
|
||||||
index entries.
|
of the search occurs - using an IndexSelector to filter the indexes, it gets the indexes from
|
||||||
|
the IndexManager and then uses the passed in pattern to find the index matched. Once it finds
|
||||||
|
an index match it adds the file path to the PathCollector.
|
||||||
Added:
|
|
||||||
* search/org/eclipse/cdt/internal/core/search/CWorkspaceScope.java
|
Modified CSearchPattern - added support to find index entries.
|
||||||
* search/org/eclipse/cdt/internal/core/search/IIndexSearchRequestor.java
|
|
||||||
* search/org/eclipse/cdt/internal/core/search/IndexSelector.java
|
Modified ClassDeclarationPattern - added support to decode, match and report
|
||||||
* search/org/eclipse/cdt/internal/core/search/PathCollector.java
|
index entries.
|
||||||
|
|
||||||
Modified:
|
|
||||||
* search/org/eclipse/cdt/core/search/ICSearchScope.java
|
Added:
|
||||||
* search/org/eclipse/cdt/core/search/SearchEngine.java
|
* search/org/eclipse/cdt/internal/core/search/CWorkspaceScope.java
|
||||||
* search/org/eclipse/cdt/internal/core/search/CSearchScope.java
|
* search/org/eclipse/cdt/internal/core/search/IIndexSearchRequestor.java
|
||||||
* search/org/eclipse/cdt/internal/core/search/PatternSearchJob.java
|
* search/org/eclipse/cdt/internal/core/search/IndexSelector.java
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java
|
* search/org/eclipse/cdt/internal/core/search/PathCollector.java
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
|
||||||
|
Modified:
|
||||||
2003-07-04 Andrew Niefer
|
* search/org/eclipse/cdt/core/search/ICSearchScope.java
|
||||||
Modified ICSearchConstants to use new nested classes SearchFor and LimitTo instead of int
|
* search/org/eclipse/cdt/core/search/SearchEngine.java
|
||||||
for stronger type safety
|
* search/org/eclipse/cdt/internal/core/search/CSearchScope.java
|
||||||
|
* search/org/eclipse/cdt/internal/core/search/PatternSearchJob.java
|
||||||
Updated MatchLocator to invoke parser to do actual search.
|
* search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java
|
||||||
|
* search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
||||||
2003-06-27 Andrew Niefer
|
|
||||||
Modified:
|
2003-07-04 Andrew Niefer
|
||||||
search/org.eclipse.cdt.core.search.matching/MatchLocator.java
|
Modified ICSearchConstants to use new nested classes SearchFor and LimitTo instead of int
|
||||||
- enter/exitInclusion
|
for stronger type safety
|
||||||
- enterClassSpecifier
|
|
||||||
search/org.eclipse.cdt.core.search.matching/CSearchPattern.java
|
Updated MatchLocator to invoke parser to do actual search.
|
||||||
- createClassPattern
|
|
||||||
- matchesName
|
2003-06-27 Andrew Niefer
|
||||||
search/org.eclipse.cdt.core.search.matching/ClassDeclarationPattern.java
|
Modified:
|
||||||
- matchLevel
|
search/org.eclipse.cdt.core.search.matching/MatchLocator.java
|
||||||
search/org.eclipse.cdt.core.search/ICSearchPattern.java
|
- enter/exitInclusion
|
||||||
search/org.eclipse.cdt.core.search/ICSearchResultCollector.java
|
- enterClassSpecifier
|
||||||
search/org.eclipse.cdt.core.search/SearchEngine.java
|
search/org.eclipse.cdt.core.search.matching/CSearchPattern.java
|
||||||
|
- createClassPattern
|
||||||
2003-06-25 Bogdan Gheorghe
|
- matchesName
|
||||||
Modified:
|
search/org.eclipse.cdt.core.search.matching/ClassDeclarationPattern.java
|
||||||
* search/org/eclipse/cdt/core/search/ICSearchConstants.java
|
- matchLevel
|
||||||
* search/org/eclipse/cdt/internal/core/search/Utils.java
|
search/org.eclipse.cdt.core.search/ICSearchPattern.java
|
||||||
- moved to index/org/eclipse/cdt/internal/core/search/Utils.java
|
search/org.eclipse.cdt.core.search/ICSearchResultCollector.java
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
search/org.eclipse.cdt.core.search/SearchEngine.java
|
||||||
* search/org/eclipse/cdt/internal/core/search/processing/IJob.java
|
|
||||||
|
2003-06-25 Bogdan Gheorghe
|
||||||
|
Modified:
|
||||||
|
* search/org/eclipse/cdt/core/search/ICSearchConstants.java
|
||||||
|
* search/org/eclipse/cdt/internal/core/search/Utils.java
|
||||||
|
- moved to index/org/eclipse/cdt/internal/core/search/Utils.java
|
||||||
|
* search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
||||||
|
* search/org/eclipse/cdt/internal/core/search/processing/IJob.java
|
||||||
* search/org/eclipse/cdt/internal/core/search/processing/JobManager.java
|
* search/org/eclipse/cdt/internal/core/search/processing/JobManager.java
|
|
@ -452,6 +452,12 @@ public abstract class CSearchPattern implements ICSearchConstants, ICSearchPatte
|
||||||
param = getParamString( (IASTParameterDeclaration)parameters.next() );
|
param = getParamString( (IASTParameterDeclaration)parameters.next() );
|
||||||
list.add( param );
|
list.add( param );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (param == null){
|
||||||
|
//This means that no params have been added (i.e. empty brackets - void case)
|
||||||
|
param = "void ".toCharArray();
|
||||||
|
list.add (param);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
|
|
|
@ -96,11 +96,17 @@ public class MethodDeclarationPattern extends CSearchPattern {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//parameters
|
//parameters
|
||||||
if( parameterNames != null && parameterNames.length > 0 && parameterNames[0].length > 0 ){
|
if( parameterNames != null && parameterNames.length > 0 && parameterNames[0].length > 0 ){
|
||||||
|
|
||||||
Iterator params = function.getParameters();
|
Iterator params = function.getParameters();
|
||||||
|
|
||||||
|
if (!params.hasNext() && CharOperation.equals(parameterNames[0], "void ".toCharArray())){
|
||||||
|
//All empty lists have transformed to void, this function has no parms
|
||||||
|
return ACCURATE_MATCH;
|
||||||
|
}
|
||||||
|
|
||||||
for( int i = 0; i < parameterNames.length; i++ ){
|
for( int i = 0; i < parameterNames.length; i++ ){
|
||||||
|
|
||||||
//if this function doesn't have this many parameters, it is not a match.
|
//if this function doesn't have this many parameters, it is not a match.
|
||||||
|
|
Loading…
Add table
Reference in a new issue