mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Mirror of https://github.com/eclipse-cdt/cdt
![]() core: - created new search pattern OrPattern, which returns a match if any of its constituent pattens return a match. To use it, do something like: OrPattern orPattern = new OrPattern(); orPattern.addPattern( SearchEngine.createSearchPattern( "::NS::B::e", ENUM, REFERENCES, true ) ); orPattern.addPattern( SearchEngine.createSearchPattern( "Hea*", CLASS, DECLARATIONS, true ) ); Searching for all occurences of something now uses the OrPattern. ie, SearchEngine.createSearchPattern( "A", TYPE, ALL_OCCURENCES, true ); is the same as OrPattern orPattern = new OrPattern(); orPattern.addPattern( SearchEngine.createSearchPattern( "f", FUNCTION, DECLARATIONS, true ) ); orPattern.addPattern( SearchEngine.createSearchPattern( "f", FUNCTION, REFERENCES, true ) ); orPattern.addPattern( SearchEngine.createSearchPattern( "f", FUNCTION, DEFINITIONS, true ) ); For large projects this is much more efficient than the old method of finding all occurences core.tests: - added ClassDeclarationPatternTests.testAllOccurences - added OtherPatternTests.testOrPattern |
||
---|---|---|
core | ||
debug | ||
doc/org.eclipse.cdt.doc.user | ||
launch/org.eclipse.cdt.launch | ||
releng |