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
Anselm R Garbe
<[email protected]
m> To
Sent by: [email protected]
wtp-dev-boun...@e cc
clipse.org
Subject
[wtp-dev] JSDT InferEngine issues
06/30/2009 11:36
AM
Please respond to
"General
discussion of
project-wide or
architectural
issues."
<wtp-...@eclipse.
org>
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
[email protected]
https://dev.eclipse.org/mailman/listinfo/wtp-dev
<<inline: graycol.gif>>
<<inline: pic07034.gif>>
<<inline: ecblank.gif>>
_______________________________________________ wtp-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/wtp-dev
