I have a plug-in and want to detect when projects are added to workspace, to set some project settings from my plug-in code, Any Ideas.
Specially i want to call setHidden in some resources that are derived files, as this settings seems to not be part of the project, i mean whenever a resources is hidden seems to not persist if i import the project in a new workspace.
Ironically, I just wrote something like this yesterday. It is a bit more complicated than you would like. Here is a code snippet for you to play with:
Then, you need to add this ProjectListener to the Workspace, preferably in the
startmethod of your plugin activator:And then you want to remove it in the
stopmethod. I literally just wrote this code yesterday. I hope it helps.