|
|||||||||||
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.ui.part.MultiPageEditorPart
org.eclipse.emf.mapping.presentation.MappingEditor
This is an example of a model editor.
Nested Class Summary | |
static class |
MappingEditor.ActionBarContributor
This is the contributor for the mapping editor. |
protected static class |
MappingEditor.DelayedColumnFitter
|
protected class |
MappingEditor.MyDecoratorAdapterFactory
|
protected class |
MappingEditor.MyViewerPane
|
protected class |
MappingEditor.OverviewDecoratorAdapterFactory
|
static class |
MappingEditor.OverviewViewer
|
Field Summary | |
protected Image |
bottomImage
|
protected String |
bottomLabel
|
protected CommandStackListener |
commandStackListener
|
protected Action |
contentOutlineFilterAction
|
protected IContentOutlinePage |
contentOutlinePage
This is the content outline page. |
protected IStatusLineManager |
contentOutlineStatusLineManager
This is a kludge... |
protected TreeViewer |
contentOutlineViewer
This is the content outline page's viewer. |
protected Viewer |
currentViewer
This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer. |
protected ViewerPane |
currentViewerPane
This keeps track of the current viewer pane of the page book. |
protected static String |
DIVIDER
|
protected Viewer |
dropViewer
This keeps track of the content viewer, which had something dropped on it. |
protected ISelection |
editorSelection
This keeps track of the selection of the editor as a whole. |
protected boolean |
isNotificationEnabled
|
protected MappingEditor.MyDecoratorAdapterFactory |
leftSelectionFactory
|
protected SimpleMappedObjectViewer |
leftSelectionViewer
This is the viewer that shadows the selection in the content outline. |
protected AdapterFactoryMappingDomain |
mappingDomain
This keeps track of the editing domain that is used to track all changes to the model. |
protected MappingRoot |
mappingRoot
This keeps track of the root object of the model. |
protected IFileEditorInput |
modelFile
This keeps track of the file that stores the model. |
protected MappingEditor.OverviewDecoratorAdapterFactory |
overviewFactory
|
protected String |
overviewSummaryColumnLabel
|
protected MappingEditor.OverviewViewer |
overviewViewer
|
protected ViewerPane |
overviewViewerPane
|
protected IPartListener |
partListener
This listens for when the outline becomes active |
protected PropertySheetPage |
propertySheetPage
This is the property sheet page. |
protected MappingEditor.MyDecoratorAdapterFactory |
rightSelectionFactory
|
protected SimpleMappedObjectViewer |
rightSelectionViewer
|
protected static String |
SELECTED_MAPPED_OBJECT_PREFIX
|
protected static String |
SELECTED_MAPPING_PREFIX
|
protected ISelectionChangedListener |
selectionChangedListener
This listens to which ever viewer is active. |
protected Collection |
selectionChangedListeners
This keeps track of all the ISelectionChangedListener s that are listening to this editor. |
protected static String |
SEPARATOR
|
protected Image |
topImage
|
protected String |
topLabel
|
Fields inherited from interface org.eclipse.ui.IEditorPart |
PROP_DIRTY, PROP_INPUT |
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
Constructor Summary | |
MappingEditor()
This creates a model editor. |
Method Summary | |
void |
addSelectionChangedListener(ISelectionChangedListener listener)
This implements ISelectionProvider . |
protected void |
createContextMenuFor(StructuredViewer structuredViewer)
This creates a context menu for the viewer and adds a listener as well registering the menu for extension. |
void |
createLaunchedOverviewSummaryColumnEditor(Composite parent,
Object object)
|
protected abstract AdapterFactoryMappingDomain |
createMappingDomain()
|
protected MappingEditor.OverviewDecoratorAdapterFactory |
createOverviewDecoratorAdapterFactory()
|
protected MappingEditor.OverviewViewer |
createOverviewViewer(Composite composite)
|
void |
createPages()
This is the method used by the framework to install your own controls. |
void |
dispose()
|
void |
doSave(IProgressMonitor progressMonitor)
This is for implementing IEditorPart and simply saves the model file. |
void |
doSaveAs()
This also changes the model. |
protected void |
doSaveHelper(IFile file)
|
protected void |
firePropertyChange(int type)
This simply calls super; it is here only so that inner classes can call it. |
EditingDomainActionBarContributor |
getActionBarContributor()
|
IActionBars |
getActionBars()
|
Object |
getAdapter(Class key)
This is how the framework determines which interfaces we implement. |
Image |
getBottomImage()
|
String |
getBottomLabel()
|
IContentOutlinePage |
getContentOutlinePage()
This accesses a cached version of the content outliner. |
Viewer |
getCurrentViewer()
|
boolean |
getDefaultCheckedShowTopFirst()
|
boolean |
getDefaultFilterUnmappedObjects()
|
boolean |
getDefaultShowMultipleColumns()
|
EditingDomain |
getEditingDomain()
This returns the editing domain as required by the IEditingDomainProvider interface.
|
Collection |
getMappedObjects(ISelection selection)
This turns the selection into the set of RefObjects involved in the mapping. |
AdapterFactoryMappingDomain |
getMappingDomain()
|
Collection |
getMappings(ISelection selection)
This turns the selection into the set of mappings, but only if all the objects are mappings. |
Object |
getOverviewSummaryColumnImage(Object o)
|
String |
getOverviewSummaryColumnLabel()
|
String |
getOverviewSummaryColumnText(Object o)
|
IPropertySheetPage |
getPropertySheetPage()
This accesses a cached version of the property sheet. |
ISelection |
getSelection()
This implements ISelectionProvider to return this editor's overall selection. |
Image |
getTopImage()
|
String |
getTopLabel()
|
String |
getURIFromFile(IFile file)
|
void |
gotoMarker(IMarker marker)
|
protected void |
handleCreation()
This creates the model based on the modelFile . |
protected void |
handleCreationException(Exception exception)
|
protected abstract void |
handleMissingModelFile()
|
boolean |
hasLaunchedOverviewSummaryColumnEditor(Object object)
|
protected void |
hideTabs()
If there is just one page in the multi-page editor part, this hides the single tab at the bottom |
void |
init(IEditorSite site,
IEditorInput editorInput)
|
boolean |
isDirty()
This is for implementing IEditorPart and simply tests the command stack. |
boolean |
isNotificationEnabled()
|
boolean |
isSaveAsAllowed()
This always returns false because it is not currently supported. |
void |
menuAboutToShow(IMenuManager menuManager)
This implements IMenuListener to help fill the context menu. |
void |
removeSelectionChangedListener(ISelectionChangedListener listener)
This implements ISelectionProvider . |
void |
setCurrentViewer(Viewer viewer)
This makes sure that one content viewer, either for the current page or the outline view, if it has focus, is the current one. |
void |
setCurrentViewerPane(ViewerPane viewerPane)
|
void |
setFocus()
|
protected void |
setMappingRoot(MappingRoot mappingRoot)
|
void |
setNotificationEnabled(boolean isNotificationEnabled)
|
void |
setSelection(ISelection selection)
This implements ISelectionProvider to set this editor's overall selection.
|
void |
setSelectionToViewer(Collection collection)
This sets the selection into whichever viewer is active. |
void |
setStatusLineManager(ISelection selection)
|
Methods inherited from class org.eclipse.ui.part.MultiPageEditorPart |
addPage, addPage, addPage, addPage, createPageContainer, createPartControl, createSite, getActiveEditor, getActivePage, getContainer, getControl, getEditor, getPageCount, getPageImage, getPageText, handlePropertyChange, pageChange, removePage, setActivePage, setControl, setPageImage, setPageText |
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 |
addPropertyListener, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getSite, getTitle, getTitleImage, removePropertyListener, 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, removePropertyListener |
Field Detail |
protected static final String DIVIDER
protected static final String SEPARATOR
protected String topLabel
protected String bottomLabel
protected Image topImage
protected Image bottomImage
protected boolean isNotificationEnabled
protected IFileEditorInput modelFile
protected MappingRoot mappingRoot
protected AdapterFactoryMappingDomain mappingDomain
protected IContentOutlinePage contentOutlinePage
protected IStatusLineManager contentOutlineStatusLineManager
protected TreeViewer contentOutlineViewer
protected Action contentOutlineFilterAction
protected PropertySheetPage propertySheetPage
protected SimpleMappedObjectViewer leftSelectionViewer
protected MappingEditor.MyDecoratorAdapterFactory leftSelectionFactory
protected SimpleMappedObjectViewer rightSelectionViewer
protected MappingEditor.MyDecoratorAdapterFactory rightSelectionFactory
protected ViewerPane overviewViewerPane
protected MappingEditor.OverviewViewer overviewViewer
protected MappingEditor.OverviewDecoratorAdapterFactory overviewFactory
protected ViewerPane currentViewerPane
protected Viewer currentViewer
protected Viewer dropViewer
protected ISelectionChangedListener selectionChangedListener
protected Collection selectionChangedListeners
ISelectionChangedListener
s that are listening to this editor.
protected ISelection editorSelection
protected IPartListener partListener
protected CommandStackListener commandStackListener
protected static final String SELECTED_MAPPING_PREFIX
protected static final String SELECTED_MAPPED_OBJECT_PREFIX
protected String overviewSummaryColumnLabel
Constructor Detail |
public MappingEditor()
Method Detail |
public String getTopLabel()
public String getBottomLabel()
public Image getTopImage()
public Image getBottomImage()
public boolean isNotificationEnabled()
public void setNotificationEnabled(boolean isNotificationEnabled)
protected void firePropertyChange(int type)
protected abstract AdapterFactoryMappingDomain createMappingDomain()
public void setSelectionToViewer(Collection collection)
public EditingDomain getEditingDomain()
IEditingDomainProvider
interface.
This is important for implementing the static methods of
AdapterFactoryEditingDomain
and for supporting
CommandAction
.
getEditingDomain
in interface IEditingDomainProvider
public void setCurrentViewerPane(ViewerPane viewerPane)
public void setCurrentViewer(Viewer viewer)
protected void createContextMenuFor(StructuredViewer structuredViewer)
public void createPages()
protected void hideTabs()
public String getURIFromFile(IFile file)
protected void handleCreation()
modelFile
.
protected abstract void handleMissingModelFile()
protected void handleCreationException(Exception exception)
protected void setMappingRoot(MappingRoot mappingRoot)
public Object getAdapter(Class key)
getAdapter
in interface IAdaptable
public IContentOutlinePage getContentOutlinePage()
public IPropertySheetPage getPropertySheetPage()
public boolean isDirty()
IEditorPart
and simply tests the command stack.
isDirty
in interface ISaveablePart
public void doSave(IProgressMonitor progressMonitor)
IEditorPart
and simply saves the model file.
doSave
in interface ISaveablePart
protected void doSaveHelper(IFile file)
public boolean isSaveAsAllowed()
isSaveAsAllowed
in interface ISaveablePart
public void doSaveAs()
doSaveAs
in interface ISaveablePart
public void gotoMarker(IMarker marker)
public void init(IEditorSite site, IEditorInput editorInput) throws PartInitException
init
in interface IEditorPart
PartInitException
public void setFocus()
setFocus
in interface IWorkbenchPart
public void addSelectionChangedListener(ISelectionChangedListener listener)
ISelectionProvider
.
addSelectionChangedListener
in interface ISelectionProvider
public void removeSelectionChangedListener(ISelectionChangedListener listener)
ISelectionProvider
.
removeSelectionChangedListener
in interface ISelectionProvider
public ISelection getSelection()
ISelectionProvider
to return this editor's overall selection.
getSelection
in interface ISelectionProvider
public void setSelection(ISelection selection)
ISelectionProvider
to set this editor's overall selection.
Calling this result will notify the listeners.
setSelection
in interface ISelectionProvider
public void setStatusLineManager(ISelection selection)
public void menuAboutToShow(IMenuManager menuManager)
IMenuListener
to help fill the context menu.
menuAboutToShow
in interface IMenuListener
public Collection getMappedObjects(ISelection selection)
public Collection getMappings(ISelection selection)
public AdapterFactoryMappingDomain getMappingDomain()
public Viewer getCurrentViewer()
public void dispose()
dispose
in interface IWorkbenchPart
public EditingDomainActionBarContributor getActionBarContributor()
public IActionBars getActionBars()
public String getOverviewSummaryColumnLabel()
public Object getOverviewSummaryColumnImage(Object o)
public String getOverviewSummaryColumnText(Object o)
public boolean hasLaunchedOverviewSummaryColumnEditor(Object object)
public void createLaunchedOverviewSummaryColumnEditor(Composite parent, Object object)
public boolean getDefaultCheckedShowTopFirst()
public boolean getDefaultShowMultipleColumns()
public boolean getDefaultFilterUnmappedObjects()
protected MappingEditor.OverviewViewer createOverviewViewer(Composite composite)
protected MappingEditor.OverviewDecoratorAdapterFactory createOverviewDecoratorAdapterFactory()
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |