Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » JSDT: IJavaElement for 'this' source element?
JSDT: IJavaElement for 'this' source element? [message #223429] Tue, 04 November 2008 13:26
Eclipse UserFriend
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
Previous Topic:Where to put the *.wsdl file? In the project base directory in workspace?
Next Topic:Can Native2Ascii write to the /build directory?
Goto Forum:
  


Current Time: Tue Mar 19 08:10:21 GMT 2024

Powered by FUDForum. Page generated in 0.02561 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top