Interface ObservableLaunchConfigurationAttributeFactory
-
- All Known Implementing Classes:
ObservableLaunchConfigurationAdapter
public interface ObservableLaunchConfigurationAttributeFactory
This factory interface provides the required capabilities to define mappings between launch configuration attributes and observable variables. It simplifies creating launch configuration dialogs, as it enables you to use eclipse databindings in your editor logic.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ObservableLaunchConfigurationAttributeFactory.AttributeExtractor<T>
static interface
ObservableLaunchConfigurationAttributeFactory.AttributeSetter<T>
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IObservableValue<Boolean>
createBooleanAttribute(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 attributeIObservableValue<Integer>
createIntegerAttribute(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 attributeIObservableValue<String>
createStringAttribute(String id, String defaultValue)
Creates new observable string attribute.
-
-
-
Method Detail
-
createObservableAttribute
<T> IObservableValue<T> createObservableAttribute(String id, T defaultValue, ObservableLaunchConfigurationAttributeFactory.AttributeSetter<T> setter, ObservableLaunchConfigurationAttributeFactory.AttributeExtractor<T> getter)
Creates a new generic observable launch configuration attribute- 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.
-
createStringAttribute
IObservableValue<String> createStringAttribute(String id, String defaultValue)
Creates new observable string attribute.- Parameters:
id
- the id of the string attributedefaultValue
- the default value- Returns:
- an observable string value
-
createIntegerAttribute
IObservableValue<Integer> createIntegerAttribute(String id, int defaultValue)
Creates new observable integer attribute.- Parameters:
id
- the id of the integer attributedefaultValue
- the default value- Returns:
- an observable integer value
-
createBooleanAttribute
IObservableValue<Boolean> createBooleanAttribute(String id, boolean defaultValue)
Creates new observable boolean attribute.- Parameters:
id
- the id of the boolean attributedefaultValue
- the default value- Returns:
- an observable boolean value
-
createFromStringAttribute
<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 attribute- 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
-
-