Hi,
Eric M. Ludlam wrote:
>>>> <klaus.berndl@...> seems to think that:
>> Well, i makes also sense calling semantic-go-to-tag withsuch a
>> faux-tag - and i'm not sure if this is already handled by the new
>> implementation?=20
>=20
> Hi Klaus,
>=20
> It must have been a long day for me because I don't quite
> understand. Could you please explain the purpose of a faux tag in
> ECB? I am assuming it is a tag that represents several real tags that
> happen to represent the same item? How would I exercise this feature
> from ECB?
well, let me explain faux-tags - funny because your semantic generates
faux-tags ;-)
Well, suppose the following short c++-code stored in test.cpp:
int
Faux::klaus_test_function(int arg1, int arg2)
{
return 1;
}
void
Faux::berndl_test_function(int arg1, int arg2)
{
return;
}
Now see the test.h header file which contains class Faux:
class Faux
{
int klaus_test_function(int arg1, int arg2);
void berndl_test_function(int arg1, int arg2);
}
So, the class and the method-prototypes are defined in test.h whereas =
the
implementation of the class faux resides in test.cpp.
So when you now open test.cpp in ECB for example then ECB runs internaly
semantic-adopt-external-members which creates a somehow virtual type-tag =
with
name "Faux" (tag-class is 'type) and stores the property 'faux at this =
tag.
The term faux comes from you - see `semantic-adopt-external-members'.
What you then see in ECB is:
[-] Faux
| +berndl_test_function (arg1:int, arg2:int):void
`- +klaus_test_function (arg1:int, arg2:int):int
But the tag "Faux" can not be found in test.cpp but is is there so the =
methods
of class Fuax can be grouoped under a type-tag.
Well, when the user now clicks onto the "Faux"-tag in ECB then =
ECBN/semantic should
recognize that this is such a virtual "faux"-tag (created by =
semantic-adopt...)
and then try to find the origin tag for this - means it should find via =
semanticdb
the real(!) tag "Faux" defined within test.h.
So, when semantic-go-to-tag is called weith that faux tag named "Faux" =
from test.cpp(!!)
then it should be so smart to check that this is not a real tag defined =
in test.cpp but
only a virtual grouping tag which is defined elsewhere and therefore try =
to find it
via semanticdb...
is this now understandable?
before i answer to the rest of your email below i will wait for your =
next answer because
maybe you want to rewrite it, don't know... ;-)
Ciao,
Klaus
P.S.
You should finish your business days earlier - life is for living not =
for
working ;-))
>=20
> It seems you might get a similar behavior from something like this:
>=20
> (let ((tags (semanticdb-find-tags-by-class
> 'type (semanticdb-find-tags-by-name "mydatatype")))
> (onetag (semanticdb-find-result-nth tags 0)))
>=20
> (semantic--tag-put-property
> (car onetag)
> :filename (semanticdb-full-filename (cdr onetag)))
>=20
> (car onetag)
> )
>=20
> which has now applied a filename onto the tags found. Though I think
> you need it to apply to each found tag.
>=20
> Perhaps just better find-result accessor functions? Should the find
> results be an object with a wider range of methods instead?
>=20
> We recently added the concept of an 'alias' tag which is not yet well
> understood. Are your faux tags alias of existing tags? You could use
> `semantic-tag-new-alias' for that. Eventually as aliases are used in
> different languages support will be added to various APIs.
>=20
> Eric
|