[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] Search tests & bug fixes
|
This patch contains bugfixes and tests for the C++ search.
core:
- fixed a couple of bugs to do with searching for globally qualified
patterns
- fixed a bug to do with the '?' wildcard
- fixed a bug to do with searching for functions/methods using patterns
specifying parameters
tests:
- new search tests:
ClassDeclarationPatternTests.testClassReferenceInFieldType
ClassDeclarationPatternTests.testClassReferences
ClassDeclarationPatternTests.testEnumerationReferenceVisibleByInheritance
ClassDeclarationPatternTests.testGloballyQualifiedItem
ClassDeclarationPatternTests.testTypeReferenceVisibleByUsingDirective
FunctionMethodPatternTests.testMethodDeclaration
FunctionMethodPatternTests.testMethodDeclarationWithParams
OtherPatternTests.testFieldDeclaration
OtherPatternTests.testNamespaceDeclaration
OtherPatternTests.testNamespaceReferenceInClassBaseClause
OtherPatternTests.testNamespaceReferenceInUsingDirective
OtherPatternTests.testVariableDeclaration
-Andrew
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core.tests/ChangeLog,v
retrieving revision 1.40
diff -u -r1.40 ChangeLog
--- ChangeLog 28 Jul 2003 20:49:41 -0000 1.40
+++ ChangeLog 28 Jul 2003 21:00:10 -0000
@@ -1,3 +1,19 @@
+2008-07-28 Andrew Niefer
+ -changes to resources/search/classDecl.cpp
+ -new search tests:
+ ClassDeclarationPatternTests.testClassReferenceInFieldType
+ ClassDeclarationPatternTests.testClassReferences
+ ClassDeclarationPatternTests.testEnumerationReferenceVisibleByInheritance
+ ClassDeclarationPatternTests.testGloballyQualifiedItem
+ ClassDeclarationPatternTests.testTypeReferenceVisibleByUsingDirective
+ FunctionMethodPatternTests.testMethodDeclaration
+ FunctionMethodPatternTests.testMethodDeclarationWithParams
+ OtherPatternTests.testFieldDeclaration
+ OtherPatternTests.testNamespaceDeclaration
+ OtherPatternTests.testNamespaceReferenceInClassBaseClause
+ OtherPatternTests.testNamespaceReferenceInUsingDirective
+ OtherPatternTests.testVariableDeclaration
+
2003-07-28 John Camelon
Added/moved tests as necessary for bugfix 40842 & 40843.
Index: resources/search/classDecl.cpp
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core.tests/resources/search/classDecl.cpp,v
retrieving revision 1.2
diff -u -r1.2 classDecl.cpp
--- resources/search/classDecl.cpp 15 Jul 2003 14:48:13 -0000 1.2
+++ resources/search/classDecl.cpp 28 Jul 2003 21:00:11 -0000
@@ -1,5 +1,6 @@
class A {
class B {
+ void f( A );
};
};
@@ -7,12 +8,26 @@
namespace NS2{
struct a{};
}
- class B {
+ class B: public A {
struct A {};
enum e {};
+
+ using namespace NS2;
+
+ a aStruct;
+ A anotherStruct;
};
union u{ } ;
}
+
+namespace NS3{
+ class C : public NS::B {
+ e eE;
+ };
+}
+
+A::B b1;
+NS::B b2;
union u{
};
Index: search/org/eclipse/cdt/core/search/tests/ClassDeclarationPatternTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core.tests/search/org/eclipse/cdt/core/search/tests/ClassDeclarationPatternTests.java,v
retrieving revision 1.6
diff -u -r1.6 ClassDeclarationPatternTests.java
--- search/org/eclipse/cdt/core/search/tests/ClassDeclarationPatternTests.java 24 Jul 2003 14:20:11 -0000 1.6
+++ search/org/eclipse/cdt/core/search/tests/ClassDeclarationPatternTests.java 28 Jul 2003 21:00:11 -0000
@@ -171,4 +171,68 @@
assertEquals( CharOperation.compareWith( "typeRef/U/".toCharArray(), clsPattern.indexEntryPrefix() ), 0);
}
+ public void testGloballyQualifiedItem(){
+ ICSearchPattern pattern = SearchEngine.createSearchPattern( "::A", TYPE, DECLARATIONS, true );
+ assertTrue( pattern instanceof ClassDeclarationPattern );
+
+ search( workspace, pattern, scope, resultCollector );
+
+ Set matches = resultCollector.getMatches();
+
+ assertEquals( matches.size(), 1 );
+
+ pattern = SearchEngine.createSearchPattern( "::u", TYPE, DECLARATIONS, true );
+ assertTrue( pattern instanceof ClassDeclarationPattern );
+
+ search( workspace, pattern, scope, resultCollector );
+
+ matches = resultCollector.getMatches();
+
+ assertEquals( matches.size(), 1 );
+ }
+
+ public void testClassReferences(){
+ ICSearchPattern pattern = SearchEngine.createSearchPattern( "::A", TYPE, REFERENCES, true );
+
+ search( workspace, pattern, scope, resultCollector );
+
+ Set matches = resultCollector.getMatches();
+ assertEquals( matches.size(), 3 );
+ }
+
+ public void testClassReferenceInFieldType(){
+ ICSearchPattern pattern = SearchEngine.createSearchPattern( "::NS::B::A", TYPE, REFERENCES, true );
+
+ search( workspace, pattern, scope, resultCollector );
+
+ Set matches = resultCollector.getMatches();
+ assertEquals( matches.size(), 1 );
+
+ Match match = (Match) matches.iterator().next();
+ assertTrue( match.parent.equals( "NS::B" ) );
+ }
+
+ public void testTypeReferenceVisibleByUsingDirective(){
+ ICSearchPattern pattern = SearchEngine.createSearchPattern( "::NS::NS2::a", STRUCT, REFERENCES, true );
+
+ search( workspace, pattern, scope, resultCollector );
+ Set matches = resultCollector.getMatches();
+ assertEquals( matches.size(), 1 );
+
+ Match match = (Match) matches.iterator().next();
+ assertTrue( match.parent.equals( "NS::B" ) );
+ }
+
+ public void testEnumerationReferenceVisibleByInheritance(){
+ ICSearchPattern pattern = SearchEngine.createSearchPattern( "::NS::B::e", ENUM, REFERENCES, true );
+
+ search( workspace, pattern, scope, resultCollector );
+
+ Set matches = resultCollector.getMatches();
+ assertEquals( matches.size(), 1 );
+
+ Match match = (Match) matches.iterator().next();
+ assertTrue( match.parent.equals( "NS3::C" ) );
+ }
+
}
Index: search/org/eclipse/cdt/core/search/tests/FunctionMethodPatternTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core.tests/search/org/eclipse/cdt/core/search/tests/FunctionMethodPatternTests.java,v
retrieving revision 1.1
diff -u -r1.1 FunctionMethodPatternTests.java
--- search/org/eclipse/cdt/core/search/tests/FunctionMethodPatternTests.java 24 Jul 2003 14:20:11 -0000 1.1
+++ search/org/eclipse/cdt/core/search/tests/FunctionMethodPatternTests.java 28 Jul 2003 21:00:11 -0000
@@ -13,6 +13,8 @@
*/
package org.eclipse.cdt.core.search.tests;
+import java.util.Set;
+
import org.eclipse.cdt.core.search.ICSearchPattern;
import org.eclipse.cdt.core.search.SearchEngine;
import org.eclipse.cdt.internal.core.search.CharOperation;
@@ -65,4 +67,23 @@
methodPattern = (MethodDeclarationPattern) SearchEngine.createSearchPattern( "A::B::c", METHOD, REFERENCES, false );
assertEquals( CharOperation.compareWith( "methodRef/".toCharArray(), methodPattern.indexEntryPrefix() ), 0);
}
+
+ public void testMethodDeclaration() {
+ ICSearchPattern pattern = SearchEngine.createSearchPattern( "A::B::f", METHOD, DECLARATIONS, true );
+
+ search( workspace, pattern, scope, resultCollector );
+
+ Set matches = resultCollector.getMatches();
+
+ assertEquals( matches.size(), 1 );
+ }
+
+ public void testMethodDeclarationWithParams() {
+ ICSearchPattern pattern = SearchEngine.createSearchPattern( "A::B::f( A )", METHOD, DECLARATIONS, true );
+
+ search( workspace, pattern, scope, resultCollector );
+
+ Set matches = resultCollector.getMatches();
+
+ assertEquals( matches.size(), 1 ); }
}
Index: search/org/eclipse/cdt/core/search/tests/OtherPatternTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core.tests/search/org/eclipse/cdt/core/search/tests/OtherPatternTests.java,v
retrieving revision 1.1
diff -u -r1.1 OtherPatternTests.java
--- search/org/eclipse/cdt/core/search/tests/OtherPatternTests.java 24 Jul 2003 14:20:11 -0000 1.1
+++ search/org/eclipse/cdt/core/search/tests/OtherPatternTests.java 28 Jul 2003 21:00:11 -0000
@@ -13,12 +13,15 @@
*/
package org.eclipse.cdt.core.search.tests;
+import java.util.Set;
+
import org.eclipse.cdt.core.search.ICSearchPattern;
import org.eclipse.cdt.core.search.SearchEngine;
import org.eclipse.cdt.internal.core.search.CharOperation;
import org.eclipse.cdt.internal.core.search.matching.FieldDeclarationPattern;
import org.eclipse.cdt.internal.core.search.matching.NamespaceDeclarationPattern;
import org.eclipse.cdt.internal.core.search.matching.VariableDeclarationPattern;
+import org.eclipse.cdt.internal.ui.search.Match;
/**
* @author aniefer
@@ -65,6 +68,9 @@
variablePattern = (VariableDeclarationPattern) SearchEngine.createSearchPattern( "Ac", VAR, REFERENCES, false );
assertEquals( CharOperation.compareWith( "typeRef/V/".toCharArray(), variablePattern.indexEntryPrefix() ), 0);
+
+ variablePattern = (VariableDeclarationPattern) SearchEngine.createSearchPattern( "A?c", VAR, REFERENCES, true );
+ assertEquals( CharOperation.compareWith( "typeRef/V/A".toCharArray(), variablePattern.indexEntryPrefix() ), 0);
}
public void testFieldIndexPrefix(){
@@ -82,6 +88,62 @@
fieldPattern = (FieldDeclarationPattern) SearchEngine.createSearchPattern( "A::B::c", FIELD, REFERENCES, false );
assertEquals( CharOperation.compareWith( "fieldRef/".toCharArray(), fieldPattern.indexEntryPrefix() ), 0);
+ }
+
+ public void testNamespaceDeclaration(){
+ ICSearchPattern pattern = SearchEngine.createSearchPattern( "NS*", NAMESPACE, DECLARATIONS, true );
+
+ search( workspace, pattern, scope, resultCollector );
+
+ Set matches = resultCollector.getMatches();
+
+ assertEquals( matches.size(), 3 );
+ }
+
+ public void testNamespaceReferenceInUsingDirective() {
+ ICSearchPattern pattern = SearchEngine.createSearchPattern( "::NS::NS2", NAMESPACE, REFERENCES, true );
+
+ search( workspace, pattern, scope, resultCollector );
+
+ Set matches = resultCollector.getMatches();
+
+ assertEquals( matches.size(), 1 );
+
+ Match match = (Match) matches.iterator().next();
+ assertTrue( match.parent.equals( "NS::B" ) );
+ }
+
+ public void testNamespaceReferenceInClassBaseClause(){
+ ICSearchPattern pattern = SearchEngine.createSearchPattern( "::NS", NAMESPACE, REFERENCES, true );
+
+ search( workspace, pattern, scope, resultCollector );
+
+ Set matches = resultCollector.getMatches();
+ assertEquals( matches.size(), 2 );
+ }
+
+ public void testFieldDeclaration(){
+ ICSearchPattern pattern = SearchEngine.createSearchPattern( "a*Struct", FIELD, DECLARATIONS, true );
+
+ search( workspace, pattern, scope, resultCollector );
+
+ Set matches = resultCollector.getMatches();
+ assertEquals( matches.size(), 2 );
+
+ Match match = (Match) matches.iterator().next();
+ assertTrue( match.parent.equals( "NS::B" ) );
+ }
+
+ public void testVariableDeclaration(){
+ ICSearchPattern pattern = SearchEngine.createSearchPattern( "b?", VAR, DECLARATIONS, true );
+
+ search( workspace, pattern, scope, resultCollector );
+
+ Set matches = resultCollector.getMatches();
+ assertEquals( matches.size(), 2 );
+
+ Match match = (Match) matches.iterator().next();
+ assertTrue( match.parent.equals( "" ) );
}
}
Index: index/ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/index/ChangeLog,v
retrieving revision 1.7
diff -u -r1.7 ChangeLog
--- index/ChangeLog 25 Jul 2003 15:21:57 -0000 1.7
+++ index/ChangeLog 28 Jul 2003 20:59:44 -0000
@@ -1,3 +1,6 @@
+2003-07-28 Andrew Niefer
+ - added support for '?' wildcards in AbstractIndexer.bestPrefix
+
2003-07-25 Bogdan Gheorghe
- Changed parser to COMPLETE mode
- Added functionRef, methodRef, typeRef, namespaceRef, fieldRef
Index: index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java,v
retrieving revision 1.8
diff -u -r1.8 AbstractIndexer.java
--- index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java 25 Jul 2003 15:21:57 -0000 1.8
+++ index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java 28 Jul 2003 20:59:44 -0000
@@ -14,9 +14,7 @@
import java.io.IOException;
import java.util.Iterator;
-import org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate;
import org.eclipse.cdt.core.parser.ast.ASTClassKind;
-import org.eclipse.cdt.core.parser.ast.IASTClassReference;
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
import org.eclipse.cdt.core.parser.ast.IASTEnumerationSpecifier;
import org.eclipse.cdt.core.parser.ast.IASTEnumerator;
@@ -24,7 +22,6 @@
import org.eclipse.cdt.core.parser.ast.IASTFunction;
import org.eclipse.cdt.core.parser.ast.IASTMethod;
import org.eclipse.cdt.core.parser.ast.IASTNamespaceDefinition;
-import org.eclipse.cdt.core.parser.ast.IASTNamespaceReference;
import org.eclipse.cdt.core.parser.ast.IASTTypedefDeclaration;
import org.eclipse.cdt.core.parser.ast.IASTVariable;
import org.eclipse.cdt.core.search.ICSearchConstants;
@@ -393,6 +390,8 @@
char[] result = null;
int pos = 0;
+ int wildPos, starPos, questionPos;
+
//length of prefix + separator
int length = prefix.length;
@@ -405,11 +404,22 @@
//type name.
name = null;
} else if( matchMode == PATTERN_MATCH && name != null ){
- int starPos = CharOperation.indexOf( '*', name );
- switch( starPos ){
+ starPos = CharOperation.indexOf( '*', name );
+ questionPos = CharOperation.indexOf( '?', name );
+
+ if( starPos >= 0 ){
+ if( questionPos >= 0 )
+ wildPos = ( starPos < questionPos ) ? starPos : questionPos;
+ else
+ wildPos = starPos;
+ } else {
+ wildPos = questionPos;
+ }
+
+ switch( wildPos ){
case -1 : break;
- case 0 : name = null;
- default : name = CharOperation.subarray( name, 0, starPos );
+ case 0 : name = null; break;
+ default : name = CharOperation.subarray( name, 0, wildPos ); break;
}
}
//add length for name
@@ -455,10 +465,21 @@
if( containingTypes != null ){
for( int i = containingTypes.length - 1; i >= 0; i-- ){
if( matchMode == PATTERN_MATCH ){
- int starPos = CharOperation.indexOf( '*', containingTypes[i] );
+ starPos = CharOperation.indexOf( '*', containingTypes[i] );
+ questionPos = CharOperation.indexOf( '?', containingTypes[i] );
+
if( starPos >= 0 ){
+ if( questionPos >= 0 )
+ wildPos = ( starPos < questionPos ) ? starPos : questionPos;
+ else
+ wildPos = starPos;
+ } else {
+ wildPos = questionPos;
+ }
+
+ if( wildPos >= 0 ){
temp[ pos++ ] = SEPARATOR;
- System.arraycopy( containingTypes[i], 0, temp, pos, starPos );
+ System.arraycopy( containingTypes[i], 0, temp, pos, wildPos );
pos += starPos;
break;
}
Index: search/ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/search/ChangeLog,v
retrieving revision 1.9
diff -u -r1.9 ChangeLog
--- search/ChangeLog 25 Jul 2003 17:25:49 -0000 1.9
+++ search/ChangeLog 28 Jul 2003 20:59:45 -0000
@@ -1,3 +1,9 @@
+2003-07-28 Andrew Niefer
+ - added abstract CSearchPattern.resetIndexInfo fix bug with searching with globally
+ qualified names
+ - fixed bug in CSearchPattern.matchQualifications to do with globally qualified names
+ - fixed bug in CSearchPattern.createFunctionPattern to do with parameter lists.
+
2003-07-25 Bogdan Gheorghe
- Added refs to PathCollector
- Filled in feedIndexRequestor for the new search patterns
Index: search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java,v
retrieving revision 1.11
diff -u -r1.11 CSearchPattern.java
--- search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java 24 Jul 2003 21:43:47 -0000 1.11
+++ search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java 28 Jul 2003 20:59:45 -0000
@@ -170,7 +170,7 @@
int index = patternString.indexOf( '(' );
String paramString = ( index == -1 ) ? "" : patternString.substring( index );
- String nameString = ( index == -1 ) ? patternString : patternString.substring( 0, index - 1 );
+ String nameString = ( index == -1 ) ? patternString : patternString.substring( 0, index );
IScanner scanner = ParserFactory.createScanner( new StringReader( nameString ), "TEXT", new ScannerInfo(), ParserMode.QUICK_PARSE, null );
@@ -372,7 +372,7 @@
}
for( int i = 1; i <= qualLength - root; i++ ){
- if( !matchesName( qualifications[ qualLength - i - root ], candidate[ candidateLength - i ] ) ){
+ if( !matchesName( qualifications[ qualLength - i ], candidate[ candidateLength - i ] ) ){
return false;
}
}
@@ -416,6 +416,7 @@
/* retrieve and decode entry */
IEntryResult entry = entries[i];
+ resetIndexInfo();
decodeIndexEntry(entry);
if (matchIndexEntry()){
feedIndexRequestor(requestor, detailLevel, entry.getFileReferences(), input, scope);
@@ -427,6 +428,14 @@
* Feed the requestor according to the current search pattern
*/
public abstract void feedIndexRequestor(IIndexSearchRequestor requestor, int detailLevel, int[] references, IndexInput input, ICSearchScope scope) throws IOException ;
+
+ /**
+ * Called to reset any variables used in the decoding of index entries,
+ * this ensures that the matchIndexEntry is not polluted by index info
+ * from previous entries.
+ */
+ protected abstract void resetIndexInfo();
+
/**
* Decodes the index entry
*/
Index: search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java,v
retrieving revision 1.8
diff -u -r1.8 ClassDeclarationPattern.java
--- search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java 24 Jul 2003 21:43:47 -0000 1.8
+++ search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java 28 Jul 2003 20:59:45 -0000
@@ -125,9 +125,15 @@
requestor.acceptClassDeclaration(path, decodedSimpleName, decodedContainingTypes);
}
}
- }
+ }
}
+ protected void resetIndexInfo(){
+ decodedType = 0;
+ decodedSimpleName = null;
+ decodedContainingTypes = null;
+ }
+
protected void decodeIndexEntry(IEntryResult entryResult) {
char[] word = entryResult.getWord();
int size = word.length;
Index: search/org/eclipse/cdt/internal/core/search/matching/FieldDeclarationPattern.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/FieldDeclarationPattern.java,v
retrieving revision 1.4
diff -u -r1.4 FieldDeclarationPattern.java
--- search/org/eclipse/cdt/internal/core/search/matching/FieldDeclarationPattern.java 25 Jul 2003 15:21:57 -0000 1.4
+++ search/org/eclipse/cdt/internal/core/search/matching/FieldDeclarationPattern.java 28 Jul 2003 20:59:45 -0000
@@ -76,6 +76,11 @@
return AbstractIndexer.bestFieldPrefix( _limitTo, simpleName, qualifications, _matchMode, _caseSensitive );
}
+ protected void resetIndexInfo(){
+ decodedSimpleName = null;
+ decodedQualifications = null;
+ }
+
protected void decodeIndexEntry(IEntryResult entryResult) {
char[] word = entryResult.getWord();
int size = word.length;
Index: search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java,v
retrieving revision 1.6
diff -u -r1.6 FunctionDeclarationPattern.java
--- search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java 25 Jul 2003 17:25:49 -0000 1.6
+++ search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java 28 Jul 2003 20:59:45 -0000
@@ -117,6 +117,11 @@
}
}
+
+ protected void resetIndexInfo(){
+ decodedSimpleName = null;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.search.matching.CSearchPattern#decodeIndexEntry(org.eclipse.cdt.internal.core.index.IEntryResult)
*/
Index: search/org/eclipse/cdt/internal/core/search/matching/MethodDeclarationPattern.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/MethodDeclarationPattern.java,v
retrieving revision 1.4
diff -u -r1.4 MethodDeclarationPattern.java
--- search/org/eclipse/cdt/internal/core/search/matching/MethodDeclarationPattern.java 25 Jul 2003 15:21:57 -0000 1.4
+++ search/org/eclipse/cdt/internal/core/search/matching/MethodDeclarationPattern.java 28 Jul 2003 20:59:45 -0000
@@ -72,6 +72,11 @@
return AbstractIndexer.bestMethodPrefix( _limitTo, simpleName, qualifications, _matchMode, _caseSensitive );
}
+ protected void resetIndexInfo(){
+ decodedSimpleName = null;
+ decodedQualifications = null;
+ }
+
protected void decodeIndexEntry(IEntryResult entryResult) {
char[] word = entryResult.getWord();
int size = word.length;
Index: search/org/eclipse/cdt/internal/core/search/matching/NamespaceDeclarationPattern.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/NamespaceDeclarationPattern.java,v
retrieving revision 1.4
diff -u -r1.4 NamespaceDeclarationPattern.java
--- search/org/eclipse/cdt/internal/core/search/matching/NamespaceDeclarationPattern.java 25 Jul 2003 15:21:57 -0000 1.4
+++ search/org/eclipse/cdt/internal/core/search/matching/NamespaceDeclarationPattern.java 28 Jul 2003 20:59:45 -0000
@@ -93,6 +93,11 @@
}
}
+ protected void resetIndexInfo(){
+ decodedSimpleName = null;
+ decodedContainingTypes = null;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.search.matching.CSearchPattern#decodeIndexEntry(org.eclipse.cdt.internal.core.index.IEntryResult)
*/
Index: search/org/eclipse/cdt/internal/core/search/matching/VariableDeclarationPattern.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/matching/VariableDeclarationPattern.java,v
retrieving revision 1.4
diff -u -r1.4 VariableDeclarationPattern.java
--- search/org/eclipse/cdt/internal/core/search/matching/VariableDeclarationPattern.java 25 Jul 2003 15:21:57 -0000 1.4
+++ search/org/eclipse/cdt/internal/core/search/matching/VariableDeclarationPattern.java 28 Jul 2003 20:59:45 -0000
@@ -77,6 +77,11 @@
}
}
+ protected void resetIndexInfo(){
+ decodedType = 0;
+ decodedSimpleName = null;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.search.matching.CSearchPattern#decodeIndexEntry(org.eclipse.cdt.internal.core.index.IEntryResult)
*/