Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » How to inform JSDT infer engine to load a specified file?
icon5.gif  How to inform JSDT infer engine to load a specified file? [message #515141] Wed, 17 February 2010 16:14 Go to next message
sean lee is currently offline sean lee
Messages: 2
Registered: February 2010
Junior Member
Hello all,

In this customized JSDT infer engine in a plug-in, I want the infer engine to infer certain JavaScript files. But it seems that eclipse only infers the single file which is currently opened in the editor.


To give an specific example, I have two files: A.js and B.js. In A.js I defined a super class of another class defined in B. So when B.js is opened in the editor, I want the jsdt infer engine to infer both A.js and B.js. Unfortunately, Eclipse only infers B.js. Is there any API that allows me to call? It might be API call as "InferEngine.includeInfer("A.js")".


Thanks

Re: How to inform JSDT infer engine to load a specified file? [message #515183 is a reply to message #515141] Wed, 17 February 2010 21:54 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2237
Registered: July 2009
Senior Member
On 2/17/2010 4:14 PM, sean lee wrote:
> Hello all,
> In this customized JSDT infer engine in a plug-in, I want the infer
> engine to infer certain JavaScript files. But it seems that eclipse only
> infers the single file which is currently opened in the editor.
>
> To give an specific example, I have two files: A.js and B.js. In A.js I
> defined a super class of another class defined in B. So when B.js is
> opened in the editor, I want the jsdt infer engine to infer both A.js
> and B.js. Unfortunately, Eclipse only infers B.js. Is there any API that
> allows me to call? It might be API call as
> "InferEngine.includeInfer("A.js")".

I thought I already answered this in a bug report earlier today,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=303103 . If the two files
are on the Include Path of a JavaScript project, the infer engines will
be run on them both automatically. Even then, just running the
InferEngine on both files isn't useful by itself.

What are you hoping to accomplish by running the InferEngine on both files?

--

Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: How to inform JSDT infer engine to load a specified file? [message #515374 is a reply to message #515183] Thu, 18 February 2010 10:36 Go to previous message
sean lee is currently offline sean lee
Messages: 2
Registered: February 2010
Junior Member

Thanks for the reply. By running the infer engine on both files, I want to use the auto-completion (code assistant) for JavaScript subclasses. That is, currently if we define a field, say, A.foo in A.js, and when we type in "this." in B.js, I want the auto-completion menu to fill the rest part, which should be "this.foo".

Moreover, there are 100 JavaScript files in our test environment. All of them are under the same folder. Certainly, we can add the folder into the include path of the project, but the system's performance will therefore be slowed down.


Nitin Dahyabhai wrote on Wed, 17 February 2010 21:54


I thought I already answered this in a bug report earlier today,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=303103 . If the two files
are on the Include Path of a JavaScript project, the infer engines will
be run on them both automatically. Even then, just running the
InferEngine on both files isn't useful by itself.

What are you hoping to accomplish by running the InferEngine on both files?

--

Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational

Previous Topic:Checking WTP version
Next Topic:Memory Profile Tool for Tomcat
Goto Forum:
  


Current Time: Tue Jul 29 19:05:17 EDT 2014

Powered by FUDForum. Page generated in 0.02064 seconds