Project component settings dialog with no project

Hi,
I have created a plugin for projects (projectcomponent) and it has a settings dialog.
But I want to disable the option in the idea settings o hide it like "Scope project settings".

Is it possible?

Digging into the code I've found the plugin.xml entry <skipForDummyProject/> but it doesn't work

2 comments
Comment actions Permalink

The best solution for this is to not implement Configurable in your ProjectComponent. With IDEA 6 and up, you write separate settings-classes like this:

]]>


and register them in the plugin.xml:

    
]]>


After that it's totally free to you when you load or change the settings object. You either let IDEA inject them into a project service, project component or module component by specifying the dependency through an additional parameter in the constructor, or by calling ServiceManager.getService(project, ProjectSettings.class).

IDEA loads the settings when they are needed and takes care of saving them. So you only need to implemented Configurable when you want the icon to show up on the settings page. Loadinig and saving of settings via the JDomExternalizer is the old way of doing it. The new one is a lot more convenient.

Cheers,
Robert

0
Comment actions Permalink

Thanks for the info,
But at least I show the same settings dialog for "default" project and the rest of projects.

0

Please sign in to leave a comment.