Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] JSDT InferEngine issues

Hi Anselm,

If you want to request that the currentContext object be made public please open a bugzilla enhancement against the JSDT component. We may be able to do that in WTP 3.2.

However, some extensions of the inference engine don't need to work with the currentContext object directly, so you may be able to find a way to work around this problem.

I'm a little unclear of what your end goal is. If you have a library of pure _javascript_, the correct route to take is the use of a library. You'd want to extend the inference engine to handle specific language constructs that normal _javascript_ doesn't understand. An example would be extensions to handle Dojo declare or provide statements, so that they editor knows to treat Dojo classes as types.

Thanks,
Chris


Inactive hide details for Anselm R Garbe <garbeam@xxxxxxxxx>Anselm R Garbe <garbeam@xxxxxxxxx>


          Anselm R Garbe <garbeam@xxxxxxxxx>
          Sent by: wtp-dev-bounces@xxxxxxxxxxx

          06/30/2009 11:36 AM

          Please respond to
          "General discussion of project-wide or architectural issues." <wtp-dev@xxxxxxxxxxx>

To

wtp-dev@xxxxxxxxxxx

cc


Subject

[wtp-dev] JSDT InferEngine issues

Hi there,

I found Bradley's slides[1] and understand how to extend the JSDT
Editor with JSDoc'ed JS library specs using the given
JsGlobalScopeContainerInitializer and JsGlobalScopeContainerPage
extension points, but I'm curios about the inferrenceSupport extension
point.

I'm working on a Eclipse Plug-In that reads some JS API definitions
from a WebIDL[2] input parser. But instead parsing JS library input to
declare my JS API definitions, I'd really like to extend the existing
InferEngine during runtime in a more programmatic way. I grep'ed
through the source and conclude that I'd need to inject my definitions
into the InferEngine.Context class, unfortunately that has been
declared with restricted package scope access only. So doing so would
require an ugly package hack in order to call
InferEngine.currentContext.addMember() when I initialize my derived
InferEngine class.

But perhaps I'm missing something about this inferrenceSupport
extension point. I don't really want to write my InferEngine from
scratch or clone the existing code. So is anyone aware of some way to
inject global API definitions using just the inferrenceSupport
extension point and not relying on JSDoc API definitions that are
parsed into the AST and visited by the InferEngine?

[1]
http://www.eclipsecon.org/2008/sub/attachments/Extending_the_JavaScript_Development_Toolkit.pdf
[2]
http://www.w3.org/TR/WebIDL/

Kind regards,
Anselm
_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev

GIF image

GIF image

GIF image


Back to the top