mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
![]() 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 |
||
---|---|---|
.. | ||
org.eclipse.cdt.core | ||
org.eclipse.cdt.core.linux | ||
org.eclipse.cdt.core.qnx | ||
org.eclipse.cdt.core.solaris | ||
org.eclipse.cdt.core.tests | ||
org.eclipse.cdt.core.win32 | ||
org.eclipse.cdt.ui | ||
org.eclipse.cdt.ui.tests |