[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[Dltk-dev] Teaching the Script Editors
|
Hi,
I'm successfully using DLTK 0.95 in my RCP application (based on Eclipse
3.4). In particular, I'm using the JavaScript, Python and Tcl modules
and they look very nice. Thanks a lot to you people! :-)
However, I'm trying to augment the editors a bit. In my application,
people can create scripts in either of the three languages. What I'd
like to provide is auto-completion for certain preconfigured objects.
For instance, the user might create a JavaScript script which runs in a
web browser. In that case, I'd like to be able to auto-complete certain
properties of the 'window' object. So before the editing starts, I'd
like to "teach" the editor about this.
I noticed that it works quite well if I (manually, for testing purposes)
insert a variable declaration (in JavaScript, in this case) at the
start, like
var window {
location: { href: "" },
foo: ..,
bar: ..,
};
After typing that, the editor (the 'conciler'?) knows about the
properties so I can nicely type window.<Ctrl+Space> and see the three
properties. Does anybody know how I can do this automatically, from
Java? Is there maybe some function to evaluate some given script code in
the current editor?
--
Frerich Raabe - raabe@xxxxxxxxxxxxx
www.froglogic.com - Multi-Platform GUI Testing