Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[wtp-dev] JSDT: Life cycle of an infer engine


I'm a bit confused about the life length - or maybe scope - of InferredType objects.

What I'm currently trying is to mix in the methods and attributes of mixins into classes. In general this works like this:

I have a mixin defined:

qx.Mixin.define("my.Mixin", {
   members : {
     foo : function() {}

and I have a class that borrows the members of a Mixin like this:

qx.Class.define( "my.Class", {
   include : my.Mixin

If both definitions are in the same file, this is not a problem. But I got big problems if the Mixin is in a different file than the class.

The only way I'm aware of to get the InferredType object of the Mixin is to call "InferredType addType(char[])" in my InferEngine. If I do this, a new InferredType object is created for my.Class, and I never see the methods that where inferred during for my.Mixin. Also, even if I would get the identical object that contains the inferred members for my.Mixin, I could never be sure if it was inferred before my.Class or if it will be inferred somewhere later in the build cycle.

Am I missing something obvious here?

I would be content with creating a data structure that knows the correlations between mixins and classes, but to do this correctly I should know a) when inferring a Mixin is completed (something like "2nd pass done") and
b) when a type inference for a project starts and ends.

Are there any plans to switch the inferrer to incremental inferencing? That would complicate this plan.


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 information:
Address: Stephanienstrasse 20, 76133 Karlsruhe Germany
General Manager: Jochen Krause, Eric von der Heyden
Registered Office: Karlsruhe, Commercial Register Karlsruhe HRB 7883

Back to the top