Class ModelEditorPage
- 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.ModelEditorPage
-
- All Implemented Interfaces:
IEmbeddedEditor.IDocumentStateListener,IEmbeddedEditor.IValidationStateListener,IEASyEditorPage,org.eclipse.jface.dialogs.IPageChangedListener,org.eclipse.swt.graphics.Drawable,org.eclipse.ui.IPropertyListener
public class ModelEditorPage extends AbstractEASyEditorPage implements IEmbeddedEditor.IValidationStateListener, IEmbeddedEditor.IDocumentStateListener
A model editor page for the product line editor which shows an embedded editor.- Author:
- Holger Eichelberger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classModelEditorPage.HeaderMenuImplements a generic header menu.
-
Field Summary
Fields Modifier and Type Field Description private static booleanEDITABLEprivate IEmbeddedEditoreditorprivate ModelEditorPage.HeaderMenuheaderMenuprivate java.lang.StringpageTitle
-
Constructor Summary
Constructors Constructor Description ModelEditorPage(ProductLineProject plp, ModelEditorConfigurer.IModelEditorConfigurer configurer, org.eclipse.swt.widgets.Composite parent, ModelInfo<?> info)Creates a model editor page.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Optional method for specifying an on-closed action.static ModelEditorPagecreatePage(ProductLineProject plp, org.eclipse.swt.widgets.Composite parent, ModelEditorConfigurer.IModelEditorConfigurer configurer, ModelInfo<?> info)Creates the editor page only if the underlying model resource as well as the embedded editor are available.protected booleandoSave()Is called by the parent to perform save operations if needed.java.lang.StringgetPageText()Returns the text label for the editor page.voidnotifyDocumentChanged()Notifies about a changed document.voidnotifyValidationState(boolean hasErrors)Notifies about a validation state change.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 voidsetEditor(IEmbeddedEditor editor)Defines the editor.-
Methods inherited from class net.ssehub.easy.producer.ui.productline_editor.AbstractEASyEditorPage
createForm, createSection, createSection, dispose, 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
-
EDITABLE
private static final boolean EDITABLE
- See Also:
- Constant Field Values
-
editor
private IEmbeddedEditor editor
-
pageTitle
private java.lang.String pageTitle
-
headerMenu
private ModelEditorPage.HeaderMenu headerMenu
-
-
Constructor Detail
-
ModelEditorPage
public ModelEditorPage(ProductLineProject plp, ModelEditorConfigurer.IModelEditorConfigurer configurer, org.eclipse.swt.widgets.Composite parent, ModelInfo<?> info)
Creates a model editor page.- Parameters:
plp- TheProductLineProjectedited in this editor page.configurer- the editor configurerparent- The parent, holding this editor page.info- the actual model info
-
-
Method Detail
-
setEditor
private void setEditor(IEmbeddedEditor editor)
Defines the editor.- Parameters:
editor- the actual viewer containing the editor
-
createPage
public static ModelEditorPage createPage(ProductLineProject plp, org.eclipse.swt.widgets.Composite parent, ModelEditorConfigurer.IModelEditorConfigurer configurer, ModelInfo<?> info)
Creates the editor page only if the underlying model resource as well as the embedded editor are available.- Parameters:
plp- theProductLineProjectedited in this editor page.parent- the parent, holding this editor page.configurer- the editor configurerinfo- the model info- Returns:
- the editor if it was possible to create it, null if not
-
propertyChanged
public void propertyChanged(java.lang.Object source, int propId)- Specified by:
propertyChangedin interfaceorg.eclipse.ui.IPropertyListener
-
getPageText
public 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).
-
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
-
pageActivated
protected void pageActivated()
Description copied from class:AbstractEASyEditorPageThis method will be called, when this editor page becomes active.- Specified by:
pageActivatedin classAbstractEASyEditorPage
-
close
public void close()
Description copied from class:AbstractEASyEditorPageOptional method for specifying an on-closed action.- Specified by:
closein classAbstractEASyEditorPage
-
notifyValidationState
public void notifyValidationState(boolean hasErrors)
Description copied from interface:IEmbeddedEditor.IValidationStateListenerNotifies about a validation state change.- Specified by:
notifyValidationStatein interfaceIEmbeddedEditor.IValidationStateListener- Parameters:
hasErrors-trueif the document validation indicates errors,falsein case of no errors
-
notifyDocumentChanged
public void notifyDocumentChanged()
Description copied from interface:IEmbeddedEditor.IDocumentStateListenerNotifies about a changed document.- Specified by:
notifyDocumentChangedin interfaceIEmbeddedEditor.IDocumentStateListener
-
doSave
protected boolean doSave()
Description copied from class:AbstractEASyEditorPageIs called by the parent to perform save operations if needed.- Overrides:
doSavein classAbstractEASyEditorPage- Returns:
trueif save was needed and performed,falseelse
-
-