Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Resource Listner not listening!

Hi

I am using resource listener for the event IResourceChangeEvent.PRE_BUILD.

I have a class MyResourceChangeListener for this.
its constructor says:
public MyResourceChangeListener() {
        ResourcesPlugin.getWorkspace().addResourceChangeListener (
                 this, IResourceChangeEvent.PRE_BUILD);

       }

And in the class where I am creating a new project i am doing this:

while creating a new project :

ResourcesPlugin.getWorkspace().addResourceChangeListener (
                    new MYResourceChangeListener(), IResourceChangeEvent.PRE_BUILD);


In the resourcechange() of MyResourceChangeListener Class, i am doing adding some project specific files.

Everything works fine for me till here. Whenever I am pressing the "build project " the new files are  generated .

But when i close eclipse and then start it again, these files are not getting generated, when i select "build project"

I put a break point in my resource listener class and observe that its not getting called when i select the "build project" option for a project that i created before restarting the eclipse.

Am i missing something.?

How to add a listener so that it always listen to the event even after restarting the eclipse.

please help.

Thanks
Padam 
 



Unlimited freedom, unlimited storage. Get it now

Back to the top