|
org.netbeans.modules.projectapi/1 1.13 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ProjectConfigurationProvider<C extends ProjectConfiguration>
Provider of configurations for a project.
Should be registered in a project's lookup
.
Besides the implementor, only the project UI infrastructure is expected to use this class.
Field Summary | |
---|---|
static String |
PROP_CONFIGURATION_ACTIVE
Property name for the active configuration. |
static String |
PROP_CONFIGURATIONS
Property name of the set of configurations. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener lst)
Adds a listener to check for changes in PROP_CONFIGURATION_ACTIVE or PROP_CONFIGURATIONS . |
boolean |
configurationsAffectAction(String command)
Indicates if a project action is affected by the choice of configuration. |
void |
customize()
Customize this project's configurations. |
C |
getActiveConfiguration()
Gets the currently active configuration. |
Collection<C> |
getConfigurations()
Gets a list of configurations. |
boolean |
hasCustomizer()
Checks if this project can provide a GUI customizer for its configurations. |
void |
removePropertyChangeListener(PropertyChangeListener lst)
Removes a listener. |
void |
setActiveConfiguration(C configuration)
Sets the active configuration. |
Field Detail |
---|
static final String PROP_CONFIGURATION_ACTIVE
static final String PROP_CONFIGURATIONS
Method Detail |
---|
Collection<C> getConfigurations()
Should be called within read access
.
C getActiveConfiguration()
Should be called within read access
.
getConfigurations()
, or null only if that is empty)void setActiveConfiguration(C configuration) throws IllegalArgumentException, IOException
PROP_CONFIGURATION_ACTIVE
.
It should be true afterwards that configuration.equals(getActiveConfiguration())
though it might not be true that configuration == getActiveConfiguration()
.
If possible, the choice of configuration should be persisted for the next IDE session. If applicable, the persisted choice should be kept in per-user settings, not shared or versioned.
Should be called within write access
.
configuration
- new active configuration
IllegalArgumentException
- if the requested configuration is not a member of getConfigurations()
IOException
- if storing the configuration change failedboolean hasCustomizer()
customize()
may be calledvoid customize()
hasCustomizer()
is true.
May, for example, open the project properties dialog.
boolean configurationsAffectAction(String command)
ProjectConfiguration
in the context passed
to ActionProvider.invokeAction(java.lang.String, org.openide.util.Lookup)
.
A project is free to return false
even if the configuration
might affect the behavior of the action, if it simply does not
wish for such a GUI to be shown.
The likely values of command
are those actions
normally shown in the IDE's tool bar with main project bindings:
ActionProvider.COMMAND_BUILD
, ActionProvider.COMMAND_REBUILD
,
ActionProvider.COMMAND_RUN
, and ActionProvider.COMMAND_DEBUG
.
command
- one of ActionProvider.getSupportedActions()
void addPropertyChangeListener(PropertyChangeListener lst)
PROP_CONFIGURATION_ACTIVE
or PROP_CONFIGURATIONS
.
lst
- a listener to addvoid removePropertyChangeListener(PropertyChangeListener lst)
lst
- a listener to remove
|
org.netbeans.modules.projectapi/1 1.13 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |