Class AttributeValuesPage
- java.lang.Object
-
- org.eclipse.swt.widgets.Widget
-
- org.eclipse.swt.widgets.Control
-
- org.eclipse.swt.widgets.Scrollable
-
- org.eclipse.swt.widgets.Composite
-
- net.ssehub.easy.producer.ui.productline_editor.AbstractEASyEditorPage
-
- net.ssehub.easy.producer.ui.productline_editor.configuration.AttributeValuesPage
-
- All Implemented Interfaces:
ConfigurationTableEditor.IUpdateListener,IEASyEditorPage,IConfigurationChangeListener,org.eclipse.jface.dialogs.IPageChangedListener,org.eclipse.swt.graphics.Drawable,org.eclipse.ui.IPropertyListener
public class AttributeValuesPage extends AbstractEASyEditorPage implements IConfigurationChangeListener, ConfigurationTableEditor.IUpdateListener
Editor for displaying and editing the temporary attribute settings to be passed configuration of the current project.- Author:
- Holger Eichelberger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classAttributeValuesPage.AttributeAssignmentStateDefines a specific assignment state for user-provided attribute values.private static classAttributeValuesPage.AttributeHeaderMenuThe header menu for attribute values.private classAttributeValuesPage.AttributeLabelProviderConcrete label provider for the attribute editor.private classAttributeValuesPage.AttributeTableEditorDefines a customized table editor.private classAttributeValuesPage.TemporaryAttributesConfigurationRepresents a temporary configuration for defining attribute values and acts as a controller for the model-level modifications.
-
Field Summary
Fields Modifier and Type Field Description private AttributeValuesPage.TemporaryAttributesConfigurationconfigprivate ConfigurationTableEditorconfigEditorprivate AttributeValuesPage.AttributeHeaderMenuheaderMenu
-
Constructor Summary
Constructors Constructor Description AttributeValuesPage(ProductLineProject plp, org.eclipse.swt.widgets.Composite parent)Creates a new attribute values page.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidaddAttribute(Attribute attribute)Adds an attribute to the configuration (via editing).(package private) voidclear()Clears all value assignments.voidclose()Optional method for specifying an on-closed action.voidconfigurationRefreshed(Configuration config)Notification that the whole configuration was refreshed, e.g.(package private) voidconvert(boolean group)Converts values to a group or non-group attribute values configuration.intgetConfigurationEntriesSize()Returns the number of configuration entries.intgetDecisionCount()Returns the number of configured decisions.booleangetGroupSelection()Returns the group selection state.static java.lang.StringgetKey(Attribute attribute)Returns an internal key for retrieving duplicates.java.lang.StringgetPageText()Returns the text label for the editor page.static java.lang.StringgetQualifiedAppendix(Attribute attribute)Returns the display appendix for the qualified name.voiditemChanged(Configuration config, IDecisionVariable changedVariable, Value oldValue)Notification that aDecisionVariablechanged inside theConfiguration.protected voidpageActivated()This method will be called, when this editor page becomes active.voidpropertyChanged(java.lang.Object source, int propId)voidrefresh()Refreshes the shown content of the current project.private voidrefreshConfigEditor()Refreshes the configuration editor.(package private) voidremoveSelected()Remove the selected value assignment.voidstateChanged(Configuration config, IDecisionVariable changedVariable)Notification that the state of aDecisionVariablehas been changed inside theConfiguration.voidupdateTriggered()Called during an update.-
Methods inherited from class net.ssehub.easy.producer.ui.productline_editor.AbstractEASyEditorPage
createForm, createSection, createSection, dispose, doSave, getContentPane, getProductLineProject, getToolkit, pageChanged, register, setDirty, setFocus
-
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setLayout, setLayoutDeferred, setTabList
-
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
-
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
-
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.ssehub.easy.producer.ui.productline_editor.IEASyEditorPage
getDisplay, isDisposed
-
-
-
-
Field Detail
-
configEditor
private ConfigurationTableEditor configEditor
-
headerMenu
private AttributeValuesPage.AttributeHeaderMenu headerMenu
-
config
private AttributeValuesPage.TemporaryAttributesConfiguration config
-
-
Constructor Detail
-
AttributeValuesPage
public AttributeValuesPage(ProductLineProject plp, org.eclipse.swt.widgets.Composite parent)
Creates a new attribute values page.- Parameters:
plp- TheProductLineProjectedited in this editor page.parent- The parent, holding this editor page
-
-
Method Detail
-
getKey
public static java.lang.String getKey(Attribute attribute)
Returns an internal key for retrieving duplicates.- Parameters:
attribute- the attribute to return the key for- Returns:
- the key
-
getQualifiedAppendix
public static java.lang.String getQualifiedAppendix(Attribute attribute)
Returns the display appendix for the qualified name.- Parameters:
attribute- the attribute to return the appendix for- Returns:
- the appendix
-
refresh
public void refresh()
Description copied from interface:IEASyEditorPageRefreshes the shown content of the current project. This method should be calles if the contant inside the editor has been changed and should also affect other editor parts.- Specified by:
refreshin interfaceIEASyEditorPage
-
getPageText
public final java.lang.String getPageText()
Description copied from interface:IEASyEditorPageReturns the text label for the editor page. This is for creating labels/tabs in an editor.- Specified by:
getPageTextin interfaceIEASyEditorPage- Returns:
- The text label for the editor page (must not be null).
-
pageActivated
protected void pageActivated()
Description copied from class:AbstractEASyEditorPageThis method will be called, when this editor page becomes active.- Specified by:
pageActivatedin classAbstractEASyEditorPage
-
propertyChanged
public void propertyChanged(java.lang.Object source, int propId)- Specified by:
propertyChangedin interfaceorg.eclipse.ui.IPropertyListener
-
close
public void close()
Description copied from class:AbstractEASyEditorPageOptional method for specifying an on-closed action.- Specified by:
closein classAbstractEASyEditorPage
-
getConfigurationEntriesSize
public int getConfigurationEntriesSize()
Returns the number of configuration entries.- Returns:
- the number of configuration entries
-
addAttribute
void addAttribute(Attribute attribute)
Adds an attribute to the configuration (via editing).- Parameters:
attribute- the new attribute
-
itemChanged
public void itemChanged(Configuration config, IDecisionVariable changedVariable, Value oldValue)
Notification that aDecisionVariablechanged inside theConfiguration.- Specified by:
itemChangedin interfaceIConfigurationChangeListener- Parameters:
config- TheConfigurationwhere the change occurred.changedVariable- TheDecisionVariablewhich changed.oldValue- the old value ofchangedVariablebefore the change
-
configurationRefreshed
public void configurationRefreshed(Configuration config)
Notification that the whole configuration was refreshed, e.g. because the project was reparsed.- Specified by:
configurationRefreshedin interfaceIConfigurationChangeListener- Parameters:
config- The configuration which was refreshed.
-
clear
void clear()
Clears all value assignments.
-
removeSelected
void removeSelected()
Remove the selected value assignment.
-
convert
void convert(boolean group)
Converts values to a group or non-group attribute values configuration. Converting to a grouped configuration may imply data loss.- Parameters:
group- convert to a group or non-group configuration
-
refreshConfigEditor
private void refreshConfigEditor()
Refreshes the configuration editor.
-
updateTriggered
public void updateTriggered()
Called during an update.- Specified by:
updateTriggeredin interfaceConfigurationTableEditor.IUpdateListener
-
getDecisionCount
public int getDecisionCount()
Returns the number of configured decisions.- Returns:
- the number of decisions
-
getGroupSelection
public boolean getGroupSelection()
Returns the group selection state.- Returns:
- the group selection state
-
stateChanged
public void stateChanged(Configuration config, IDecisionVariable changedVariable)
Description copied from interface:IConfigurationChangeListenerNotification that the state of aDecisionVariablehas been changed inside theConfiguration.- Specified by:
stateChangedin interfaceIConfigurationChangeListener- Parameters:
config- TheConfigurationwhere the change occurred.changedVariable- TheDecisionVariablewhich changed.
-
-