Package org.eclipse.cdt.internal.ui.search

Examples of org.eclipse.cdt.internal.ui.search.CSearchQuery


    int context = getContext(commandLine.getValue(Options.CONTEXT_OPTION));
    int type = getType(commandLine.getValue(Options.TYPE_OPTION));
    String pattern = commandLine.getValue(Options.PATTERN_OPTION);
    boolean caseSensitive =
      !commandLine.hasOption(Options.CASE_INSENSITIVE_OPTION);
    CSearchQuery query = new CSearchPatternQuery(
        scope, scopeDesc, pattern, caseSensitive, type | context);

    ArrayList<Position> results = new ArrayList<Position>();
    if (query != null){
      query.run(new NullProgressMonitor());
      CSearchResult result = (CSearchResult)query.getSearchResult();
      for (Object e : result.getElements()){
        Method method = CSearchElement.class.getDeclaredMethod("getLocation");
        method.setAccessible(true);
        IIndexFileLocation location = (IIndexFileLocation)method.invoke(e);
        String filename = location.getURI().getPath();
View Full Code Here

TOP

Related Classes of org.eclipse.cdt.internal.ui.search.CSearchQuery

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.