Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-dev] Problem with update on PRE_CLOSE

Hi all.

I've a problem with PRE_CLOSE.
I need to create/update a file in a project every time the project is closed. I registerd a IResourceChangeListener, but when I try to create the file I get a

org.eclipse.core.internal.utils.AssertionFailedException: Assertion failed:
Operation was not prepared.

I know that this is correct: workspace is locked during PRE events.
Searching through msg I found that a possibility is to use a builder.

http://dev.eclipse.org/newslists/news.eclipse.tools/msg34561.html

At this time I'do not want my "listener" to be persisted with the project so I'm looking for another way to do this.

What I need to save is the amount of time spent working on a particular project. I'm going to save this info in a file in each project. Is there a better place? I'd like this data to be easly accessible to user, for cut and paste, ecc. Now I'm saving this info in the dispose of the plugin, but if the user has closed the project I cannot :|

Any idea?

Thanks


Lorenzo



Back to the top