T
- the extension object typeF
- the extension object factory typepublic abstract class ProjectExclusiveExtension<T,F extends de.cs3d.util.eclipse.extension.ExtensionObjectFactory<T>>
extends de.cs3d.util.eclipse.extension.exclusive.AbstractExclusiveExtension<T,F>
ExclusiveExtension
that saves/loads the current extension object in a
Project from the ProjectService
.Constructor and Description |
---|
ProjectExclusiveExtension(de.cs3d.util.eclipse.extension.ObjectExtension<T,F> extension,
String preferenceKey)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected F |
getDefaultFactory(List<F> factories)
Get the default factory to use
|
protected abstract String |
getDefaultId()
Get the identifier of the default factory to select, if no configuration
is present.
|
protected abstract F |
getFallbackFactory()
Get the factory to use when no extensions are configured
|
protected F |
getInitialFactory() |
protected boolean |
isLoadAllowed(F definition)
Determines if loading the given factory from the project is allowed
|
protected boolean |
isSaveAllowed(T current,
F definition)
Determines if saving the state to the project is allowed
|
addListener, getCurrent, getCurrentDefinition, getFactories, getFactories, getFactory, getFactoryCollections, getLastDefinition, init, isAllowReactivation, removeCurrent, removeListener, representsCurrent, setAllowReactivation, setCurrent, setCurrent
protected boolean isSaveAllowed(T current, F definition)
current
- the extension objectdefinition
- the extension object definitionprotected boolean isLoadAllowed(F definition)
definition
- the extension object definitionprotected F getInitialFactory()
protected abstract String getDefaultId()
protected F getDefaultFactory(List<F> factories)
factories
- the available factories (non-empty list)protected abstract F getFallbackFactory()
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a