|
|
|
Re: How can I get notified when java build path is changed [message #332915 is a reply to message #332911] |
Thu, 13 November 2008 19:42 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
On 11/13/2008 12:03 PM, Raymond wrote:
> Raymond wrote:
>
>> To be more specific, if the java build path of a project is changed, I
>> want to know what the change is (e.g. what jar/project/folder is
>> added/removed to/from the class path).
>
> I know a change of java build path invokes a resource change event but
> through resource change listener, I can only know the project is changed
> but I have no idea what the change is.
I would get the IJavaProject associated with the resource change event
[see org.eclipse.jdt.core.JavaCore.create(IProject)] and then see if you
can inspect its build path through the IJavaProject API.
Does the resource delta include the .classpath file? I'd expect it
would; that way you can distinguish changes that affect build path from
other project changes.
Hope this helps,
Eric
|
|
|
|
Re: How can I get notified when java build path is changed [message #332929 is a reply to message #332917] |
Fri, 14 November 2008 14:28 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
On 11/13/2008 3:25 PM, Raymond wrote:
> Eric Rizzo wrote:
>
>> I would get the IJavaProject associated with the resource change event
>> [see org.eclipse.jdt.core.JavaCore.create(IProject)] and then see if
>> you can inspect its build path through the IJavaProject API.
>
>> Does the resource delta include the .classpath file? I'd expect it
>> would; that way you can distinguish changes that affect build path
>> from other project changes.
>
>> Hope this helps,
>> Eric
>
> Thanks for your reply, Eric.
> Implementing a resource change listener is what I do now. The .classpath
> file is in the change delta but as what I said, I only know the file is
> changed but I don't know what the change is. I need more specific
> information. I want to know what is added/removed to/from the java build
> path.
I don't think there is any notification API at that level; that's why I
suggested getting the IJavaProject from the IProject in the delta.
You might have better luck by posting the question to the
eclipse.tools.jdt newsgroup; maybe the JDT gurus there know of an
alternative API that would help.
Eric
|
|
|
Powered by
FUDForum. Page generated in 0.04196 seconds