mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 06:32:10 +02:00
Patch for Andrew Niefer
Search filtering was broken, it would have become more obvious when searching larger projects with includes. core: -modify BasicSearchMatch.equals() tests: modified OtherPatternTests.testBug42911() and renamed it testBug42911_43988
This commit is contained in:
parent
0d05a8342d
commit
93a1b87c76
4 changed files with 31 additions and 11 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
2003-10-01 Andrew Niefer
|
||||||
|
modified OtherPatternTests.testBug42911() and renamed it testBug42911_43988
|
||||||
|
|
||||||
2003-10-01 Andrew Niefer
|
2003-10-01 Andrew Niefer
|
||||||
added testBug43450 to ManagedBuildTests.java
|
added testBug43450 to ManagedBuildTests.java
|
||||||
added a user include to plugin.xml
|
added a user include to plugin.xml
|
||||||
|
|
|
@ -330,7 +330,7 @@ public class OtherPatternTests extends BaseSearchTest {
|
||||||
assertEquals( matches.size(), 4 );
|
assertEquals( matches.size(), 4 );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug42911(){
|
public void testBug42911_43988(){
|
||||||
BasicSearchMatch match1 = new BasicSearchMatch();
|
BasicSearchMatch match1 = new BasicSearchMatch();
|
||||||
BasicSearchMatch match2 = new BasicSearchMatch();
|
BasicSearchMatch match2 = new BasicSearchMatch();
|
||||||
|
|
||||||
|
@ -344,5 +344,10 @@ public class OtherPatternTests extends BaseSearchTest {
|
||||||
assertFalse( match1.equals( match2 ) );
|
assertFalse( match1.equals( match2 ) );
|
||||||
assertFalse( match2.equals( match1 ) );
|
assertFalse( match2.equals( match1 ) );
|
||||||
|
|
||||||
|
match2.setName( "IWasSaying" );
|
||||||
|
match2.setParentName( "boo" );
|
||||||
|
match2.setReturnType( "urns" );
|
||||||
|
|
||||||
|
assertTrue( match1.equals( match2 ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
2003-10-01 Andrew Niefer
|
||||||
|
- fix BasicSearchMatch.equals() for bug43988
|
||||||
|
|
||||||
2003-09-30 Bogdan Gheorghe
|
2003-09-30 Bogdan Gheorghe
|
||||||
- changed logging in JobManager to use new ICLogConstants
|
- changed logging in JobManager to use new ICLogConstants
|
||||||
|
|
||||||
|
|
|
@ -67,17 +67,26 @@ public class BasicSearchMatch implements IMatch, Comparable {
|
||||||
if( type != match.getElementType() || visibility != match.getVisibility() )
|
if( type != match.getElementType() || visibility != match.getVisibility() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( ( name != null && match.getName() != null && !name.equals( match.getName() ) )
|
if( name != null && match.getName() != null){
|
||||||
|| name != match.getName() )
|
if( !name.equals( match.getName() ) )
|
||||||
return false;
|
return false;
|
||||||
|
} else if( name != match.getName() ){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if( ( parentName != null && match.getParentName() != null && !parentName.equals( match.getParentName() ) )
|
if( parentName != null && match.getParentName() != null){
|
||||||
|| parentName != match.getParentName() )
|
if( !parentName.equals( match.getParentName() ) )
|
||||||
return false;
|
return false;
|
||||||
|
} else if( parentName != match.getParentName() ){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if( ( returnType != null && match.getReturnType() != null && !returnType.equals( match.getReturnType() ) )
|
if( returnType != null && match.getReturnType() != null){
|
||||||
|| returnType != match.getReturnType() )
|
if( !returnType.equals( match.getReturnType() ) )
|
||||||
return false;
|
return false;
|
||||||
|
} else if( returnType != match.getReturnType() ){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
IPath thisPath = getLocation();
|
IPath thisPath = getLocation();
|
||||||
IPath matchPath = match.getLocation();
|
IPath matchPath = match.getLocation();
|
||||||
|
|
Loading…
Add table
Reference in a new issue