pl.edu.agh.cast.schema.editor
Class SchemaEditor

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.EditorPart
              extended by org.eclipse.gef.ui.parts.GraphicalEditor
                  extended by org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette
                      extended by pl.edu.agh.cast.editor.AbstractEditor<ISchemaDataSet,IVisualSchemaDataSet,ISchemaDiagram>
                          extended by pl.edu.agh.cast.schema.editor.SchemaEditor
All Implemented Interfaces:
PropertyChangeListener, EventListener, org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.gef.commands.CommandStackEventListener, org.eclipse.gef.commands.CommandStackListener, org.eclipse.ui.IEditorPart, org.eclipse.ui.ISaveablePart, org.eclipse.ui.ISaveablePart2, org.eclipse.ui.ISelectionListener, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation

public class SchemaEditor
extends AbstractEditor<ISchemaDataSet,IVisualSchemaDataSet,ISchemaDiagram>
implements PropertyChangeListener, org.eclipse.gef.commands.CommandStackEventListener

Schema editor.

Author:
AGH CAST Team

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette
org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette.CustomPalettePage
 
Field Summary
static String ID
          Editor ID.
static String RES_CONNECTION_TOOL_ID
          Connection tool resource id.
 
Fields inherited from class pl.edu.agh.cast.editor.AbstractEditor
log
 
Fields inherited from interface org.eclipse.ui.ISaveablePart2
CANCEL, DEFAULT, NO, YES
 
Fields inherited from interface org.eclipse.ui.ISaveablePart
PROP_DIRTY
 
Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
SchemaEditor()
          Constructor.
 
Method Summary
protected  void createActions()
          
protected  List<org.eclipse.gef.palette.PaletteContainer> createNodeCreationToolDrawers()
          
protected  org.eclipse.gef.KeyHandler getCommonKeyHandler()
           
protected  org.eclipse.gef.ContextMenuProvider getContextMenuProvider()
          Return the context menu provider.
 org.eclipse.gef.EditPartFactory getEditPartsFactory()
          Gets EditPartFactory for this editor.
protected  double getMaximumAllowedInitialZoom()
          
protected  double getMinimumAllowedInitialZoom()
          
protected  org.eclipse.gef.palette.PaletteRoot getPaletteRoot()
          
protected  void initializeGraphicalViewer()
          
protected  DiagramEditorInput<ISchemaDataSet,IVisualSchemaDataSet,ISchemaDiagram> modelToDiagram(ModelEditorInput<? extends IDataSet<? extends IElement>> input)
          Convert the model editor input into diagram.
protected  void setInput(org.eclipse.ui.IEditorInput input)
          
 
Methods inherited from class pl.edu.agh.cast.editor.AbstractEditor
configureGraphicalViewer, createPaletteViewerProvider, dispose, doSave, doSaveWithoutMessageBox, executeCommand, getAdapter, getDiagram, getEditorInput, getEditorViewport, getPalettePreferences, getPartName, getPrintableLayer, getTitle, getTitleToolTip, init, promptToSaveOnClose, propertyChange, refresh, registerContextMenu, selectElements, stackChanged
 
Methods inherited from class org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette
createPalettePage, createPartControl, getGraphicalControl, getPaletteViewerProvider, setEditDomain
 
Methods inherited from class org.eclipse.gef.ui.parts.GraphicalEditor
commandStackChanged, createGraphicalViewer, doSaveAs, firePropertyChange, getActionRegistry, getCommandStack, getEditDomain, getGraphicalViewer, getPropertyActions, getSelectionActions, getSelectionSynchronizer, getStackActions, hookGraphicalViewer, initializeActionRegistry, isDirty, isSaveAsAllowed, selectionChanged, setActionRegistry, setFocus, setGraphicalViewer, updateActions
 
Methods inherited from class org.eclipse.ui.part.EditorPart
checkSite, getEditorSite, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInputWithNotify, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartProperties, getPartProperty, getSite, 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 java.beans.PropertyChangeListener
propertyChange
 
Methods inherited from interface org.eclipse.gef.commands.CommandStackEventListener
stackChanged
 
Methods inherited from interface org.eclipse.ui.ISaveablePart
doSaveAs, isDirty, isSaveAsAllowed, isSaveOnCloseNeeded
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitleImage, removePropertyListener
 

Field Detail

ID

