This "this" should have the
same type as the current context in the InferEngine. You can set
the current context by doing "currentContext.currentType= ??".
If we see a "this.something"
in a function, we assume there is somekind of object involved, and if we
dont know the type, we create an anonymous type.
IBM Software Group Emerging Technologies
Matthias Kempka <mkempka@xxxxxxxxxxxxxx> Sent by: wtp-dev-bounces@xxxxxxxxxxx
04/07/2008 07:39 AM
Please respond to
"General discussion of project-wide or architectural issues."
WTP general discussion <wtp-dev@xxxxxxxxxxx>
[wtp-dev] JSDT inference: type of "this"
Hi Phil and Brad,
While developing the inferrence support for Qooxdoo, I came across
problems with the keyword "this".
During the call of InferenceSupport.visit(IThisReference) I know
exactly the type that the thisReference should have, but I can't
assign it. Instead the thisReference has some anonymous type that does
contain some of the type informations of the qooxdoo class but not all
of it. Specifically qooxdoo features like properties and hierarchy
information is lost.
So my question is: How does the anonymous type gather the type
information? It seems that it is not totally ignorant of the
information as methods and members are there.
Is there a way of setting the type of "this" or declaring that
anonymous type of this is actually the one of the class that I know
Dipl.-Inform. Matthias Kempka
Innoopract Informationssysteme GmbH
Tel: 0721 - 66 47 33 - 0
Fax: 0721 - 66 47 33 29
========================= Legal Disclaimer =====================
According to Section 80 of the German Corporation Act
Innoopract Informationssysteme GmbH must indicate the following
Address: Stephanienstrasse 20, 76133 Karlsruhe Germany
General Manager: Jochen Krause, Eric von der Heyden
Registered Office: Karlsruhe, Commercial Register Karlsruhe HRB 7883
wtp-dev mailing list