Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[Dltk-dev] problem with dltk-search

For my ModuleDeclaration, i subclassed FieldDeclaration several times
and filled my ModuleDeclaration with these statements. I tried to
implement the search like mentioned in
http://wiki.eclipse.org/DLTK_IDE_Guide:Step_3._Towards_an_IDE#Search
but it doesn't find anything. I then implemented a subclass of
MatchLocatorParser as follows:

@Override
       protected void processStatement(final ASTNode node, final
PatternLocator locator) {
               if (node instanceof MethodDeclaration) {
                       final MethodDeclaration defn = (MethodDeclaration) node;
                       locator.match(defn, getNodeSet());
               } else if (node instanceof FieldDeclaration) {
                       final FieldDeclaration def = (FieldDeclaration) node;
                       locator.match(def, getNodeSet());
                }
       }

when i do a method-search (search for "methods") with limit to
declarations he visits this method but doesn't match the right things
since they are FieldDeclarations (the locator just returns impossible
match). But when i do a field-search he doesn't visit this method at
all. Digging into the code, what i could find out is that in the
BasicSearchEngine in the findMatches method he doesn't find any
SearchDocuments (variables like indexMatches and matches are empty).
That doesn't happen in the method-search.
Any Ideas?

thanks in advance,

-- 
Sebastian Rheinnecker
Universität Tübingen


Back to the top