Package org.eclipse.dltk.core.index2.search

Examples of org.eclipse.dltk.core.index2.search.ISearchRequestor


        // handle twig variables
        if (!varName.startsWith("$")) {
            varName = "$" + varName;
        }

        engine.search(ISymfonyModelElement.TEMPLATE_VARIABLE, viewPath, varName, 0, 0, 100, SearchFor.REFERENCES, MatchRule.EXACT, scope, new ISearchRequestor() {
            @Override
            public void match(int elementType, int flags, int offset, int length,
                    int nameOffset, int nameLength, String elementName,
                    String metadata, String doc, String qualifier, String parent,
                    ISourceModule sourceModule, boolean isReference) {
View Full Code Here


    final List<AppKernel> kernels = new ArrayList<AppKernel>();

    IDLTKSearchScope scope = SearchEngine.createSearchScope(project);
    ISearchEngine engine = ModelAccess.getSearchEngine(SymfonyLanguageToolkit.getDefault());   

    engine.search(ISymfonyModelElement.ENVIRONMENT, null, null, 0, 0, 100, SearchFor.REFERENCES, MatchRule.PREFIX, scope, new ISearchRequestor() {

      @Override
      public void match(int elementType, int flags, int offset, int length,
          int nameOffset, int nameLength, String elementName,
          String metadata, String doc, String qualifier, String parent,
View Full Code Here

    if (project == null || name == null || scope == null) {
        Logger.log(Logger.WARNING, "unable to retrieve kernel");
        return null;
    }

    engine.search(ISymfonyModelElement.ENVIRONMENT, null, name, 0, 0, 100, SearchFor.REFERENCES, MatchRule.EXACT, scope, new ISearchRequestor() {

      @Override
      public void match(int elementType, int flags, int offset, int length,
          int nameOffset, int nameLength, String elementName,
          String metadata, String doc, String qualifier, String parent,
View Full Code Here

        final JSONParser parser = new JSONParser();
        final List<Function> functions = new ArrayList<Function>();

        engine.search(ITwigModelElement.FUNCTION, null, null, 0, 0, 100,
                SearchFor.REFERENCES, MatchRule.PREFIX, scope,
                new ISearchRequestor()
                {

                    @Override
                    public void match(int elementType, int flags, int offset,
                            int length, int nameOffset, int nameLength,
View Full Code Here

        final JSONParser parser = new JSONParser();
        final List<Filter> filters = new ArrayList<Filter>();

        engine.search(ITwigModelElement.FILTER, null, null, 0, 0, 100,
                SearchFor.REFERENCES, MatchRule.PREFIX, scope,
                new ISearchRequestor()
                {

                    @Override
                    public void match(int elementType, int flags, int offset,
                            int length, int nameOffset, int nameLength,
View Full Code Here

        final JSONParser parser = new JSONParser();

        final List<String> tags = new ArrayList<String>();

        engine.search(type, null, text, 0, 0, 1, SearchFor.REFERENCES,
                MatchRule.EXACT, scope, new ISearchRequestor()
                {

                    @Override
                    public void match(int elementType, int flags, int offset,
                            int length, int nameOffset, int nameLength,
View Full Code Here

        ISearchEngine engine = ModelAccess.getSearchEngine(PHPLanguageToolkit
                .getDefault());
        final List<String> tags = new ArrayList<String>();

        engine.search(type, null, text, 0, 0, 1, SearchFor.REFERENCES,
                MatchRule.EXACT, scope, new ISearchRequestor()
                {

                    @Override
                    public void match(int elementType, int flags, int offset,
                            int length, int nameOffset, int nameLength,
View Full Code Here

        final List<Tag> tags = new ArrayList<Tag>();
        final JSONParser parser = new JSONParser();

        engine.search(ITwigModelElement.START_TAG, null, null, 0, 0, 200,
                SearchFor.REFERENCES, MatchRule.PREFIX, scope,
                new ISearchRequestor()
                {

                    @Override
                    public void match(int elementType, int flags, int offset,
                            int length, int nameOffset, int nameLength,
                            String elementName, String metadata, String doc,
                            String qualifier, String parent,
                            ISourceModule sourceModule, boolean isReference)
                    {

                        try {

                            Tag tag = new Tag(elementName);

                            if (metadata != null) {

                                JSONObject data = (JSONObject) parser
                                        .parse(new StringReader(metadata));
                                if (data.size() > 0)
                                    tag.setPhpClass((String) data
                                            .get(TwigType.PHPCLASS));

                                if (data.size() > 1)
                                    tag.setDescription((String) data
                                            .get(TwigType.DOC));

                            }
                            tags.add(tag);

                        } catch (Exception e) {
                            e.printStackTrace();
                        }

                    }
                }, null);

        engine.search(ITwigModelElement.END_TAG, null, null, 0, 0, 200,
                SearchFor.REFERENCES, MatchRule.PREFIX, scope,
                new ISearchRequestor()
                {

                    @Override
                    public void match(int elementType, int flags, int offset,
                            int length, int nameOffset, int nameLength,
View Full Code Here

        final List<Test> tests = new ArrayList<Test>();

        engine.search(ITwigModelElement.TEST, null, null, 0, 0, 100,
                SearchFor.REFERENCES, MatchRule.PREFIX, scope,
                new ISearchRequestor()
                {

                    @Override
                    public void match(int elementType, int flags, int offset,
                            int length, int nameOffset, int nameLength,
View Full Code Here

    {
        IDLTKSearchScope scope = SearchEngine.createSearchScope(sourceModule);
        ISearchEngine engine = ModelAccess.getSearchEngine(PHPLanguageToolkit.getDefault());
        final List<BlockName> blocks = new ArrayList<BlockName>();
       
        ISearchRequestor requestor = new ISearchRequestor()
        {
            @Override
            public void match(int elementType, int flags, int offset, int length,
                    int nameOffset, int nameLength, String elementName,
                    String metadata, String doc, String qualifier, String parent,
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.core.index2.search.ISearchRequestor

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.