Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] Getting type information?

What you want "Adobe InDesign API known to the DLTK _javascript_ IDE"  is what we already do and what dltk already supports
 
Look at the dom.support _javascript_ plugin
 
there you can insert your own Dom/Api
see IDesignTimeDOMProvider and IProposalHolder
 
Then if you do that and you return the right stuff you have also full code completion that you want below
In our script editor the code completion works for example like this:
 
var record = foundset.getRecord(0);
var relatedRecord = record.relationfoundset.getRecord(1);
var substring = relatedRecord.astringColumn.sub(0,5);
 
the above code can be completely done by code completion. (these are mixed java and js objects)
 
johan


On Mon, May 4, 2009 at 13:14, Clemens Anhuth <clemens@xxxxxxxxxxxxx> wrote:
Hello everyone.

Does DLTK offer a standard mechanism to ask for the type of, for example, a variable? Code example:

###
1: var x = "";
2: function getX() {
3:   return x;
4: }
5:
6: var y = getX();
7: y.
###

Or:

###
1: var x = "";
2: var y = x;
3: y.
###

I would like to be able to ask DLTK for the type of y in line 7 of the first example, or in line 3 of the second example, and get "String" or so as a reply.

I suspect that at the moment the DLTK API does not provide access to this information in the engines. Is that correct?



Later, I would need to declare APIs and have the respective DLTK engines use these "other" API declarations in their parsers. That way I could make the Adobe InDesign API known to the DLTK _javascript_ IDE. Has this been considered yet?



With best regards

Clemens Anhuth


--
www.froglogic.com - Squish - Multi-Platform GUI Testing

_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev


Back to the top