I'm using semanticdb-find-nonterminal-by-name function, with the
SEARCH-PARTS option, in hopes of finding variables and functions in
various files from a single command.
The docs say the results are in the form:
( (DATABASE TOKEN1 TOKEN2 ...) (DATABASE2 TOKEN3 TOKEN4 ...) ...)
However, when I search for, say, "aMethod", the results don't seem to
match this. Printing the first item of the results looks like (commas
added for clarity):
([object semanticdb-table Foo.java
[object semanticdb-project-database semantic.cache
/foo/bar/semantic.cache /foo/bar
[object semanticdb-table Foo.java #2 Foo.java 29230 jde-mode
(( ... token list for Foo.java ... ))
(( ... close-paren and open-paren stuff ... )) ]
[object semanticdb-table Bar.java
(similar to Foo previous) ... ]
[ .. more objects in db .. ]
] ) ],
myMethod, function, String,
(( .. variable token list .. )), ((typemodifiers)), ..., extent)
There seems to be one entry like this for each semanticdb-table object
that matched the search.
My questions are:
1) Even if, in a result for a given semanticdb-table object, multiple
sub-tokens match the search, the data at the end of the entry only
corresponds to one of those sub-tokens. Does this mean one would have to
walk the token tree of the matching object to find every match for the
term?
2) How do you access that token list of a semanticdb-table object? I'm
assuming the objects are eieio objects, which I don't know how to
program. Is there an easy way to get the list? Ideally, it would be
accessing that first object with the db inside of it, instead of walking
the db object and finding the table object ...
Thanks! I hope to create etags-like functionality with this, so all help
is greatly appreciated.
Stuart
--
Stuart Popejoy <stuart@...>
Pink Sheets LLC
|