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:


If we have an example:

bla.prototype=new Object();
function bla() {
bla.prototype.meth = function() {};
bla.prototype.meth2 = function() {
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:XML Editor content assist
Next Topic:XML comment colors
Goto Forum:

Current Time: Fri Apr 28 22:38:19 GMT 2017

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

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