public static final String ID
Editor ID. It is the same as in extension org.eclipse.ui.editor in plugin.xml file.

See Also:
Constant Field Values

RES_CONNECTION_TOOL_ID

public static final String RES_CONNECTION_TOOL_ID
Connection tool resource id.

See Also:
Constant Field Values
Constructor Detail

SchemaEditor

public SchemaEditor()
Constructor.

Method Detail

getContextMenuProvider

protected org.eclipse.gef.ContextMenuProvider getContextMenuProvider()
Return the context menu provider. See ContextMenuProvider.

Specified by:
getContextMenuProvider in class AbstractEditor<ISchemaDataSet,IVisualSchemaDataSet,ISchemaDiagram>
Returns:
The context menu provider.
See Also:
AbstractEditor.getContextMenuProvider()

getEditPartsFactory

public org.eclipse.gef.EditPartFactory getEditPartsFactory()
Gets EditPartFactory for this editor.

Specified by:
getEditPartsFactory in class AbstractEditor<ISchemaDataSet,IVisualSchemaDataSet,ISchemaDiagram>
Returns:
EditPartFactory
See Also:
AbstractEditor.getEditPartsFactory()

setInput

protected void setInput(org.eclipse.ui.IEditorInput input)

Overrides:
setInput in class AbstractEditor<ISchemaDataSet,IVisualSchemaDataSet,ISchemaDiagram>
See Also:
AbstractEditor.setInput(org.eclipse.ui.IEditorInput)

getMaximumAllowedInitialZoom

protected double getMaximumAllowedInitialZoom()

Specified by:
getMaximumAllowedInitialZoom in class AbstractEditor<ISchemaDataSet,IVisualSchemaDataSet,ISchemaDiagram>
Returns:
maximum allowed initial zoom for this editor, expressed as a double where 1.0 is 100% zoom
See Also:
AbstractEditor.getMaximumAllowedInitialZoom()

getMinimumAllowedInitialZoom

protected double getMinimumAllowedInitialZoom()

Specified by:
getMinimumAllowedInitialZoom in class AbstractEditor<ISchemaDataSet,IVisualSchemaDataSet,ISchemaDiagram>
Returns:
minimum allowed initial zoom for this editor, expressed as a double where 1.0 is 100% zoom
See Also:
AbstractEditor.getMinimumAllowedInitialZoom()

modelToDiagram

protected DiagramEditorInput<ISchemaDataSet,IVisualSchemaDataSet,ISchemaDiagram> modelToDiagram(ModelEditorInput<? extends IDataSet<? extends IElement>> input)
                                                                                         throws EditorException
Convert the model editor input into diagram.

Specified by:
modelToDiagram in class AbstractEditor<ISchemaDataSet,IVisualSchemaDataSet,ISchemaDiagram>
Parameters:
input - The editor input containing the presentation and visual data set.
Returns:
Diagram containing the presentation and visual data sets.
Throws:
EditorException
See Also:
AbstractEditor.modelToDiagram(pl.edu.agh.cast.editor.input.ModelEditorInput)

createActions

protected void createActions()

Overrides:
createActions in class AbstractEditor<ISchemaDataSet,IVisualSchemaDataSet,ISchemaDiagram>
See Also:
AbstractEditor.createActions()

getCommonKeyHandler

protected org.eclipse.gef.KeyHandler getCommonKeyHandler()
Overrides:
getCommonKeyHandler in class AbstractEditor<ISchemaDataSet,IVisualSchemaDataSet,ISchemaDiagram>

initializeGraphicalViewer

protected void initializeGraphicalViewer()

Overrides:
initializeGraphicalViewer in class AbstractEditor<ISchemaDataSet,IVisualSchemaDataSet,ISchemaDiagram>
See Also:
AbstractEditor.initializeGraphicalViewer()

getPaletteRoot

protected org.eclipse.gef.palette.PaletteRoot getPaletteRoot()

Overrides:
getPaletteRoot in class AbstractEditor<ISchemaDataSet,IVisualSchemaDataSet,ISchemaDiagram>
See Also:
AbstractEditor.getPaletteRoot()

createNodeCreationToolDrawers

protected List<org.eclipse.gef.palette.PaletteContainer> createNodeCreationToolDrawers()

See Also:
pl.edu.agh.cast.editor.AbstractEditor#createNodeCreationToolDrawers()


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.