>>> "Henda Carvalho" <henda.for.work@...> seems to think that:
>I was using the most recent cedet pre releases...
>
>Now i changed to the most recent cedet beta, as you said, and the problem i=
>s
>fixed. ;) thanks!
The function semantic-tag-abstract should be in both the beta, and the
prerelease. I'm not sure why it wouldn't not show up in the
prerelease for you.
>Can you please tell me if there is an updated documentation for semantic
>besides this one (this one is not updated, because it still has
>'semantic-nonterminal-abstract' and should have 'semantic-tag-abstract'
>like you told me):
>
>http://cedet.sourceforge.net/info/semantic.html#Programming
There is updated documentation in the distribution under
cedet/semantic/doc/semantic-appdev.info (if you compile the
documentation.)
>One last thing. Having the following class definition (in java), i would
>like to know if semantic already provide functions to get the method tokens
>and the variable tokens.
>
>For e.g:
>
>public class x {
> private int y =3D 0;
> public int z () {
> return y;
> }
>}
>
>Now i would like to get the token corresponding to the 'z' method, and the
>token corresponding to the 'y' variable.
>
>I was using something like: (*semantic-find-nonterminal-by-token 'function
><and here i putted a buffer>) -- *for trying to get the z method* -- *but
>this always returned 'nil'.
>
>I did something similar to the variable and returned 'nil' either. But to
>get the class token type it seems to work well...
>
>So can you please tell me if semantic already has functions to get the
>methods tokens and the variable tokens. If the answer is yes, which
>functions are these?
In your example, if you put the cursor on the 'y' symbol in the 'z'
method, then use "M-x semantic-analyze-current-context RET", it
should list those definitions. Programmatically:
(let ((ctxt (semantic-analyze-current-context <some location>))
...)
)
returns an EIEIO object, thus:
(oref (semantic-analyze-current-context) prefix)
gives you a list, where the 'car' is the tag you are looking for.
If you just want to know what 'y' is, out of context, then there are
other routines, including `semantic-find-tags-by-name',
`semantic-brute-find-tags-by-name' and `semanticdb-find-tags-by-name'.
Good Luck
Eric
--
Eric Ludlam: zappo@..., eric@...
Home: http://www.ludlam.net Siege: http://www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org
|