|
Runtime | ||||||||||
| 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
org.eclipse.gef.ui.parts.GraphicalEditor
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor
| Field Summary | |
protected static int |
ID_OUTLINE
teh ID of the outline |
protected static int |
ID_OVERVIEW
the id of the over view |
protected PreferenceStore |
workspaceViewerPreferenceStore
the work space viewer preference store |
| Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
| Fields inherited from interface org.eclipse.ui.IEditorPart |
PROP_DIRTY, PROP_INPUT |
| Constructor Summary | |
DiagramEditor()
Creates a new DiagramEditor instance |
|
| Method Summary | |
protected void |
addDefaultPreferences()
Adds the default preferences to the workspace viewer preference store. |
static void |
addDefaultPreferences(PreferenceStore store,
PreferencesHint preferencesHint)
Adds the default preferences to the specified preference store. |
protected void |
clearGraphicalViewerContents()
Clears the contents of the graphical viewer |
protected void |
closeEditor(boolean save)
A utility to close the editor |
protected void |
configureDiagramEditDomain()
Configures my diagram edit domain with its command stack. |
protected void |
configureGraphicalViewer()
Configures the graphical viewer (the primary viewer of the editor) |
protected ActionManager |
createActionManager()
|
protected void |
createActions()
Do nothing |
protected void |
createDiagramEditDomain()
Creates a diagram edit domain |
protected void |
createGraphicalViewer(Composite parent)
|
protected IOperationHistoryListener |
createHistoryListener()
Gets my operation history listener. |
protected IOperationHistory |
createOperationHistory()
Create my operation history. |
protected ScrollingGraphicalViewer |
createScrollingGraphicalViewer()
Creates a ScrollingGraphicalViewer without the drop adapter which excludes drag and drop functionality from other defined views (XML) Subclasses must override this method to include the DnD functionality |
void |
dispose()
Disposes this editor by: 3. |
protected ActionManager |
getActionManager()
Gets the action manager for this diagram editor. |
java.lang.Object |
getAdapter(java.lang.Class type)
|
java.lang.String |
getContributorId()
|
protected int |
getDefaultOutlineViewMode()
Returns this editor's outline-page default display mode. |
Diagram |
getDiagram()
Method getDiagram. |
IDiagramEditDomain |
getDiagramEditDomain()
Method getEditDomain. |
DiagramEditPart |
getDiagramEditPart()
Method getDiagramEditPart. |
IDiagramGraphicalViewer |
getDiagramGraphicalViewer()
Method getDiagramGraphicalViewer. |
org.eclipse.emf.transaction.TransactionalEditingDomain |
getEditingDomain()
Gets my editing domain derived from my diagram editor input. |
protected java.util.List |
getElements(ISelection selection)
Returns the elements in the given selection. |
protected Control |
getGraphicalControl()
|
protected KeyHandler |
getKeyHandler()
Returns the KeyHandler with common bindings for both the Outline and Graphical Views. |
protected IOperationHistory |
getOperationHistory()
Returns the operation history from my action manager. |
protected EditPartFactory |
getOutlineViewEditPartFactory()
Creates edit part factory that will be creating tree edit parts in the tree viewer |
protected PreferencesHint |
getPreferencesHint()
Gets the preferences hint that will be used to determine which preference store to use when retrieving diagram preferences for this diagram editor. |
protected RulerComposite |
getRulerComposite()
|
ShowInContext |
getShowInContext()
|
IWorkbenchPartSite |
getSite()
|
protected IUndoContext |
getUndoContext()
Gets my undo context. |
PreferenceStore |
getWorkspaceViewerPreferenceStore()
Returns the workspace viewer PreferenceStore |
protected ZoomManager |
getZoomManager()
A utility method to return the zoom manager from the graphical viewer's root |
void |
init(IEditorSite site,
IEditorInput input)
|
protected void |
initializeGraphicalViewer()
|
protected void |
initializeGraphicalViewerContents()
|
boolean |
isWritable()
Returns false if the editor is read only and returns true if the editor is writable. |
void |
persistViewerSettings()
Persists the viewer settings to which this RootEditPart belongs. |
protected void |
setInput(IEditorInput input)
|
protected void |
setRulerComposite(RulerComposite rulerComp)
|
protected void |
setSite(IWorkbenchPartSite site)
|
protected void |
setUndoContext(IUndoContext context)
Sets my undo context |
protected boolean |
shouldAddUndoContext(IUndoableOperation operation)
Answers whether or not I should add my undo context to the undoable operation, thereby making the operation available from my
undo menu.
|
protected void |
startListening()
Installs all the listeners needed by the editor |
protected void |
stopListening()
Removes all the listeners used by the editor |
| Methods inherited from class org.eclipse.gef.ui.parts.GraphicalEditor |
commandStackChanged, createPartControl, doSaveAs, firePropertyChange, getActionRegistry, getCommandStack, getEditDomain, getGraphicalViewer, getPropertyActions, getSelectionActions, getSelectionSynchronizer, getStackActions, hookGraphicalViewer, initializeActionRegistry, isDirty, isSaveAsAllowed, selectionChanged, setActionRegistry, setEditDomain, setFocus, setGraphicalViewer, updateActions |
| Methods inherited from class org.eclipse.ui.part.EditorPart |
checkSite, doSave, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInputWithNotify, setPartName |
| Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
addPropertyListener, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getTitle, getTitleImage, removePropertyListener, 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, createPartControl, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setFocus |
| Field Detail |
protected static final int ID_OUTLINE
protected static final int ID_OVERVIEW
protected PreferenceStore workspaceViewerPreferenceStore
| Constructor Detail |
public DiagramEditor()
| Method Detail |
protected int getDefaultOutlineViewMode()
protected RulerComposite getRulerComposite()
protected void setRulerComposite(RulerComposite rulerComp)
rulerComp - The rulerComp to set.protected IOperationHistoryListener createHistoryListener()
Subclasses may override this method to return a different history
listener, or to return null if they do not want to listen
to the operation history.
protected boolean shouldAddUndoContext(IUndoableOperation operation)
operation, thereby making the operation available from my
undo menu.
The default implementation adds my context to any operation that affected the same editing domain that has loaded the resource that contains my diagram element. Subclasses can override this method if they wish to add their context to operations for different reasons.
operation - the operation
true if the operation should appear on my undo
menu, false otherwise.public IDiagramEditDomain getDiagramEditDomain()
IDiagramWorkbenchPart
getDiagramEditDomain in interface IDiagramWorkbenchPartIDiagramWorkbenchPart.getDiagramEditDomain()public IDiagramGraphicalViewer getDiagramGraphicalViewer()
IDiagramWorkbenchPart
getDiagramGraphicalViewer in interface IDiagramWorkbenchPartIDiagramWorkbenchPart.getDiagramGraphicalViewer()public Diagram getDiagram()
IDiagramWorkbenchPart
getDiagram in interface IDiagramWorkbenchPartIDiagramWorkbenchPart.getDiagram()public DiagramEditPart getDiagramEditPart()
IDiagramWorkbenchPart
getDiagramEditPart in interface IDiagramWorkbenchPartIDiagramWorkbenchPart.getDiagramEditPart()public java.lang.Object getAdapter(java.lang.Class type)
getAdapter in interface IAdaptableIAdaptable.getAdapter(Class)
public void init(IEditorSite site,
IEditorInput input)
throws PartInitException
init in interface IEditorPartPartInitExceptionIEditorPart.init(IEditorSite, IEditorInput)public void dispose()
dispose in interface IWorkbenchPartIWorkbenchPart.dispose()protected KeyHandler getKeyHandler()
protected void createGraphicalViewer(Composite parent)
GraphicalEditor.createGraphicalViewer(Composite)protected ScrollingGraphicalViewer createScrollingGraphicalViewer()
protected void configureGraphicalViewer()
protected void initializeGraphicalViewer()
GraphicalEditor.initializeGraphicalViewer()protected void initializeGraphicalViewerContents()
GraphicalEditor.initializeGraphicalViewer()protected void createDiagramEditDomain()
protected void configureDiagramEditDomain()
protected ActionManager createActionManager()
protected IOperationHistory createOperationHistory()
protected void setInput(IEditorInput input)
EditorPart.setInput(IEditorInput)protected void createActions()
GraphicalEditor.initializeActionRegistry()protected void closeEditor(boolean save)
save - protected void startListening()
protected void stopListening()
protected void clearGraphicalViewerContents()
protected ActionManager getActionManager()
ActionManager.
protected ZoomManager getZoomManager()
protected IOperationHistory getOperationHistory()
public org.eclipse.emf.transaction.TransactionalEditingDomain getEditingDomain()
If subclasses have a known editing domain, they should override this method to return that editing domain as that will be more efficient that the generic implementation provided here.
protected IUndoContext getUndoContext()
protected void setUndoContext(IUndoContext context)
context - the undo contextprotected Control getGraphicalControl()
public IWorkbenchPartSite getSite()
getSite in interface IWorkbenchPartIWorkbenchPart.getSite()protected void setSite(IWorkbenchPartSite site)
WorkbenchPart.setSite(IWorkbenchPartSite)public java.lang.String getContributorId()
getContributorId in interface ITabbedPropertySheetPageContributor
public static void addDefaultPreferences(PreferenceStore store,
PreferencesHint preferencesHint)
store - store to usepreferencesHint - The preference hint that is to be used to find the appropriate
preference store from which to retrieve diagram preference
values. The preference hint is mapped to a preference store in
the preference registry <@link DiagramPreferencesRegistry>.public PreferenceStore getWorkspaceViewerPreferenceStore()
PreferenceStore
PreferenceStoreprotected void addDefaultPreferences()
public void persistViewerSettings()
protected java.util.List getElements(ISelection selection)
selection - the selection
EObjectpublic ShowInContext getShowInContext()
getShowInContext in interface IShowInSourceprotected PreferencesHint getPreferencesHint()
RootEditPartpublic boolean isWritable()
org.eclipse.gmf.runtime.diagram.ui.internal.editparts.IEditableEditPart.protected EditPartFactory getOutlineViewEditPartFactory()
EditPartFactory factory for the tree viewer
|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.