Pre-change listener? [message #64378] |
Sun, 22 June 2003 08:28  |
Eclipse User |
|
|
|
Hi,
I wonder if it is possible to get ElementChangedEvents (or something
equivalent) before a change to the JavaModel occurs. I suppose that
PRE_AUTO_BUILD events (as well as POST_CHANGE events) occur after the
change.
My problem is the following situation: When, for example, a class is deleted (along
with its methods), the ElementChangedEvent resp. the contained
IJavaElementDelta contains only the fact that the class itself was
deleted, but no information about its methods. But, since the class is no
longer existent, I cannot get any information about the methods that were
deleted. Is there any way to access that information? (Other than storing
a list of methods myself...)
Regards,
Simon
|
|
|
Re: Pre-change listener? [message #65146 is a reply to message #64378] |
Mon, 23 June 2003 07:24   |
Eclipse User |
|
|
|
Sorry Simon, but this is not currently possible. I doubt this would ever be
implemented, as this would require the Java model to parse every single
..java file to remember its structure in case it is deleted.
Jerome
"Simon Giesecke" <simon.giesecke@acm.org> wrote in message
news:pan.2003.06.22.12.28.24.300696@acm.org...
> Hi,
>
> I wonder if it is possible to get ElementChangedEvents (or something
> equivalent) before a change to the JavaModel occurs. I suppose that
> PRE_AUTO_BUILD events (as well as POST_CHANGE events) occur after the
> change.
>
> My problem is the following situation: When, for example, a class is
deleted (along
> with its methods), the ElementChangedEvent resp. the contained
> IJavaElementDelta contains only the fact that the class itself was
> deleted, but no information about its methods. But, since the class is no
> longer existent, I cannot get any information about the methods that were
> deleted. Is there any way to access that information? (Other than storing
> a list of methods myself...)
>
> Regards,
> Simon
>
|
|
|
|
Re: Pre-change listener? [message #65837 is a reply to message #65465] |
Tue, 24 June 2003 05:42  |
Eclipse User |
|
|
|
"Simon Giesecke" <simon.giesecke@acm.org> wrote in message
news:pan.2003.06.23.19.23.01.599222@acm.org...
> I thought the JavaModel already stores the structure (down to method
> level) for all classes? Or is there only a cache for some most recently
> used classes/compilation units?
No, the Java model doesn't stores the structure for all classes. As you
guessed, it does it only for the most recently used classes and compilation
units.
> Another point: I know that there currently is no such ResourceChangeEvent,
> but were it possible to introduce a PRE_CHANGE event that is fired before
> a change is committed?
Sorry I don't know the answer to this question. I would post it on the
eclipse.platform newsgroup where the Platform/Core team listens.
Jerome
|
|
|
Powered by
FUDForum. Page generated in 0.03742 seconds