Class ObservableLaunchConfigurationAdapter
java.lang.Object
org.palladiosimulator.commons.ui.launch.ObservableLaunchConfigurationAdapter
- All Implemented Interfaces:
ObservableLaunchConfigurationAttributeFactory
public class ObservableLaunchConfigurationAdapter
extends Object
implements ObservableLaunchConfigurationAttributeFactory
This class serves as generic bridge between Eclipse Launch Configurations and the Eclipse databinding framework.
For details on its usage, please see
ObservableLaunchConfigurationAttributeFactory.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.palladiosimulator.commons.ui.launch.ObservableLaunchConfigurationAttributeFactory
ObservableLaunchConfigurationAttributeFactory.AttributeExtractor<T>, ObservableLaunchConfigurationAttributeFactory.AttributeSetter<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<String,Consumer<ILaunchConfigurationWorkingCopy>> protected final Map<String,Consumer<ILaunchConfigurationWorkingCopy>> protected final Map<String,Consumer<ILaunchConfiguration>> protected final Map<String,IObservableValue<?>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateBooleanAttribute(String id, boolean defaultValue) Creates new observable boolean attribute.<T> IObservableValue<T>createFromStringAttribute(String id, T defaultValue, Function<String, T> fromLCConverter, Function<T, String> toLCConverter) Creates a new observable based on a string launch configuration attributecreateIntegerAttribute(String id, int defaultValue) Creates new observable integer attribute.<T> IObservableValue<T>createObservableAttribute(String id, T defaultValue, ObservableLaunchConfigurationAttributeFactory.AttributeSetter<T> setter, ObservableLaunchConfigurationAttributeFactory.AttributeExtractor<T> getter) Creates a new generic observable launch configuration attributecreateStringAttribute(String id, String defaultValue) Creates new observable string attribute.voidinitializeFrom(ILaunchConfiguration configuration) Initialize values fromILaunchConfiguration.voidnotifyWhenDirty(Runnable dirtyNotification) voidperformApply(ILaunchConfigurationWorkingCopy workingCopy) Apply changes toILaunchConfigurationWorkingCopyvoidsetDefaults(ILaunchConfigurationWorkingCopy configuration) Initialize launch configuration with defaults.
-
Field Details
-
lcUpdates
-
mUpdates
-
defaults
-
observables
-
-
Constructor Details
-
ObservableLaunchConfigurationAdapter
public ObservableLaunchConfigurationAdapter()
-
-
Method Details
-
notifyWhenDirty
-
initializeFrom
Initialize values fromILaunchConfiguration. -
performApply
Apply changes toILaunchConfigurationWorkingCopy -
setDefaults
Initialize launch configuration with defaults. -
createStringAttribute
Description copied from interface:ObservableLaunchConfigurationAttributeFactoryCreates new observable string attribute.- Specified by:
createStringAttributein interfaceObservableLaunchConfigurationAttributeFactory- Parameters:
id- the id of the string attributedefaultValue- the default value- Returns:
- an observable string value
-
createIntegerAttribute
Description copied from interface:ObservableLaunchConfigurationAttributeFactoryCreates new observable integer attribute.- Specified by:
createIntegerAttributein interfaceObservableLaunchConfigurationAttributeFactory- Parameters:
id- the id of the integer attributedefaultValue- the default value- Returns:
- an observable integer value
-
createBooleanAttribute
Description copied from interface:ObservableLaunchConfigurationAttributeFactoryCreates new observable boolean attribute.- Specified by:
createBooleanAttributein interfaceObservableLaunchConfigurationAttributeFactory- Parameters:
id- the id of the boolean attributedefaultValue- the default value- Returns:
- an observable boolean value
-
createFromStringAttribute
public <T> IObservableValue<T> createFromStringAttribute(String id, T defaultValue, Function<String, T> fromLCConverter, Function<T, String> toLCConverter) Description copied from interface:ObservableLaunchConfigurationAttributeFactoryCreates a new observable based on a string launch configuration attribute- Specified by:
createFromStringAttributein interfaceObservableLaunchConfigurationAttributeFactory- Type Parameters:
T- the type of the observable object- Parameters:
id- the id of the string attributedefaultValue- the default valuefromLCConverter- the converter function from string to the observable object typetoLCConverter- the converter function from the object type to string- Returns:
- an observable value of the specified type
-
createObservableAttribute
public <T> IObservableValue<T> createObservableAttribute(String id, T defaultValue, ObservableLaunchConfigurationAttributeFactory.AttributeSetter<T> setter, ObservableLaunchConfigurationAttributeFactory.AttributeExtractor<T> getter) Description copied from interface:ObservableLaunchConfigurationAttributeFactoryCreates a new generic observable launch configuration attribute- Specified by:
createObservableAttributein interfaceObservableLaunchConfigurationAttributeFactory- Type Parameters:
T- the type of the observable value- Parameters:
id- the id of the launch configuration attributedefaultValue- the default value, if the attribute is not setsetter- the function to store an instance of the observable value in the launch configuration objectgetter- the function to get an instance of the observable value from the launch configuration object- Returns:
- an observable value.
-