>>> <klaus.berndl@...> seems to think that:
>Eric M. Ludlam wrote:
>>>>> <klaus.berndl@...> seems to think that:
>>> klaus.berndl@... wrote:
>> [ ... ]
>>>>> In the above example, you would find that
>>>>>
>>>>> M-x semantic-analyze-current-context
>>>>>
>>>>> can return some of the right stuff, but only if the point is in
>>>>> the body of the method (that you would have to add.)
>>>>
>>>> When i call this command then i always get only the message:
>>>> "semantic-up-context: No context of type function to advance in [4
>>>> times]"
>>
>> Yes, you have to type in a method with a body, put the cursor in the
>> body, and execute the above for it to work.
>>
>>>>>
>>>>> The magic function semantic-ctxt-scoped-types also isn't quite
>>>>> good enough because it assumes that all namespaces in the local
>>>>> file are in scope!
>>>>>
>>>>> I suppose an ideal solution might be to fix the analyze-context
>>>>> function (or something like it) to put the active scopes into some
>>>>> sort of specialized order, then search them for your symbol.
>>>>
>>>> Why not to enable the magic semantic-ctxt-scoped-types to take into
>>>> account Scope, means in the example above, that when called from
>>>> within namespace moose It returns only the moose-table and not the
>>>> meese-table?!
>>>>
>>>> Is this "...it assumes that all namespaces in the local file are in
>>>> scope!" a senseful behavior or is assumption a good assumption? -
>>>> why it assumes It?
>> [ ... ]
>>
>> That is the default for C/C++. The default returns nothing at all.
>>
>> I would be happy if anyone who really knows C++ would look at the
>> implementation in semantic-c.by
>
>Where you would say we should take a look - this files is quite big? ;-)
Uh, sorry, it is semantic-c.el.
In there, just search for the below function.
>>and the method
>> semantic-ctxt-scoped-types and make it "right." I'm not familiar
>> enough with C++ to divine the right answer myself.
>
>Hmm, i can make a try..... Do i understand you right, that semantic-ctxt-scoped-types
>should be the producer of the right types currently in scope?!
[ ... ]
Right. For a given location (point), it should return a list of tags
which represent symbols that are in scope. ie, if the symbol 'foo' is
near the cursor, then one of moose::foo, or meese::foo could be in
scope and could be substituted in for the plain symbol foo.
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
|