JSDT: IJavaElement for 'this' source element? [message #223429] |
Tue, 04 November 2008 13:26 |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: anton.safonov.gmail.com
Hi,
If we have an example:
bla.prototype=new Object();
function bla() {
bla.prototype.meth = function() {};
bla.prototype.meth2 = function() {
this.meth();
a = this;
};
}
If I search for a java element corresponding to any of 'this' strings
above and do such a call (where jsOffset is the position 'this'):
IJavaElement[] elements = getCompilationUnit().codeSelect(jsOffset, 0);
Then it returns 0 elements, i.e. it doesn't find any matching java element
at this point.
And it works for 'meth()' returning ResolvedSourceMethod.
Is it a bug or a feature?
If it's a bug, would it be easy for me to fix it?
What kind of element must be returned for 'this'? ResolvedSourceType?
Regards, Anton
|
|
|
Powered by
FUDForum. Page generated in 0.03770 seconds