Class InsertInstantiatorDialog
- java.lang.Object
-
- org.eclipse.jface.window.Window
-
- org.eclipse.jface.dialogs.Dialog
-
- net.ssehub.easy.producer.ui.productline_editor.instantiator.InsertInstantiatorDialog
-
- All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider
public class InsertInstantiatorDialog extends org.eclipse.jface.dialogs.DialogCreates a dialog for inserting instantiators.- Author:
- Holger Eichelberger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classInsertInstantiatorDialog.ArgumentEditingSupportImplements argument editing support.private static classInsertInstantiatorDialog.ParamTableContentProviderImplements a parameter table content provider.private static classInsertInstantiatorDialog.ParamTableLabelProviderImplements a parameter table lable provider.
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.swt.widgets.Buttonbeforeprivate org.eclipse.jface.viewers.ComboViewercomboprivate TreeNode.InsertionPointinsertionPointprivate TreeNodenodeprivate org.eclipse.jface.viewers.TableViewerparamsprivate Scriptscript-
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
-
-
Constructor Summary
Constructors Constructor Description InsertInstantiatorDialog(org.eclipse.swt.widgets.Shell parentShell, Script script, TreeNode node, TreeNode.InsertionPoint insertionPoint)Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddOperations(IMetaType type, java.util.TreeMap<java.lang.String,IMetaOperation> sorter)Adds the operations of the giventype.private voidaddScript(Script script, java.util.Set<Script> done, java.util.TreeMap<java.lang.String,IMetaOperation> sorter)Adds a script if not already done as well as its parent scripts.protected voidconfigureShell(org.eclipse.swt.widgets.Shell shell)protected org.eclipse.swt.widgets.ControlcreateDialogArea(org.eclipse.swt.widgets.Composite parent)private voidfillParams(IMetaOperation op)Fills the parameter table.protected voidokPressed()private java.util.Collection<IMetaOperation>sortedInstantiators()Returns the sorted (available) instantiators.-
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, createButtonsForButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
-
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
-
-
-
-
Field Detail
-
combo
private org.eclipse.jface.viewers.ComboViewer combo
-
script
private Script script
-
node
private TreeNode node
-
insertionPoint
private TreeNode.InsertionPoint insertionPoint
-
params
private org.eclipse.jface.viewers.TableViewer params
-
before
private org.eclipse.swt.widgets.Button before
-
-
Constructor Detail
-
InsertInstantiatorDialog
public InsertInstantiatorDialog(org.eclipse.swt.widgets.Shell parentShell, Script script, TreeNode node, TreeNode.InsertionPoint insertionPoint)Default constructor.- Parameters:
parentShell- The parent shell.script- the script to insert intonode- the selected nodeinsertionPoint- the supported insertion points
-
-
Method Detail
-
configureShell
protected void configureShell(org.eclipse.swt.widgets.Shell shell)
- Overrides:
configureShellin classorg.eclipse.jface.window.Window
-
createDialogArea
protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
- Overrides:
createDialogAreain classorg.eclipse.jface.dialogs.Dialog
-
fillParams
private void fillParams(IMetaOperation op)
Fills the parameter table.- Parameters:
op- the operation to fill the parameter table with
-
sortedInstantiators
private java.util.Collection<IMetaOperation> sortedInstantiators()
Returns the sorted (available) instantiators.- Returns:
- the instantiators as operations
-
addScript
private void addScript(Script script, java.util.Set<Script> done, java.util.TreeMap<java.lang.String,IMetaOperation> sorter)
Adds a script if not already done as well as its parent scripts.- Parameters:
script- the script to be addeddone- the already processed scripts (to be modified as a side effect)sorter- a sorted signature-operation mapping (to be modified as a side effect)
-
addOperations
private void addOperations(IMetaType type, java.util.TreeMap<java.lang.String,IMetaOperation> sorter)
Adds the operations of the giventype.- Parameters:
type- the type to be addedsorter- a sorted signature-operation mapping (to be modified as a side effect)
-
okPressed
protected void okPressed()
- Overrides:
okPressedin classorg.eclipse.jface.dialogs.Dialog
-
-