mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-13 20:15:22 +02:00
Fix for Bug 59493: need to refine index query for open-type (2.0 Stream)
This commit is contained in:
parent
16258395c2
commit
4fd44238b9
12 changed files with 509 additions and 418 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
2004-08-11 Bogdan Gheorghe
|
||||||
|
Modified indexer test to work with new forward declaration encoding.
|
||||||
|
|
||||||
2004-08-03 Bogdan Gheorghe
|
2004-08-03 Bogdan Gheorghe
|
||||||
Updated indexer and dependency tests to work for indexing standalone headers
|
Updated indexer and dependency tests to work for indexing standalone headers
|
||||||
|
|
||||||
|
|
|
@ -425,7 +425,7 @@ public class IndexManagerTests extends TestCase {
|
||||||
IIndex ind = indexManager.getIndex(testProjectPath,true,true);
|
IIndex ind = indexManager.getIndex(testProjectPath,true,true);
|
||||||
assertTrue("Index exists for project",ind != null);
|
assertTrue("Index exists for project",ind != null);
|
||||||
|
|
||||||
String [] typeRefEntryResultModel ={"EntryResult: word=typeRef/C/C/B/A, refs={ 1 }", "EntryResult: word=typeRef/C/ForwardA/A, refs={ 1 }", "EntryResult: word=typeRef/E/e1/B/A, refs={ 1 }", "EntryResult: word=typeRef/V/x/B/A, refs={ 1 }"};
|
String [] typeRefEntryResultModel ={"EntryResult: word=typeRef/C/C/B/A, refs={ 1 }", "EntryResult: word=typeRef/E/e1/B/A, refs={ 1 }", "EntryResult: word=typeRef/G/ForwardA/A, refs={ 1 }", "EntryResult: word=typeRef/V/x/B/A, refs={ 1 }"};
|
||||||
IEntryResult[] typerefresults = ind.queryEntries(IIndexConstants.TYPE_REF);
|
IEntryResult[] typerefresults = ind.queryEntries(IIndexConstants.TYPE_REF);
|
||||||
assertTrue("Entry exists",typerefresults != null);
|
assertTrue("Entry exists",typerefresults != null);
|
||||||
|
|
||||||
|
@ -558,10 +558,10 @@ public class IndexManagerTests extends TestCase {
|
||||||
assertTrue("Index exists for project",ind != null);
|
assertTrue("Index exists for project",ind != null);
|
||||||
|
|
||||||
//IEntryResult[] fwdDclResults = ind.queryEntries("typeDecl/C/ForwardA/A".toCharArray());
|
//IEntryResult[] fwdDclResults = ind.queryEntries("typeDecl/C/ForwardA/A".toCharArray());
|
||||||
IEntryResult[] fwdDclResults = ind.queryEntries("typeDecl/C/ForwardA/A".toCharArray());
|
IEntryResult[] fwdDclResults = ind.queryEntries("typeDecl/G/ForwardA/A".toCharArray());
|
||||||
assertTrue("Entry exists",fwdDclResults != null);
|
assertTrue("Entry exists",fwdDclResults != null);
|
||||||
|
|
||||||
String [] fwdDclModel = {"EntryResult: word=typeDecl/C/ForwardA/A, refs={ 1 }"};
|
String [] fwdDclModel = {"EntryResult: word=typeDecl/G/ForwardA/A, refs={ 1 }"};
|
||||||
|
|
||||||
if (fwdDclResults.length != fwdDclModel.length)
|
if (fwdDclResults.length != fwdDclModel.length)
|
||||||
fail("Entry Result length different from model for forward declarations");
|
fail("Entry Result length different from model for forward declarations");
|
||||||
|
@ -571,10 +571,10 @@ public class IndexManagerTests extends TestCase {
|
||||||
assertEquals(fwdDclModel[i],fwdDclResults[i].toString());
|
assertEquals(fwdDclModel[i],fwdDclResults[i].toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
IEntryResult[] fwdDclRefResults = ind.queryEntries("typeRef/C/ForwardA/A".toCharArray());
|
IEntryResult[] fwdDclRefResults = ind.queryEntries("typeRef/G/ForwardA/A".toCharArray());
|
||||||
assertTrue("Entry exists", fwdDclRefResults!= null);
|
assertTrue("Entry exists", fwdDclRefResults!= null);
|
||||||
|
|
||||||
String [] fwdDclRefModel = {"EntryResult: word=typeRef/C/ForwardA/A, refs={ 1 }"};
|
String [] fwdDclRefModel = {"EntryResult: word=typeRef/G/ForwardA/A, refs={ 1 }"};
|
||||||
|
|
||||||
if (fwdDclRefResults.length != fwdDclRefModel.length)
|
if (fwdDclRefResults.length != fwdDclRefModel.length)
|
||||||
fail("Entry Result length different from model for forward declarations refs");
|
fail("Entry Result length different from model for forward declarations refs");
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
2004-08-11 Bogdan Gheorghe
|
||||||
|
Fix for Bug 59493: need to refine index query for open-type
|
||||||
|
|
||||||
|
* index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java
|
||||||
|
* index/org/eclipse/cdt/internal/core/search/indexing/IIndexConstants.java
|
||||||
|
* index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexerRequestor.java
|
||||||
|
|
||||||
2004-08-03 Bogdan Gheorghe
|
2004-08-03 Bogdan Gheorghe
|
||||||
|
|
||||||
Fix for Bug 60948: Indexer should pick up all headers in include path
|
Fix for Bug 60948: Indexer should pick up all headers in include path
|
||||||
|
|
|
@ -51,6 +51,9 @@ public abstract class AbstractIndexer implements IIndexer, IIndexConstants, ICSe
|
||||||
final static int TYPEDEF = 6;
|
final static int TYPEDEF = 6;
|
||||||
final static int DERIVED = 7;
|
final static int DERIVED = 7;
|
||||||
final static int FRIEND = 8;
|
final static int FRIEND = 8;
|
||||||
|
final static int FWD_CLASS = 9;
|
||||||
|
final static int FWD_STRUCT = 10;
|
||||||
|
final static int FWD_UNION = 11;
|
||||||
|
|
||||||
public static boolean VERBOSE = false;
|
public static boolean VERBOSE = false;
|
||||||
|
|
||||||
|
@ -241,15 +244,15 @@ public abstract class AbstractIndexer implements IIndexer, IIndexConstants, ICSe
|
||||||
public void addElaboratedForwardDeclaration(IASTElaboratedTypeSpecifier elaboratedType) {
|
public void addElaboratedForwardDeclaration(IASTElaboratedTypeSpecifier elaboratedType) {
|
||||||
if (elaboratedType.getClassKind().equals(ASTClassKind.CLASS))
|
if (elaboratedType.getClassKind().equals(ASTClassKind.CLASS))
|
||||||
{
|
{
|
||||||
this.output.addRef(encodeTypeEntry(elaboratedType.getFullyQualifiedNameCharArrays(),CLASS, ICSearchConstants.DECLARATIONS));
|
this.output.addRef(encodeTypeEntry(elaboratedType.getFullyQualifiedNameCharArrays(),FWD_CLASS, ICSearchConstants.DECLARATIONS));
|
||||||
}
|
}
|
||||||
else if (elaboratedType.getClassKind().equals(ASTClassKind.STRUCT))
|
else if (elaboratedType.getClassKind().equals(ASTClassKind.STRUCT))
|
||||||
{
|
{
|
||||||
this.output.addRef(encodeTypeEntry(elaboratedType.getFullyQualifiedNameCharArrays(),STRUCT, ICSearchConstants.DECLARATIONS));
|
this.output.addRef(encodeTypeEntry(elaboratedType.getFullyQualifiedNameCharArrays(),FWD_STRUCT, ICSearchConstants.DECLARATIONS));
|
||||||
}
|
}
|
||||||
else if (elaboratedType.getClassKind().equals(ASTClassKind.UNION))
|
else if (elaboratedType.getClassKind().equals(ASTClassKind.UNION))
|
||||||
{
|
{
|
||||||
this.output.addRef(encodeTypeEntry(elaboratedType.getFullyQualifiedNameCharArrays(),UNION, ICSearchConstants.DECLARATIONS));
|
this.output.addRef(encodeTypeEntry(elaboratedType.getFullyQualifiedNameCharArrays(),FWD_UNION, ICSearchConstants.DECLARATIONS));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,6 +339,32 @@ public abstract class AbstractIndexer implements IIndexer, IIndexConstants, ICSe
|
||||||
this.output.addRef(encodeTypeEntry(fullyQualifiedName,UNION,ICSearchConstants.REFERENCES));
|
this.output.addRef(encodeTypeEntry(fullyQualifiedName,UNION,ICSearchConstants.REFERENCES));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public void addForwardClassReference(IASTTypeSpecifier reference){
|
||||||
|
char[][] fullyQualifiedName = null;
|
||||||
|
ASTClassKind classKind = null;
|
||||||
|
|
||||||
|
if (reference instanceof IASTElaboratedTypeSpecifier){
|
||||||
|
IASTElaboratedTypeSpecifier typeRef = (IASTElaboratedTypeSpecifier) reference;
|
||||||
|
fullyQualifiedName = typeRef.getFullyQualifiedNameCharArrays();
|
||||||
|
classKind = typeRef.getClassKind();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (classKind == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (classKind.equals(ASTClassKind.CLASS))
|
||||||
|
{
|
||||||
|
this.output.addRef(encodeTypeEntry(fullyQualifiedName,FWD_CLASS, ICSearchConstants.REFERENCES));
|
||||||
|
}
|
||||||
|
else if (classKind.equals(ASTClassKind.STRUCT))
|
||||||
|
{
|
||||||
|
this.output.addRef(encodeTypeEntry(fullyQualifiedName,FWD_STRUCT,ICSearchConstants.REFERENCES));
|
||||||
|
}
|
||||||
|
else if (classKind.equals(ASTClassKind.UNION))
|
||||||
|
{
|
||||||
|
this.output.addRef(encodeTypeEntry(fullyQualifiedName,FWD_UNION,ICSearchConstants.REFERENCES));
|
||||||
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Type entries are encoded as follow: 'typeDecl/' ('C' | 'S' | 'U' | 'E' ) '/' TypeName ['/' Qualifier]*
|
* Type entries are encoded as follow: 'typeDecl/' ('C' | 'S' | 'U' | 'E' ) '/' TypeName ['/' Qualifier]*
|
||||||
*/
|
*/
|
||||||
|
@ -391,6 +420,18 @@ public abstract class AbstractIndexer implements IIndexer, IIndexConstants, ICSe
|
||||||
case(FRIEND):
|
case(FRIEND):
|
||||||
result[pos++]=FRIEND_SUFFIX;
|
result[pos++]=FRIEND_SUFFIX;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case(FWD_CLASS):
|
||||||
|
result[pos++]=FWD_CLASS_SUFFIX;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (FWD_STRUCT):
|
||||||
|
result[pos++]=FWD_STRUCT_SUFFIX;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (FWD_UNION):
|
||||||
|
result[pos++]=FWD_UNION_SUFFIX;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
result[pos++] = SEPARATOR;
|
result[pos++] = SEPARATOR;
|
||||||
//Encode in the following manner
|
//Encode in the following manner
|
||||||
|
@ -509,6 +550,12 @@ public abstract class AbstractIndexer implements IIndexer, IIndexConstants, ICSe
|
||||||
classType = DERIVED_SUFFIX;
|
classType = DERIVED_SUFFIX;
|
||||||
} else if ( searchFor == ICSearchConstants.FRIEND){
|
} else if ( searchFor == ICSearchConstants.FRIEND){
|
||||||
classType = FRIEND_SUFFIX;
|
classType = FRIEND_SUFFIX;
|
||||||
|
} else if ( searchFor == ICSearchConstants.FWD_CLASS) {
|
||||||
|
classType = FWD_CLASS_SUFFIX;
|
||||||
|
} else if ( searchFor == ICSearchConstants.FWD_STRUCT) {
|
||||||
|
classType = FWD_STRUCT_SUFFIX;
|
||||||
|
} else if ( searchFor == ICSearchConstants.FWD_UNION) {
|
||||||
|
classType = FWD_UNION_SUFFIX;
|
||||||
} else {
|
} else {
|
||||||
//could be TYPE or CLASS_STRUCT, best we can do for these is the prefix
|
//could be TYPE or CLASS_STRUCT, best we can do for these is the prefix
|
||||||
return prefix;
|
return prefix;
|
||||||
|
|
|
@ -105,6 +105,9 @@ public interface IIndexConstants {
|
||||||
char TYPEDEF_SUFFIX = 'T';
|
char TYPEDEF_SUFFIX = 'T';
|
||||||
char DERIVED_SUFFIX = 'D';
|
char DERIVED_SUFFIX = 'D';
|
||||||
char FRIEND_SUFFIX = 'F';
|
char FRIEND_SUFFIX = 'F';
|
||||||
|
char FWD_CLASS_SUFFIX = 'G';
|
||||||
|
char FWD_STRUCT_SUFFIX = 'H';
|
||||||
|
char FWD_UNION_SUFFIX = 'I';
|
||||||
|
|
||||||
char TYPE_SUFFIX = 0;
|
char TYPE_SUFFIX = 0;
|
||||||
char SEPARATOR= '/';
|
char SEPARATOR= '/';
|
||||||
|
|
|
@ -364,8 +364,8 @@ public class SourceIndexerRequestor implements ISourceElementRequestor, IIndexCo
|
||||||
indexer.addClassReference((IASTClassSpecifier)reference.getReferencedElement());
|
indexer.addClassReference((IASTClassSpecifier)reference.getReferencedElement());
|
||||||
else if (reference.getReferencedElement() instanceof IASTElaboratedTypeSpecifier)
|
else if (reference.getReferencedElement() instanceof IASTElaboratedTypeSpecifier)
|
||||||
{
|
{
|
||||||
indexer.addClassReference((IASTTypeSpecifier) reference.getReferencedElement());
|
indexer.addForwardClassReference((IASTTypeSpecifier) reference.getReferencedElement());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -1,399 +1,408 @@
|
||||||
2004-06-25 Bogdan Gheorghe
|
2004-08-11 Bogdan Gheorghe
|
||||||
Indirect fix for Bug 65551: [Search] Search for Variable references should not include parameters
|
Fix for Bug 59493: need to refine index query for open-type
|
||||||
Instead of excluding parameter references from searches, added parm declarations to the index (for
|
|
||||||
both functions and methods)
|
* search/org/eclipse/cdt/internal/core/search/ICSearchConstants.java
|
||||||
|
* search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java
|
||||||
* search/org/eclipse/cdt/core/search/BasicSearchResultCollector.java
|
* search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
||||||
* index/org/eclipse/cdt/internal/core/search/matching/MatchLocator.java
|
* search/org/eclipse/cdt/internal/core/search/matching/DerivedTypesPattern.java
|
||||||
|
* search/org/eclipse/cdt/internal/core/search/matching/FriendPattern.java
|
||||||
2004-06-25 Bogdan Gheorghe
|
|
||||||
Fix for 68550: [Indexer] Cannot restart indexer by touching .c/.cpp/.cc files
|
2004-06-25 Bogdan Gheorghe
|
||||||
|
Indirect fix for Bug 65551: [Search] Search for Variable references should not include parameters
|
||||||
* search/org/eclipse/cdt/internal/core/search/processing/JobManager.java
|
Instead of excluding parameter references from searches, added parm declarations to the index (for
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/IndexManager.java
|
both functions and methods)
|
||||||
|
|
||||||
2004-06-24 Bogdan Gheorghe
|
* search/org/eclipse/cdt/core/search/BasicSearchResultCollector.java
|
||||||
Fix for 66695: [Indexer] Manually add an include path to a file/folder
|
* index/org/eclipse/cdt/internal/core/search/matching/MatchLocator.java
|
||||||
is ignored by indexer
|
|
||||||
|
2004-06-25 Bogdan Gheorghe
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/MatchLocator.java
|
Fix for 68550: [Indexer] Cannot restart indexer by touching .c/.cpp/.cc files
|
||||||
|
|
||||||
2004-06-22 Alain Magloire
|
* search/org/eclipse/cdt/internal/core/search/processing/JobManager.java
|
||||||
Part of PR 68246.
|
* index/org/eclipse/cdt/internal/core/search/indexing/IndexManager.java
|
||||||
Close the inputstream to release resource handle
|
|
||||||
when we done with it, we can not rely on the GC to do it for us.
|
2004-06-24 Bogdan Gheorghe
|
||||||
|
Fix for 66695: [Indexer] Manually add an include path to a file/folder
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/MatchLocator.java
|
is ignored by indexer
|
||||||
|
|
||||||
2004-06-21 Bogdan Gheorghe
|
* search/org/eclipse/cdt/internal/core/search/matching/MatchLocator.java
|
||||||
Modified JobManager to change state from waiting to enabled on a job request.
|
|
||||||
|
2004-06-22 Alain Magloire
|
||||||
2004-06-11 Andrew Niefer
|
Part of PR 68246.
|
||||||
fix bugs 43063 & 43498 - better handling of spaces around wild cards in search pattern
|
Close the inputstream to release resource handle
|
||||||
|
when we done with it, we can not rely on the GC to do it for us.
|
||||||
2004-06-10 Andrew Niefer
|
|
||||||
fix bug 64986 - handle Containers in CSearchScope
|
* search/org/eclipse/cdt/internal/core/search/matching/MatchLocator.java
|
||||||
|
|
||||||
2004-05-26 Andrew Niefer
|
2004-06-21 Bogdan Gheorghe
|
||||||
Modified search to use ASTUtil.getFunctionParameterTypes to get the strings to search for
|
Modified JobManager to change state from waiting to enabled on a job request.
|
||||||
functions with specific parameters.
|
|
||||||
|
2004-06-11 Andrew Niefer
|
||||||
2004-05-21 Andrw Niefer
|
fix bugs 43063 & 43498 - better handling of spaces around wild cards in search pattern
|
||||||
fix bug 63478
|
|
||||||
|
2004-06-10 Andrew Niefer
|
||||||
2004-05-21 Andrew Niefer
|
fix bug 64986 - handle Containers in CSearchScope
|
||||||
Indexer problems reporting: group problems under the indexer job in progress view
|
|
||||||
|
2004-05-26 Andrew Niefer
|
||||||
2004-05-21 Andrew Niefer
|
Modified search to use ASTUtil.getFunctionParameterTypes to get the strings to search for
|
||||||
bug 62731 - [Search] typedefs are appearing as union declarations
|
functions with specific parameters.
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java
|
|
||||||
|
2004-05-21 Andrw Niefer
|
||||||
2004-05-21 Bogdan Gheorghe
|
fix bug 63478
|
||||||
bug 63320 - Search does not consider working copies
|
|
||||||
Added a check to turn off indexer timer thread, if number entered is <= 0
|
2004-05-21 Andrew Niefer
|
||||||
|
Indexer problems reporting: group problems under the indexer job in progress view
|
||||||
2004-05-18 Andrew Niefer
|
|
||||||
bug 62651 - indexer job hangs if project deleted from workspace
|
2004-05-21 Andrew Niefer
|
||||||
When we discard jobs, we must downtick the indexing job as well.
|
bug 62731 - [Search] typedefs are appearing as union declarations
|
||||||
* search/org/eclipse/cdt/internal/core/search/processing/IndexingJob.java
|
* search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java
|
||||||
* search/org/eclipse/cdt/internal/core/search/processing/JobManager.java
|
|
||||||
|
2004-05-21 Bogdan Gheorghe
|
||||||
2004-05-17 Bogdan Gheorghe
|
bug 63320 - Search does not consider working copies
|
||||||
Added matching routine to IncludePattern
|
Added a check to turn off indexer timer thread, if number entered is <= 0
|
||||||
|
|
||||||
2004-05-17 Andrew Niefer
|
2004-05-18 Andrew Niefer
|
||||||
bug 61044 - report search matches at the end of each compilation unit
|
bug 62651 - indexer job hangs if project deleted from workspace
|
||||||
|
When we discard jobs, we must downtick the indexing job as well.
|
||||||
2004-05-14 Bogdan Gheorghe
|
* search/org/eclipse/cdt/internal/core/search/processing/IndexingJob.java
|
||||||
bug 60491
|
* search/org/eclipse/cdt/internal/core/search/processing/JobManager.java
|
||||||
Added working copy filtering to search engine
|
|
||||||
From now on only relevent working copies are considered for search
|
2004-05-17 Bogdan Gheorghe
|
||||||
If no index paths are found then search will return no results regardless of any working copies passed in
|
Added matching routine to IncludePattern
|
||||||
|
|
||||||
2004-05-14 Andrew Niefer
|
2004-05-17 Andrew Niefer
|
||||||
bug 56411 - Added IndexingJob show that indexing shows up in the process view
|
bug 61044 - report search matches at the end of each compilation unit
|
||||||
- this allows for the index job to be cancelled, which pauses indexing until someone requests something
|
|
||||||
- if a request was waiting on the indexer and the indexer gets paused from a user canceling it, then the
|
2004-05-14 Bogdan Gheorghe
|
||||||
request is forced immediate.
|
bug 60491
|
||||||
|
Added working copy filtering to search engine
|
||||||
2004-05-06 Bogdan Gheorghe
|
From now on only relevent working copies are considered for search
|
||||||
Added friend to ICSearchConstants
|
If no index paths are found then search will return no results regardless of any working copies passed in
|
||||||
Created IMatchLocator to allow search users to pass in their own match locators
|
|
||||||
Modified CSearchPattern to create friend search pattern
|
2004-05-14 Andrew Niefer
|
||||||
Added Friend pattern
|
bug 56411 - Added IndexingJob show that indexing shows up in the process view
|
||||||
Modified MatchLocator to check for class specifiers upon class exit
|
- this allows for the index job to be cancelled, which pauses indexing until someone requests something
|
||||||
|
- if a request was waiting on the indexer and the indexer gets paused from a user canceling it, then the
|
||||||
2004-04-19 Andrew Niefer
|
request is forced immediate.
|
||||||
speed up BasicSearchMatch.compareTo and .hashCode by reducing number of string objects created.
|
|
||||||
|
2004-05-06 Bogdan Gheorghe
|
||||||
2004-04-12 Bogdan Gheorghe
|
Added friend to ICSearchConstants
|
||||||
Modified FieldDeclarationPattern to work with new Enumerator type, added
|
Created IMatchLocator to allow search users to pass in their own match locators
|
||||||
DerivedTypesPattern.
|
Modified CSearchPattern to create friend search pattern
|
||||||
|
Added Friend pattern
|
||||||
2004-04-05 Andrew Niefer
|
Modified MatchLocator to check for class specifiers upon class exit
|
||||||
fix bug 54169, TYPE includes enum & typedef, handle that in ClassDeclarationPattern.matchLevel
|
|
||||||
|
2004-04-19 Andrew Niefer
|
||||||
2004-03-24 Bogdan Gheorghe
|
speed up BasicSearchMatch.compareTo and .hashCode by reducing number of string objects created.
|
||||||
Modified BasicSearchMatch to keep track of what files contained the match in order
|
|
||||||
to create file links to support external file markers.
|
2004-04-12 Bogdan Gheorghe
|
||||||
|
Modified FieldDeclarationPattern to work with new Enumerator type, added
|
||||||
Modified MatchLocator to pass in the referring file path to BasicSearchMatch if the
|
DerivedTypesPattern.
|
||||||
match has no resource attached to it (ie. the match is external).
|
|
||||||
|
2004-04-05 Andrew Niefer
|
||||||
* search/org/eclipse/cdt/core/search/BasicSearchResultCollector.java
|
fix bug 54169, TYPE includes enum & typedef, handle that in ClassDeclarationPattern.matchLevel
|
||||||
* search/org/eclipse/cdt/core/search/BasicSearchMatch.java
|
|
||||||
* search/org/eclipse/cdt/core/search/ICSearchResultCollector.java
|
2004-03-24 Bogdan Gheorghe
|
||||||
* search/org/eclipse/cdt/core/search/IMatch.java
|
Modified BasicSearchMatch to keep track of what files contained the match in order
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/MatchLocator.java
|
to create file links to support external file markers.
|
||||||
|
|
||||||
|
Modified MatchLocator to pass in the referring file path to BasicSearchMatch if the
|
||||||
2004-03-08 Bogdan Gheorghe
|
match has no resource attached to it (ie. the match is external).
|
||||||
BasicSearchResultCollector patch from Chris Wiebe - adds setProgressMonitor method,
|
|
||||||
cleans up some of the CoreException warnings
|
* search/org/eclipse/cdt/core/search/BasicSearchResultCollector.java
|
||||||
|
* search/org/eclipse/cdt/core/search/BasicSearchMatch.java
|
||||||
2004-02-16 Andrew Niefer
|
* search/org/eclipse/cdt/core/search/ICSearchResultCollector.java
|
||||||
fixed a couple of warnings
|
* search/org/eclipse/cdt/core/search/IMatch.java
|
||||||
moved OrPattern from org.eclipse.cdt.internal.core.search.matching to org.eclipse.cdt.core.search
|
* search/org/eclipse/cdt/internal/core/search/matching/MatchLocator.java
|
||||||
changed SearchEngine.search & MatchLocator.locateMatches to throw InterruptedException when cancelled
|
|
||||||
updates calls to search to handle InterruptedException
|
|
||||||
|
2004-03-08 Bogdan Gheorghe
|
||||||
2004-02-13 Bogdan Gheorghe
|
BasicSearchResultCollector patch from Chris Wiebe - adds setProgressMonitor method,
|
||||||
- Added error handling to MatchLocator.locateMatches to handle possible
|
cleans up some of the CoreException warnings
|
||||||
parser failures.
|
|
||||||
|
2004-02-16 Andrew Niefer
|
||||||
2004-02-06 Bogdan Gheorghe
|
fixed a couple of warnings
|
||||||
|
moved OrPattern from org.eclipse.cdt.internal.core.search.matching to org.eclipse.cdt.core.search
|
||||||
- Modified CSearchPattern.scanforParameters. If no parameters are passed in
|
changed SearchEngine.search & MatchLocator.locateMatches to throw InterruptedException when cancelled
|
||||||
as part of a function/method search, void is assigned as a parameter type.
|
updates calls to search to handle InterruptedException
|
||||||
|
|
||||||
- Modified MethodDeclarationPattern to check for void parameter types
|
2004-02-13 Bogdan Gheorghe
|
||||||
|
- Added error handling to MatchLocator.locateMatches to handle possible
|
||||||
2004-02-05 Alain Magloire
|
parser failures.
|
||||||
PR 51221
|
|
||||||
Reformat Patch from Bogdan base on Thomas Fletcher original patch
|
2004-02-06 Bogdan Gheorghe
|
||||||
In a nutshell, it moves the search operation into a runnable which
|
|
||||||
can be passed to a progress dialog.
|
- Modified CSearchPattern.scanforParameters. If no parameters are passed in
|
||||||
|
as part of a function/method search, void is assigned as a parameter type.
|
||||||
* search/org/eclipse/cdt/core/search/BasicSearchResultCollector.java
|
|
||||||
|
- Modified MethodDeclarationPattern to check for void parameter types
|
||||||
2004-01-26 John Camelon
|
|
||||||
Updated clients to use new Scanner logging service.
|
2004-02-05 Alain Magloire
|
||||||
|
PR 51221
|
||||||
2003-10-23 Bogdan Gheorghe
|
Reformat Patch from Bogdan base on Thomas Fletcher original patch
|
||||||
|
In a nutshell, it moves the search operation into a runnable which
|
||||||
- Added AcceptMatchOperation to get around Bug 45324. The search
|
can be passed to a progress dialog.
|
||||||
operation is no longer a WorkspaceModifyOperation (which used to
|
|
||||||
lock the workspace for the duration of search). Instead, we now
|
* search/org/eclipse/cdt/core/search/BasicSearchResultCollector.java
|
||||||
lock the workspace only when we tag the resources with markers.
|
|
||||||
|
2004-01-26 John Camelon
|
||||||
- Modified SearchEngine : we now receive a list of matches
|
Updated clients to use new Scanner logging service.
|
||||||
from the search that we pass into the AcceptMatchOperation.
|
|
||||||
|
2003-10-23 Bogdan Gheorghe
|
||||||
- Modified MatchLocator to add matches to passed in list instead
|
|
||||||
of reporting them right away
|
- Added AcceptMatchOperation to get around Bug 45324. The search
|
||||||
|
operation is no longer a WorkspaceModifyOperation (which used to
|
||||||
- Modified JobManager: -added in jobToIgnore parm to unblock dependency
|
lock the workspace for the duration of search). Instead, we now
|
||||||
jobs
|
lock the workspace only when we tag the resources with markers.
|
||||||
|
|
||||||
|
- Modified SearchEngine : we now receive a list of matches
|
||||||
2003-10-06 Bogdan Gheorghe
|
from the search that we pass into the AcceptMatchOperation.
|
||||||
- added createCFileSearchScope() to SearchEngine.java to improve
|
|
||||||
code complete performance
|
- Modified MatchLocator to add matches to passed in list instead
|
||||||
|
of reporting them right away
|
||||||
2003-10-01 Andrew Niefer
|
|
||||||
- fix bug 44026 by checking scope before reporting match in MatchLocator.report
|
- Modified JobManager: -added in jobToIgnore parm to unblock dependency
|
||||||
|
jobs
|
||||||
2003-10-01 Andrew Niefer
|
|
||||||
- fix BasicSearchMatch.equals() for bug43988
|
|
||||||
|
2003-10-06 Bogdan Gheorghe
|
||||||
2003-09-30 Bogdan Gheorghe
|
- added createCFileSearchScope() to SearchEngine.java to improve
|
||||||
- changed logging in JobManager to use new ICLogConstants
|
code complete performance
|
||||||
|
|
||||||
2003-09-30 Andrew Niefer
|
2003-10-01 Andrew Niefer
|
||||||
-fix bug43862 - Cannot find macro delcarations using all occurences.
|
- fix bug 44026 by checking scope before reporting match in MatchLocator.report
|
||||||
* modified CSearchPattern.createMacroPattern
|
|
||||||
|
2003-10-01 Andrew Niefer
|
||||||
2003-09-29 Andrew Niefer
|
- fix BasicSearchMatch.equals() for bug43988
|
||||||
- fix bug 43062 outline is confused on operator methods containing spaces
|
|
||||||
- modify CSearchPattern.scanForNames to use same naming convention as TokenDuple.toString()
|
2003-09-30 Bogdan Gheorghe
|
||||||
- modify MatchLocator.report to use IASTOffsetableNamedElement.getNameEndOffset()
|
- changed logging in JobManager to use new ICLogConstants
|
||||||
|
|
||||||
2003-09-29 Andrew Niefer
|
2003-09-30 Andrew Niefer
|
||||||
-bug42911 - Search: cannot find beyond use of data member
|
-fix bug43862 - Cannot find macro delcarations using all occurences.
|
||||||
- fix NPE's in BasicSearchMatch.equals & hashCode
|
* modified CSearchPattern.createMacroPattern
|
||||||
|
|
||||||
2003-09-29 Andrew Niefer
|
2003-09-29 Andrew Niefer
|
||||||
-fix NPE if IScannerInfoProvider returns null IScannerInfo
|
- fix bug 43062 outline is confused on operator methods containing spaces
|
||||||
|
- modify CSearchPattern.scanForNames to use same naming convention as TokenDuple.toString()
|
||||||
2003-09-25 Andrew Niefer
|
- modify MatchLocator.report to use IASTOffsetableNamedElement.getNameEndOffset()
|
||||||
- bug43129 - Cannot search for definitions of global variables
|
|
||||||
- check definitions for variables, fields, enumerators and namespaces
|
2003-09-29 Andrew Niefer
|
||||||
- handle enter/exitLinkageSpecification
|
-bug42911 - Search: cannot find beyond use of data member
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/MatchLocator.java
|
- fix NPE's in BasicSearchMatch.equals & hashCode
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
|
||||||
|
2003-09-29 Andrew Niefer
|
||||||
2003-09-25 Bogdan Gheorghe
|
-fix NPE if IScannerInfoProvider returns null IScannerInfo
|
||||||
- added SearchFor INCLUDE in ICSearchConstants
|
|
||||||
- added acceptIncludeDeclaration to IIndexSearchRequestor
|
2003-09-25 Andrew Niefer
|
||||||
- modified PathCollector to acceptIncludeDeclarations
|
- bug43129 - Cannot search for definitions of global variables
|
||||||
- modified CSearchPattern to create an IncludePattern
|
- check definitions for variables, fields, enumerators and namespaces
|
||||||
- added IncludePattern.java
|
- handle enter/exitLinkageSpecification
|
||||||
|
* search/org/eclipse/cdt/internal/core/search/matching/MatchLocator.java
|
||||||
2003-09-25 Andrew Niefer
|
* search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
||||||
- partial fix for 43664 Modify Matchlocator to not try and create a link if we have no
|
|
||||||
resource, instead just use the path
|
2003-09-25 Bogdan Gheorghe
|
||||||
|
- added SearchFor INCLUDE in ICSearchConstants
|
||||||
2003-09-23 Andrew Niefer
|
- added acceptIncludeDeclaration to IIndexSearchRequestor
|
||||||
fix bug 43498 Search with ? fails on first letter of second word
|
- modified PathCollector to acceptIncludeDeclarations
|
||||||
-modifications to CSearchPattern.scanForNames()
|
- modified CSearchPattern to create an IncludePattern
|
||||||
-add getSimpleName to MethodDeclarationPattern
|
- added IncludePattern.java
|
||||||
|
|
||||||
2003-09-19 Andrew Niefer
|
2003-09-25 Andrew Niefer
|
||||||
fix bug 43327 Code Complete finds local variables
|
- partial fix for 43664 Modify Matchlocator to not try and create a link if we have no
|
||||||
- modified MatchLocator to not report local declarations when boolean is set
|
resource, instead just use the path
|
||||||
- modified SearchEngine.search to take an additional parameter "excludeLocalDeclarations"
|
|
||||||
|
2003-09-23 Andrew Niefer
|
||||||
2003-09-15 Andrew Niefer
|
fix bug 43498 Search with ? fails on first letter of second word
|
||||||
- modify CSearchPattern to handle escaping wildcards (bug43063)
|
-modifications to CSearchPattern.scanForNames()
|
||||||
- modify enterFunctionBody and enterMethodBody to fix bug42979
|
-add getSimpleName to MethodDeclarationPattern
|
||||||
- search for Parameter References
|
|
||||||
|
2003-09-19 Andrew Niefer
|
||||||
2003-09-13 Andrew Niefer
|
fix bug 43327 Code Complete finds local variables
|
||||||
-Searching for Typedefs: (bug42902)
|
- modified MatchLocator to not report local declarations when boolean is set
|
||||||
- modified setElementInfo in BasicSearchResultCollector
|
- modified SearchEngine.search to take an additional parameter "excludeLocalDeclarations"
|
||||||
- added TYPEDEF to ICSearchConstants
|
|
||||||
- modified CSearchPattern & ClassDeclarationPattern
|
2003-09-15 Andrew Niefer
|
||||||
- implemented acceptTypedef* in MatchLocator
|
- modify CSearchPattern to handle escaping wildcards (bug43063)
|
||||||
- modified BasicSearchMatch to implement Comparable
|
- modify enterFunctionBody and enterMethodBody to fix bug42979
|
||||||
|
- search for Parameter References
|
||||||
2003-09-11 Andrew Niefer
|
|
||||||
- Modified ICSearchResultCollector.createMatch to not take a parent parameter
|
2003-09-13 Andrew Niefer
|
||||||
- modified BasicSearchResultCollector to create the parent string from the fully qualified name of the node
|
-Searching for Typedefs: (bug42902)
|
||||||
- modified MatchLocator to keep track of most recent declaration for reporting purposes
|
- modified setElementInfo in BasicSearchResultCollector
|
||||||
- modified MatchLocator.report to use the most recent declaration
|
- added TYPEDEF to ICSearchConstants
|
||||||
|
- modified CSearchPattern & ClassDeclarationPattern
|
||||||
2003-09-09 Andrew Niefer
|
- implemented acceptTypedef* in MatchLocator
|
||||||
pattern matching on function parameters:
|
- modified BasicSearchMatch to implement Comparable
|
||||||
- modified scanForParameters in CSearchPattern
|
|
||||||
- added getParamString in CSearchPattern
|
2003-09-11 Andrew Niefer
|
||||||
- modified matchLevel in MethodDeclarationPattern
|
- Modified ICSearchResultCollector.createMatch to not take a parent parameter
|
||||||
|
- modified BasicSearchResultCollector to create the parent string from the fully qualified name of the node
|
||||||
Enumeration references
|
- modified MatchLocator to keep track of most recent declaration for reporting purposes
|
||||||
- modified acceptEnumeratorReference in MatchLocator
|
- modified MatchLocator.report to use the most recent declaration
|
||||||
|
|
||||||
2003-09-05 Andrew Niefer
|
2003-09-09 Andrew Niefer
|
||||||
- fix searching for enumerators
|
pattern matching on function parameters:
|
||||||
|
- modified scanForParameters in CSearchPattern
|
||||||
2003-09-03 Andrew Niefer
|
- added getParamString in CSearchPattern
|
||||||
- added CLASS_STRUCT to the SearchFor constants
|
- modified matchLevel in MethodDeclarationPattern
|
||||||
- Modified CSearchPattern to handle CLASS_STRUCT
|
|
||||||
|
Enumeration references
|
||||||
2003-08-26 Bogdan Gheorghe
|
- modified acceptEnumeratorReference in MatchLocator
|
||||||
- Added debug tracing statements to SearchEngine
|
|
||||||
- Modified scanForNames in CSearchPattern to treat append
|
2003-09-05 Andrew Niefer
|
||||||
a token after "~" to allow for destructors search
|
- fix searching for enumerators
|
||||||
- Added scope checking to MatchLocator
|
|
||||||
- Added debug trace statements to MatchLocator
|
2003-09-03 Andrew Niefer
|
||||||
|
- added CLASS_STRUCT to the SearchFor constants
|
||||||
2003-08-20 Bogdan Gheorghe
|
- Modified CSearchPattern to handle CLASS_STRUCT
|
||||||
- Changed matching and reporting functions to handle nodes
|
|
||||||
of type IElaboratedTypeSpecifier
|
2003-08-26 Bogdan Gheorghe
|
||||||
|
- Added debug tracing statements to SearchEngine
|
||||||
2003-08-12 Bogdan Gheorghe
|
- Modified scanForNames in CSearchPattern to treat append
|
||||||
- Rolled field and variable search patterns into one pattern, in
|
a token after "~" to allow for destructors search
|
||||||
order to allow for qualified var searches
|
- Added scope checking to MatchLocator
|
||||||
|
- Added debug trace statements to MatchLocator
|
||||||
2003-08-11 Andrew Niefer
|
|
||||||
- Added Macro ICSearchConstant
|
2003-08-20 Bogdan Gheorghe
|
||||||
- Added acceptMacro to IIndexSearchRequestor and PathCollector
|
- Changed matching and reporting functions to handle nodes
|
||||||
- Added MacroDeclaration Pattern
|
of type IElaboratedTypeSpecifier
|
||||||
- Rolled method and function patterns into one method pattern
|
|
||||||
- Added WorkingCopy support to search
|
2003-08-12 Bogdan Gheorghe
|
||||||
|
- Rolled field and variable search patterns into one pattern, in
|
||||||
2003-08-08 Bogdan Gheorghe
|
order to allow for qualified var searches
|
||||||
- Added CreateSearchScope to create a search scope out of
|
|
||||||
CElements
|
2003-08-11 Andrew Niefer
|
||||||
- Filled out CSearchScope to enable:
|
- Added Macro ICSearchConstant
|
||||||
- adding a project to scope, include referenced projects
|
- Added acceptMacro to IIndexSearchRequestor and PathCollector
|
||||||
- adding individual CElements to scope
|
- Added MacroDeclaration Pattern
|
||||||
|
- Rolled method and function patterns into one method pattern
|
||||||
2003-08-08 Andrew Niefer
|
- Added WorkingCopy support to search
|
||||||
- add function parameter information to search results
|
|
||||||
|
2003-08-08 Bogdan Gheorghe
|
||||||
2003-08-06 Andrew Niefer
|
- Added CreateSearchScope to create a search scope out of
|
||||||
- Create OrPattern which matches for search if any of its constituent patterns matches
|
CElements
|
||||||
- modified MatchLocator to support the OrPattern
|
- Filled out CSearchScope to enable:
|
||||||
- searching for All occurences now uses the OrPattern
|
- adding a project to scope, include referenced projects
|
||||||
|
- adding individual CElements to scope
|
||||||
2003-08-01 Andrew Niefer
|
|
||||||
- Modified BasicSearchResultCollector to only accept matches it has not already seen
|
2003-08-08 Andrew Niefer
|
||||||
- fixed bug in finding a resource when entering includes
|
- add function parameter information to search results
|
||||||
|
|
||||||
2003-07-29 Andrew Niefer
|
2003-08-06 Andrew Niefer
|
||||||
Refactoring Search result collection:
|
- Create OrPattern which matches for search if any of its constituent patterns matches
|
||||||
- Modified ICSearchResultCollector
|
- modified MatchLocator to support the OrPattern
|
||||||
- Modified IMatch
|
- searching for All occurences now uses the OrPattern
|
||||||
- Modified MatchLocator to reflect changes in ICSearchResultCollector
|
|
||||||
- Created BasicSearchMatch implements IMatch
|
2003-08-01 Andrew Niefer
|
||||||
- Created BasicSearchResultCollector implements ICSearchResultCollector
|
- Modified BasicSearchResultCollector to only accept matches it has not already seen
|
||||||
|
- fixed bug in finding a resource when entering includes
|
||||||
2003-07-28 Andrew Niefer
|
|
||||||
- added abstract CSearchPattern.resetIndexInfo fix bug with searching with globally
|
2003-07-29 Andrew Niefer
|
||||||
qualified names
|
Refactoring Search result collection:
|
||||||
- fixed bug in CSearchPattern.matchQualifications to do with globally qualified names
|
- Modified ICSearchResultCollector
|
||||||
- fixed bug in CSearchPattern.createFunctionPattern to do with parameter lists.
|
- Modified IMatch
|
||||||
|
- Modified MatchLocator to reflect changes in ICSearchResultCollector
|
||||||
2003-07-25 Bogdan Gheorghe
|
- Created BasicSearchMatch implements IMatch
|
||||||
- Added refs to PathCollector
|
- Created BasicSearchResultCollector implements ICSearchResultCollector
|
||||||
- Filled in feedIndexRequestor for the new search patterns
|
|
||||||
- Fixed the FunctionDeclarationPattern to work with no parms
|
2003-07-28 Andrew Niefer
|
||||||
|
- added abstract CSearchPattern.resetIndexInfo fix bug with searching with globally
|
||||||
2003-07-24 Andrew Niefer
|
qualified names
|
||||||
- Implemented decodeIndexEntry & matchIndexEntry for all patterns
|
- fixed bug in CSearchPattern.matchQualifications to do with globally qualified names
|
||||||
- changed MatchLocator to use a COMPLETE_PARSE.
|
- fixed bug in CSearchPattern.createFunctionPattern to do with parameter lists.
|
||||||
|
|
||||||
2003-07-23 Andrew Niefer
|
2003-07-25 Bogdan Gheorghe
|
||||||
-Changed ICSearchPattern.matchLevel to take a ISourceElementCallbackDelegate
|
- Added refs to PathCollector
|
||||||
-Changed ICSearchResultCollector.createMatch to take a ISourceElementCallbackDelegate
|
- Filled in feedIndexRequestor for the new search patterns
|
||||||
-first implementations of:
|
- Fixed the FunctionDeclarationPattern to work with no parms
|
||||||
-CSearchPattern.createFunctionPattern
|
|
||||||
-CSearchPattern.createVariablePattern
|
2003-07-24 Andrew Niefer
|
||||||
-CSearchPattern.createMethodPattern
|
- Implemented decodeIndexEntry & matchIndexEntry for all patterns
|
||||||
-preliminary matching for remaining patterns
|
- changed MatchLocator to use a COMPLETE_PARSE.
|
||||||
-handling of remaining parser callbacks
|
|
||||||
-generating index Prefixes for the patterns
|
2003-07-23 Andrew Niefer
|
||||||
|
-Changed ICSearchPattern.matchLevel to take a ISourceElementCallbackDelegate
|
||||||
2003-07-14 Andrew Niefer
|
-Changed ICSearchResultCollector.createMatch to take a ISourceElementCallbackDelegate
|
||||||
-Modified SearchFor instances in ICSearchConstants to more closely match what we are searching for
|
-first implementations of:
|
||||||
-added IMatch interface, it represents matches found by the search engine, implementors can store
|
-CSearchPattern.createFunctionPattern
|
||||||
whatever information they like, see ICSearchResultCollector::createMatch
|
-CSearchPattern.createVariablePattern
|
||||||
-added createMatch to the ICSearchResultCollector interface, the result collector is responsible for
|
-CSearchPattern.createMethodPattern
|
||||||
implementing IMatch to store whatever data they want out of the AST nodes.
|
-preliminary matching for remaining patterns
|
||||||
-added skeleton patterns:
|
-handling of remaining parser callbacks
|
||||||
search/org/eclipse/cdt/internal/core/search/matching/FieldDeclarationPattern.java
|
-generating index Prefixes for the patterns
|
||||||
search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java
|
|
||||||
search/org/eclipse/cdt/internal/core/search/matching/MethodDeclarationPattern.java
|
2003-07-14 Andrew Niefer
|
||||||
search/org/eclipse/cdt/internal/core/search/matching/NamespaceDeclarationPattern.java
|
-Modified SearchFor instances in ICSearchConstants to more closely match what we are searching for
|
||||||
search/org/eclipse/cdt/internal/core/search/matching/VariableDeclarationPattern.java
|
-added IMatch interface, it represents matches found by the search engine, implementors can store
|
||||||
-added beginnings of CSearchPattern::create*Pattern functions
|
whatever information they like, see ICSearchResultCollector::createMatch
|
||||||
-modifications to MatchLocator to keep track of current scope
|
-added createMatch to the ICSearchResultCollector interface, the result collector is responsible for
|
||||||
-added CSearchPattern::matchQualifications
|
implementing IMatch to store whatever data they want out of the AST nodes.
|
||||||
|
-added skeleton patterns:
|
||||||
2003-07-10 Bogdan Gheorghe
|
search/org/eclipse/cdt/internal/core/search/matching/FieldDeclarationPattern.java
|
||||||
Provided implementation for ICSearchScope.java, CSearchScope.java
|
search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java
|
||||||
|
search/org/eclipse/cdt/internal/core/search/matching/MethodDeclarationPattern.java
|
||||||
Hooked up new CWorkspaceScope, PathCollector, PatternSearchJob in SearchEngine.java
|
search/org/eclipse/cdt/internal/core/search/matching/NamespaceDeclarationPattern.java
|
||||||
|
search/org/eclipse/cdt/internal/core/search/matching/VariableDeclarationPattern.java
|
||||||
Provided implementation for PatternSearchJob.java - PatternSearchJob is where the first part
|
-added beginnings of CSearchPattern::create*Pattern functions
|
||||||
of the search occurs - using an IndexSelector to filter the indexes, it gets the indexes from
|
-modifications to MatchLocator to keep track of current scope
|
||||||
the IndexManager and then uses the passed in pattern to find the index matched. Once it finds
|
-added CSearchPattern::matchQualifications
|
||||||
an index match it adds the file path to the PathCollector.
|
|
||||||
|
2003-07-10 Bogdan Gheorghe
|
||||||
Modified CSearchPattern - added support to find index entries.
|
Provided implementation for ICSearchScope.java, CSearchScope.java
|
||||||
|
|
||||||
Modified ClassDeclarationPattern - added support to decode, match and report
|
Hooked up new CWorkspaceScope, PathCollector, PatternSearchJob in SearchEngine.java
|
||||||
index entries.
|
|
||||||
|
Provided implementation for PatternSearchJob.java - PatternSearchJob is where the first part
|
||||||
|
of the search occurs - using an IndexSelector to filter the indexes, it gets the indexes from
|
||||||
Added:
|
the IndexManager and then uses the passed in pattern to find the index matched. Once it finds
|
||||||
* search/org/eclipse/cdt/internal/core/search/CWorkspaceScope.java
|
an index match it adds the file path to the PathCollector.
|
||||||
* search/org/eclipse/cdt/internal/core/search/IIndexSearchRequestor.java
|
|
||||||
* search/org/eclipse/cdt/internal/core/search/IndexSelector.java
|
Modified CSearchPattern - added support to find index entries.
|
||||||
* search/org/eclipse/cdt/internal/core/search/PathCollector.java
|
|
||||||
|
Modified ClassDeclarationPattern - added support to decode, match and report
|
||||||
Modified:
|
index entries.
|
||||||
* search/org/eclipse/cdt/core/search/ICSearchScope.java
|
|
||||||
* search/org/eclipse/cdt/core/search/SearchEngine.java
|
|
||||||
* search/org/eclipse/cdt/internal/core/search/CSearchScope.java
|
Added:
|
||||||
* search/org/eclipse/cdt/internal/core/search/PatternSearchJob.java
|
* search/org/eclipse/cdt/internal/core/search/CWorkspaceScope.java
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java
|
* search/org/eclipse/cdt/internal/core/search/IIndexSearchRequestor.java
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
* search/org/eclipse/cdt/internal/core/search/IndexSelector.java
|
||||||
|
* search/org/eclipse/cdt/internal/core/search/PathCollector.java
|
||||||
2003-07-04 Andrew Niefer
|
|
||||||
Modified ICSearchConstants to use new nested classes SearchFor and LimitTo instead of int
|
Modified:
|
||||||
for stronger type safety
|
* search/org/eclipse/cdt/core/search/ICSearchScope.java
|
||||||
|
* search/org/eclipse/cdt/core/search/SearchEngine.java
|
||||||
Updated MatchLocator to invoke parser to do actual search.
|
* search/org/eclipse/cdt/internal/core/search/CSearchScope.java
|
||||||
|
* search/org/eclipse/cdt/internal/core/search/PatternSearchJob.java
|
||||||
2003-06-27 Andrew Niefer
|
* search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java
|
||||||
Modified:
|
* search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
||||||
search/org.eclipse.cdt.core.search.matching/MatchLocator.java
|
|
||||||
- enter/exitInclusion
|
2003-07-04 Andrew Niefer
|
||||||
- enterClassSpecifier
|
Modified ICSearchConstants to use new nested classes SearchFor and LimitTo instead of int
|
||||||
search/org.eclipse.cdt.core.search.matching/CSearchPattern.java
|
for stronger type safety
|
||||||
- createClassPattern
|
|
||||||
- matchesName
|
Updated MatchLocator to invoke parser to do actual search.
|
||||||
search/org.eclipse.cdt.core.search.matching/ClassDeclarationPattern.java
|
|
||||||
- matchLevel
|
2003-06-27 Andrew Niefer
|
||||||
search/org.eclipse.cdt.core.search/ICSearchPattern.java
|
Modified:
|
||||||
search/org.eclipse.cdt.core.search/ICSearchResultCollector.java
|
search/org.eclipse.cdt.core.search.matching/MatchLocator.java
|
||||||
search/org.eclipse.cdt.core.search/SearchEngine.java
|
- enter/exitInclusion
|
||||||
|
- enterClassSpecifier
|
||||||
2003-06-25 Bogdan Gheorghe
|
search/org.eclipse.cdt.core.search.matching/CSearchPattern.java
|
||||||
Modified:
|
- createClassPattern
|
||||||
* search/org/eclipse/cdt/core/search/ICSearchConstants.java
|
- matchesName
|
||||||
* search/org/eclipse/cdt/internal/core/search/Utils.java
|
search/org.eclipse.cdt.core.search.matching/ClassDeclarationPattern.java
|
||||||
- moved to index/org/eclipse/cdt/internal/core/search/Utils.java
|
- matchLevel
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
search/org.eclipse.cdt.core.search/ICSearchPattern.java
|
||||||
* search/org/eclipse/cdt/internal/core/search/processing/IJob.java
|
search/org.eclipse.cdt.core.search/ICSearchResultCollector.java
|
||||||
|
search/org.eclipse.cdt.core.search/SearchEngine.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
|
|
@ -107,6 +107,12 @@ public interface ICSearchConstants {
|
||||||
|
|
||||||
public static final SearchFor FRIEND = new SearchFor( 16 );
|
public static final SearchFor FRIEND = new SearchFor( 16 );
|
||||||
|
|
||||||
|
public static final SearchFor FWD_CLASS = new SearchFor ( 17 );
|
||||||
|
|
||||||
|
public static final SearchFor FWD_STRUCT = new SearchFor ( 18 );
|
||||||
|
|
||||||
|
public static final SearchFor FWD_UNION = new SearchFor ( 19 );
|
||||||
|
|
||||||
/* Nature of match */
|
/* Nature of match */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -110,6 +110,7 @@ public abstract class CSearchPattern implements ICSearchConstants, ICSearchPatte
|
||||||
|
|
||||||
CSearchPattern pattern = null;
|
CSearchPattern pattern = null;
|
||||||
if( searchFor == TYPE || searchFor == CLASS || searchFor == STRUCT ||
|
if( searchFor == TYPE || searchFor == CLASS || searchFor == STRUCT ||
|
||||||
|
searchFor == FWD_CLASS || searchFor == FWD_STRUCT || searchFor == FWD_UNION ||
|
||||||
searchFor == ENUM || searchFor == UNION || searchFor == CLASS_STRUCT ||
|
searchFor == ENUM || searchFor == UNION || searchFor == CLASS_STRUCT ||
|
||||||
searchFor == TYPEDEF )
|
searchFor == TYPEDEF )
|
||||||
{
|
{
|
||||||
|
@ -344,6 +345,11 @@ public abstract class CSearchPattern implements ICSearchConstants, ICSearchPatte
|
||||||
return orPattern;
|
return orPattern;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean isForward = false;
|
||||||
|
if (searchFor == FWD_CLASS || searchFor == FWD_STRUCT || searchFor == FWD_UNION){
|
||||||
|
isForward = true;
|
||||||
|
}
|
||||||
|
|
||||||
char [] patternArray = patternString.toCharArray();
|
char [] patternArray = patternString.toCharArray();
|
||||||
|
|
||||||
IScanner scanner =null;
|
IScanner scanner =null;
|
||||||
|
@ -393,7 +399,7 @@ public abstract class CSearchPattern implements ICSearchConstants, ICSearchPatte
|
||||||
char[] name = (char [])list.removeLast();
|
char[] name = (char [])list.removeLast();
|
||||||
char [][] qualifications = new char[0][];
|
char [][] qualifications = new char[0][];
|
||||||
|
|
||||||
return new ClassDeclarationPattern( name, (char[][])list.toArray( qualifications ), searchFor, limitTo, matchMode, caseSensitive );
|
return new ClassDeclarationPattern( name, (char[][])list.toArray( qualifications ), searchFor, limitTo, matchMode, caseSensitive, isForward );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -42,9 +42,10 @@ public class ClassDeclarationPattern extends CSearchPattern {
|
||||||
// super( matchMode, caseSensitive, DECLARATIONS );
|
// super( matchMode, caseSensitive, DECLARATIONS );
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public ClassDeclarationPattern( char[] name, char[][] containers, SearchFor searchFor, LimitTo limit, int mode, boolean caseSensitive ){
|
public ClassDeclarationPattern( char[] name, char[][] containers, SearchFor searchFor, LimitTo limit, int mode, boolean caseSensitive, boolean isForward ){
|
||||||
super( mode, caseSensitive, limit );
|
super( mode, caseSensitive, limit );
|
||||||
|
|
||||||
|
this.isForward = isForward;
|
||||||
simpleName = caseSensitive ? name : CharOperation.toLowerCase( name );
|
simpleName = caseSensitive ? name : CharOperation.toLowerCase( name );
|
||||||
if( caseSensitive || containers == null ){
|
if( caseSensitive || containers == null ){
|
||||||
qualifications = containers;
|
qualifications = containers;
|
||||||
|
@ -58,13 +59,13 @@ public class ClassDeclarationPattern extends CSearchPattern {
|
||||||
|
|
||||||
this.searchFor = searchFor;
|
this.searchFor = searchFor;
|
||||||
|
|
||||||
if( searchFor == CLASS ){
|
if( searchFor == CLASS || searchFor == FWD_CLASS ){
|
||||||
classKind = ASTClassKind.CLASS;
|
classKind = ASTClassKind.CLASS;
|
||||||
} else if( searchFor == STRUCT ) {
|
} else if( searchFor == STRUCT || searchFor == FWD_STRUCT) {
|
||||||
classKind = ASTClassKind.STRUCT;
|
classKind = ASTClassKind.STRUCT;
|
||||||
} else if ( searchFor == ENUM ) {
|
} else if ( searchFor == ENUM ) {
|
||||||
classKind = ASTClassKind.ENUM;
|
classKind = ASTClassKind.ENUM;
|
||||||
} else if ( searchFor == UNION ) {
|
} else if ( searchFor == UNION || searchFor == FWD_UNION ) {
|
||||||
classKind = ASTClassKind.UNION;
|
classKind = ASTClassKind.UNION;
|
||||||
} else {
|
} else {
|
||||||
classKind = null;
|
classKind = null;
|
||||||
|
@ -86,6 +87,11 @@ public class ClassDeclarationPattern extends CSearchPattern {
|
||||||
if( ! canAccept( limit ) )
|
if( ! canAccept( limit ) )
|
||||||
return IMPOSSIBLE_MATCH;
|
return IMPOSSIBLE_MATCH;
|
||||||
|
|
||||||
|
if ((node instanceof IASTElaboratedTypeSpecifier &&!isForward)||
|
||||||
|
(node instanceof IASTClassSpecifier && isForward)){
|
||||||
|
return IMPOSSIBLE_MATCH;
|
||||||
|
}
|
||||||
|
|
||||||
char[] nodeName = null;
|
char[] nodeName = null;
|
||||||
if (node instanceof IASTElaboratedTypeSpecifier)
|
if (node instanceof IASTElaboratedTypeSpecifier)
|
||||||
{
|
{
|
||||||
|
@ -145,6 +151,7 @@ public class ClassDeclarationPattern extends CSearchPattern {
|
||||||
protected char[] decodedSimpleName;
|
protected char[] decodedSimpleName;
|
||||||
private char[][] decodedContainingTypes;
|
private char[][] decodedContainingTypes;
|
||||||
protected char decodedType;
|
protected char decodedType;
|
||||||
|
protected boolean isForward;
|
||||||
|
|
||||||
|
|
||||||
public void feedIndexRequestor(IIndexSearchRequestor requestor, int detailLevel, int[] references, IndexInput input, ICSearchScope scope) throws IOException {
|
public void feedIndexRequestor(IIndexSearchRequestor requestor, int detailLevel, int[] references, IndexInput input, ICSearchScope scope) throws IOException {
|
||||||
|
@ -213,15 +220,18 @@ public class ClassDeclarationPattern extends CSearchPattern {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else if( classKind == ASTClassKind.CLASS ) {
|
} else if( classKind == ASTClassKind.CLASS ) {
|
||||||
if( decodedType != CLASS_SUFFIX ){
|
if( decodedType != CLASS_SUFFIX &&
|
||||||
|
decodedType != FWD_CLASS_SUFFIX){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else if ( classKind == ASTClassKind.STRUCT ) {
|
} else if ( classKind == ASTClassKind.STRUCT ) {
|
||||||
if( decodedType != STRUCT_SUFFIX ){
|
if( decodedType != STRUCT_SUFFIX &&
|
||||||
|
decodedType != FWD_STRUCT_SUFFIX){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else if ( classKind == ASTClassKind.UNION ) {
|
} else if ( classKind == ASTClassKind.UNION ) {
|
||||||
if( decodedType != UNION_SUFFIX ){
|
if( decodedType != UNION_SUFFIX &&
|
||||||
|
decodedType != FWD_UNION_SUFFIX){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else if ( classKind == ASTClassKind.ENUM ) {
|
} else if ( classKind == ASTClassKind.ENUM ) {
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class DerivedTypesPattern extends ClassDeclarationPattern {
|
||||||
* @param caseSensitive
|
* @param caseSensitive
|
||||||
*/
|
*/
|
||||||
public DerivedTypesPattern(char[] name, char[][] containers, SearchFor searchFor, LimitTo limit, int mode, boolean caseSensitive) {
|
public DerivedTypesPattern(char[] name, char[][] containers, SearchFor searchFor, LimitTo limit, int mode, boolean caseSensitive) {
|
||||||
super(name, containers, searchFor, limit, mode, caseSensitive);
|
super(name, containers, searchFor, limit, mode, caseSensitive, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public char[] indexEntryPrefix() {
|
public char[] indexEntryPrefix() {
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class FriendPattern extends ClassDeclarationPattern {
|
||||||
* @param caseSensitive
|
* @param caseSensitive
|
||||||
*/
|
*/
|
||||||
public FriendPattern(char[] name, char[][] containers, SearchFor searchFor, LimitTo limit, int mode, boolean caseSensitive) {
|
public FriendPattern(char[] name, char[][] containers, SearchFor searchFor, LimitTo limit, int mode, boolean caseSensitive) {
|
||||||
super(name, containers, searchFor, limit, mode, caseSensitive);
|
super(name, containers, searchFor, limit, mode, caseSensitive, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public char[] indexEntryPrefix() {
|
public char[] indexEntryPrefix() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue