|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
de.upb.swt.epctools.plugin.editor.EpctoolsEditor
public class EpctoolsEditor
This class represents an EPC editor based on GEF/Eclipse. This is the main class of the epctools project. Note: GraphicalEditorWithPalette is deprecated.
| Nested Class Summary | |
|---|---|
(package private) class |
EpctoolsEditor.Button10Listener
|
(package private) class |
EpctoolsEditor.Button1Listener
|
(package private) class |
EpctoolsEditor.Button2Listener
|
(package private) class |
EpctoolsEditor.Button3Listener
|
(package private) class |
EpctoolsEditor.Button4Listener
|
(package private) class |
EpctoolsEditor.Button5Listener
|
(package private) class |
EpctoolsEditor.Button6Listener
|
(package private) class |
EpctoolsEditor.Button7Listener
|
(package private) class |
EpctoolsEditor.Button8Listener
|
(package private) class |
EpctoolsEditor.Button9Listener
|
(package private) class |
EpctoolsEditor.ButtonR1Listener
|
(package private) class |
EpctoolsEditor.NextStateAction
|
(package private) class |
EpctoolsEditor.ProcessFolderAction
|
| Field Summary | |
|---|---|
private org.eclipse.gef.ui.actions.ActionRegistry |
m_action_registry
|
(package private) org.eclipse.swt.widgets.Button |
m_button_1
|
(package private) org.eclipse.swt.widgets.Button |
m_button_10
|
(package private) org.eclipse.swt.widgets.Button |
m_button_11
|
(package private) org.eclipse.swt.widgets.Button |
m_button_12
|
(package private) org.eclipse.swt.widgets.Button |
m_button_2
|
(package private) org.eclipse.swt.widgets.Button |
m_button_3
|
(package private) org.eclipse.swt.widgets.Button |
m_button_4
|
(package private) org.eclipse.swt.widgets.Button |
m_button_5
|
(package private) org.eclipse.swt.widgets.Button |
m_button_6
|
(package private) org.eclipse.swt.widgets.Button |
m_button_7
|
(package private) org.eclipse.swt.widgets.Button |
m_button_8
|
(package private) org.eclipse.swt.widgets.Button |
m_button_9
|
private org.eclipse.gef.DefaultEditDomain |
m_edit_domain
|
private EPC |
m_epc
|
private org.eclipse.core.resources.IFile |
m_file
|
private org.eclipse.gef.GraphicalViewer |
m_graphical_viewer
|
(package private) org.eclipse.swt.widgets.Label |
m_label_1
|
(package private) org.eclipse.swt.widgets.Label |
m_label_10
|
(package private) org.eclipse.swt.widgets.Label |
m_label_11
|
(package private) org.eclipse.swt.widgets.Label |
m_label_2
|
(package private) org.eclipse.swt.widgets.Label |
m_label_3
|
(package private) org.eclipse.swt.widgets.Label |
m_label_4
|
(package private) org.eclipse.swt.widgets.Label |
m_label_5
|
(package private) org.eclipse.swt.widgets.Label |
m_label_6
|
(package private) org.eclipse.swt.widgets.Label |
m_label_7
|
(package private) org.eclipse.swt.widgets.Label |
m_label_8
|
(package private) org.eclipse.swt.widgets.Label |
m_label_9
|
private EpctoolsPaletteRoot |
m_palette_root
|
private org.eclipse.gef.ui.palette.PaletteViewer |
m_palette_viewer
|
private java.util.List |
m_property_actions
|
private boolean |
m_save_needed
|
private java.util.List |
m_selection_actions
|
private org.eclipse.gef.KeyHandler |
m_shared_key_handler
|
private EPCSimulator |
m_simulator
|
private java.util.List |
m_stack_actions
|
private org.eclipse.gef.ui.parts.SelectionSynchronizer |
m_synchronizer
|
private EpctoolsXmlFile |
m_xml_data
|
private static int |
PALETTE_HEIGHT
|
private static int |
PALETTE_WIDTH
|
| Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
|---|
PROP_TITLE |
| Fields inherited from interface de.upb.swt.epctools.model.tools.ModelListener |
|---|
MSG_ARC_ADDED, MSG_ARC_RECONNECTED, MSG_ARC_REMOVED, MSG_BEND_POINT_CHANGE, MSG_CHANGED_ALGORITHM, MSG_CONSTRAINT_CHANGED, MSG_DESCRIPTION_CHANGED, MSG_FOLDERS_CHANGED, MSG_HIGHLIGHTING_CHANGED, MSG_IN_ARC_ADDED, MSG_IN_ARC_REMOVED, MSG_INFO_CHANGED, MSG_LOCATION_CHANGED, MSG_NAME_CHANGED, MSG_NODE_ADDED, MSG_NODE_REMOVED, MSG_OUT_ARC_ADDED, MSG_OUT_ARC_REMOVED, MSG_SIZE_CHANGED, MSG_SOURCE_CHANGED, MSG_STRUCTURE_CHANGED, MSG_TARGET_CHANGED |
| Fields inherited from interface org.eclipse.ui.IEditorPart |
|---|
PROP_DIRTY, PROP_INPUT |
| Constructor Summary | |
|---|---|
EpctoolsEditor()
Main editor initialization |
|
| Method Summary | |
|---|---|
void |
commandStackChanged(java.util.EventObject event)
|
protected void |
configureGraphicalViewer()
|
protected void |
createActions()
|
protected void |
createGraphicalViewer(org.eclipse.swt.widgets.Composite parent)
This function creates the GraphicalViewer on the specified Composite. |
protected void |
createPaletteViewer(org.eclipse.swt.widgets.Composite parent)
|
void |
createPartControl(org.eclipse.swt.widgets.Composite parent)
|
void |
dispose()
|
void |
doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
|
void |
doSaveAs()
|
protected void |
firePropertyChange(int property)
|
protected org.eclipse.gef.ui.actions.ActionRegistry |
getActionRegistry()
This function lazily creates and returns the action registry. |
java.lang.Object |
getAdapter(java.lang.Class type)
Returns the adapter for the specified key. |
protected org.eclipse.gef.commands.CommandStack |
getCommandStack()
Returns the command stack. |
protected org.eclipse.gef.KeyHandler |
getCommonKeyHandler()
|
protected org.eclipse.gef.DefaultEditDomain |
getEditDomain()
Returns the edit domain. |
protected org.eclipse.gef.GraphicalViewer |
getGraphicalViewer()
Returns the graphical viewer. |
void |
getMessage(int msg_id)
This method is called upon changes on the model object. |
protected java.util.List |
getPropertyActions()
Returns the list of IActions dependant on property
changes in the Editor. |
protected java.util.List |
getSelectionActions()
Returns the list of IActions dependant on changes in the
workbench's ISelectionService. |
protected org.eclipse.gef.ui.parts.SelectionSynchronizer |
getSelectionSynchronizer()
Returns the selection syncronizer object. |
protected java.util.List |
getStackActions()
Returns the list of IActions dependant on the
CommmandStack's state. |
void |
gotoMarker(org.eclipse.core.resources.IMarker marker)
|
protected void |
hookGraphicalViewer()
This function hooks the GraphicalViewer to the rest of the Editor. |
void |
init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput input)
|
protected void |
initializeActionRegistry()
This function initializes the ActionRegistry. |
protected void |
initializeGraphicalViewer()
|
boolean |
isDirty()
|
boolean |
isSaveAsAllowed()
|
void |
repaintInformation()
|
void |
selectionChanged(org.eclipse.ui.IWorkbenchPart part,
org.eclipse.jface.viewers.ISelection selection)
|
protected void |
setActionRegistry(org.eclipse.gef.ui.actions.ActionRegistry registry)
This function sets the ActionRegistry for this EditorPart. |
protected void |
setEditDomain(org.eclipse.gef.DefaultEditDomain ed)
Sets the EditDomain for this EditorPart. |
void |
setFocus()
|
protected void |
setGraphicalViewer(org.eclipse.gef.GraphicalViewer viewer)
This function sets the graphicalViewer for this EditorPart. |
protected void |
updateActions(java.util.List actionIds)
This function is a convenience method for updating a set of actions defined by the given List of action IDs. |
| Methods inherited from class org.eclipse.ui.part.EditorPart |
|---|
checkSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartName |
| Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
|---|
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy |
| Methods inherited from class org.eclipse.core.commands.common.EventManager |
|---|
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
|---|
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener |
| Field Detail |
|---|
private EPC m_epc
private EPCSimulator m_simulator
private EpctoolsXmlFile m_xml_data
private org.eclipse.core.resources.IFile m_file
private org.eclipse.gef.ui.palette.PaletteViewer m_palette_viewer
private EpctoolsPaletteRoot m_palette_root
private org.eclipse.gef.KeyHandler m_shared_key_handler
private org.eclipse.gef.DefaultEditDomain m_edit_domain
private org.eclipse.gef.GraphicalViewer m_graphical_viewer
private org.eclipse.gef.ui.actions.ActionRegistry m_action_registry
private org.eclipse.gef.ui.parts.SelectionSynchronizer m_synchronizer
private java.util.List m_selection_actions
private java.util.List m_stack_actions
private java.util.List m_property_actions
org.eclipse.swt.widgets.Button m_button_1
org.eclipse.swt.widgets.Button m_button_2
org.eclipse.swt.widgets.Button m_button_3
org.eclipse.swt.widgets.Button m_button_4
org.eclipse.swt.widgets.Button m_button_5
org.eclipse.swt.widgets.Button m_button_6
org.eclipse.swt.widgets.Button m_button_7
org.eclipse.swt.widgets.Button m_button_8
org.eclipse.swt.widgets.Button m_button_9
org.eclipse.swt.widgets.Button m_button_10
org.eclipse.swt.widgets.Button m_button_11
org.eclipse.swt.widgets.Button m_button_12
org.eclipse.swt.widgets.Label m_label_1
org.eclipse.swt.widgets.Label m_label_2
org.eclipse.swt.widgets.Label m_label_3
org.eclipse.swt.widgets.Label m_label_4
org.eclipse.swt.widgets.Label m_label_5
org.eclipse.swt.widgets.Label m_label_6
org.eclipse.swt.widgets.Label m_label_7
org.eclipse.swt.widgets.Label m_label_8
org.eclipse.swt.widgets.Label m_label_9
org.eclipse.swt.widgets.Label m_label_10
org.eclipse.swt.widgets.Label m_label_11
private boolean m_save_needed
private static final int PALETTE_WIDTH
private static final int PALETTE_HEIGHT
| Constructor Detail |
|---|
public EpctoolsEditor()
| Method Detail |
|---|
public void getMessage(int msg_id)
getMessage in interface ModelListenermsg_id - Message idpublic void repaintInformation()
public void init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput input)
throws org.eclipse.ui.PartInitException
init in interface org.eclipse.ui.IEditorPartinit in class org.eclipse.ui.part.EditorPartorg.eclipse.ui.PartInitExceptionprotected void initializeGraphicalViewer()
public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
doSave in interface org.eclipse.ui.ISaveablePartdoSave in class org.eclipse.ui.part.EditorPartpublic void doSaveAs()
doSaveAs in interface org.eclipse.ui.ISaveablePartdoSaveAs in class org.eclipse.ui.part.EditorPartpublic void gotoMarker(org.eclipse.core.resources.IMarker marker)
public boolean isDirty()
isDirty in interface org.eclipse.ui.ISaveablePartisDirty in class org.eclipse.ui.part.EditorPartpublic void commandStackChanged(java.util.EventObject event)
commandStackChanged in interface org.eclipse.gef.commands.CommandStackListenerpublic boolean isSaveAsAllowed()
isSaveAsAllowed in interface org.eclipse.ui.ISaveablePartisSaveAsAllowed in class org.eclipse.ui.part.EditorPartprotected void configureGraphicalViewer()
protected org.eclipse.gef.KeyHandler getCommonKeyHandler()
protected void createActions()
protected void createPaletteViewer(org.eclipse.swt.widgets.Composite parent)
protected void createGraphicalViewer(org.eclipse.swt.widgets.Composite parent)
Composite.
parent - the parent compositepublic void createPartControl(org.eclipse.swt.widgets.Composite parent)
createPartControl in interface org.eclipse.ui.IWorkbenchPartcreatePartControl in class org.eclipse.ui.part.WorkbenchPartpublic void dispose()
dispose in interface org.eclipse.ui.IWorkbenchPartdispose in class org.eclipse.ui.part.WorkbenchPartIWorkbenchPart.dispose()protected void firePropertyChange(int property)
firePropertyChange in class org.eclipse.ui.part.WorkbenchPartprotected org.eclipse.gef.ui.actions.ActionRegistry getActionRegistry()
public java.lang.Object getAdapter(java.lang.Class type)
IMPORTANT certain requests, such as the property sheet, may be
made before or after createPartControl(Composite) is called. The
order is unspecified by the Workbench.
getAdapter in interface org.eclipse.core.runtime.IAdaptablegetAdapter in class org.eclipse.ui.part.WorkbenchPartIAdaptable.getAdapter(java.lang.Class)protected org.eclipse.gef.commands.CommandStack getCommandStack()
protected org.eclipse.gef.DefaultEditDomain getEditDomain()
protected org.eclipse.gef.GraphicalViewer getGraphicalViewer()
protected java.util.List getPropertyActions()
IActions dependant on property
changes in the Editor. These actions should implement the
UpdateAction interface so that they can be updated in response to
property changes. An example is the "Save" action.
protected java.util.List getSelectionActions()
IActions dependant on changes in the
workbench's ISelectionService. These actions should implement the
UpdateAction interface so that they can be updated in response to
selection changes. An example is the Delete action.
protected org.eclipse.gef.ui.parts.SelectionSynchronizer getSelectionSynchronizer()
protected java.util.List getStackActions()
IActions dependant on the
CommmandStack's state. These actions should implement the
UpdateAction interface so that they can be updated in response to
command stack changes. An example is the "undo" action.
protected void hookGraphicalViewer()
protected void initializeActionRegistry()
ActionBarContributors and/or
ContextMenuProviders.
This method may be called on Editor creation, or lazily the first time
getActionRegistry() is called.
public void selectionChanged(org.eclipse.ui.IWorkbenchPart part,
org.eclipse.jface.viewers.ISelection selection)
selectionChanged in interface org.eclipse.ui.ISelectionListenerISelectionListener.selectionChanged(IWorkbenchPart,
ISelection)protected void setActionRegistry(org.eclipse.gef.ui.actions.ActionRegistry registry)
registry - the registryprotected void setEditDomain(org.eclipse.gef.DefaultEditDomain ed)
ed - the domainpublic void setFocus()
setFocus in interface org.eclipse.ui.IWorkbenchPartsetFocus in class org.eclipse.ui.part.WorkbenchPartIWorkbenchPart.setFocus()protected void setGraphicalViewer(org.eclipse.gef.GraphicalViewer viewer)
viewer - the graphical viewerprotected void updateActions(java.util.List actionIds)
action registry. If the
corresponding action is an UpdateAction, it will have its
update() method called.
actionIds - the list of IDs to update
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||