|
Re: access include path from inferrence provider? [message #762278 is a reply to message #762257] |
Wed, 07 December 2011 19:53 |
|
It's not directly tied to that interface, as there are already ways to get at which libraries a project uses [IJavaScriptProject#getResolvedIncludepath()]. IInferenceFile provides a filename, or rather a path to the file. There's no information given about whether that's a system location or a path in the workspace, but that should also be something that can be figured out.
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
|
Re: access include path from inferrence provider? [message #764759 is a reply to message #762516] |
Mon, 12 December 2011 19:53 |
|
On 12/8/2011 3:31 AM, Philippe Marschall wrote:
> On 12/07/2011 08:53 PM, Nitin Dahyabhai wrote:
>> It's not directly tied to that interface, as there are already ways to
>> get at which libraries a project uses
>> [IJavaScriptProject#getResolvedIncludepath()]. IInferenceFile provides
>> a filename, or rather a path to the file. There's no information given
>> about whether that's a system location or a path in the workspace, but
>> that should also be something that can be figured out.
>
> Do you have some pointers to get me started? How do I get the
> IJavaScriptProject of a IInferenceFile?
The character array for the filename can be converted into a String,
turned into a Path, and then used with the normal IWorkspaceRoot methods
to find whether it's a path in the workspace or a system location. If
it's the former, finding the project is straightforward.
--
---
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
Re: access include path from inferrence provider? [message #765604 is a reply to message #764759] |
Wed, 14 December 2011 11:16 |
Philippe Marschall Messages: 121 Registered: July 2009 |
Senior Member |
|
|
On 12/12/2011 08:53 PM, Nitin Dahyabhai wrote:
> On 12/8/2011 3:31 AM, Philippe Marschall wrote:
>> On 12/07/2011 08:53 PM, Nitin Dahyabhai wrote:
>>> It's not directly tied to that interface, as there are already ways to
>>> get at which libraries a project uses
>>> [IJavaScriptProject#getResolvedIncludepath()]. IInferenceFile provides
>>> a filename, or rather a path to the file. There's no information given
>>> about whether that's a system location or a path in the workspace, but
>>> that should also be something that can be figured out.
>>
>> Do you have some pointers to get me started? How do I get the
>> IJavaScriptProject of a IInferenceFile?
>
> The character array for the filename can be converted into a String,
> turned into a Path, and then used with the normal IWorkspaceRoot methods
> to find whether it's a path in the workspace or a system location. If
> it's the former, finding the project is straightforward.
>
Thanks
Philippe
|
|
|
|
Re: access include path from inferrence provider? [message #768335 is a reply to message #767924] |
Mon, 19 December 2011 23:37 |
|
JavaScriptCore#create() and IJavaScriptProject#.isExists() are the right way to go about it (although if you must check for the nature yourself, org.eclipse.wst.jsdt.core.JavaScriptCore#NATURE_ID is the constant to use). For adapters, are you sure you're using the right key?
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
|
Powered by
FUDForum. Page generated in 0.04165 seconds