How to catch a moment when Eclipse is creating a new project?
问题 I am developing a CDT plug-in for Eclipse IDE. I want to write to a project-scoped preference file when creating a project or just store an info to identify this project later and write to a file. How can I seize a moment when Eclipse is creating a new project and store some info about it? 回答1: You can use an IResourceChangeListener listener to listen for all resource changes: ResourcesPlugin.getWorkspace().addResourceChangeListener(listener); The listener implements the single method: public