Class CharacteristicEditorGen
- java.lang.Object
- 
- org.eclipse.core.commands.common.EventManager
- 
- org.eclipse.ui.part.WorkbenchPart
- 
- org.eclipse.ui.part.EditorPart
- 
- org.eclipse.ui.part.MultiPageEditorPart
- 
- tools.mdsd.characteristics.characteristic.presentation.CharacteristicEditorGen
 
 
 
 
 
- 
- All Implemented Interfaces:
- IAdaptable,- IExecutableExtension,- IViewerProvider,- IEditingDomainProvider,- IMenuListener,- IPageChangeProvider,- ISelectionProvider,- IGotoMarker,- IEditorPart,- ISaveablePart,- IWorkbenchPart,- IWorkbenchPart2,- IWorkbenchPart3,- IWorkbenchPartOrientation
 - Direct Known Subclasses:
- CharacteristicEditor
 
 public class CharacteristicEditorGen extends MultiPageEditorPart implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker This is an example of a Characteristic model editor.- Generated class or method.
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description classCharacteristicEditorGen.ReverseAdapterFactoryContentProvider
 - 
Field SummaryFields Modifier and Type Field Description protected ComposedAdapterFactoryadapterFactoryThis is the one adapter factory used for providing views of the model.protected java.util.Collection<Resource>changedResourcesResources that have been changed since last activation.protected IContentOutlinePagecontentOutlinePageThis is the content outline page.protected IStatusLineManagercontentOutlineStatusLineManagerThis is a kludge...protected TreeViewercontentOutlineViewerThis is the content outline page's viewer.protected ViewercurrentViewerThis keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer.protected ViewerPanecurrentViewerPaneThis keeps track of the active viewer pane, in the book.protected AdapterFactoryEditingDomaineditingDomainThis keeps track of the editing domain that is used to track all changes to the model.protected ISelectioneditorSelectionThis keeps track of the selection of the editor as a whole.protected ListViewerlistViewerThis shows how a list view works.protected MarkerHelpermarkerHelperThe MarkerHelper is responsible for creating workspace resource markers presented in Eclipse's Problems View.protected TreeViewerparentViewerThis inverts the roll of parent and child in the content provider and show parents as a tree.protected IPartListenerpartListenerThis listens for when the outline becomes activeprotected EContentAdapterproblemIndicationAdapterAdapter used to update the problem indication when resources are demanded loaded.protected java.util.List<PropertySheetPage>propertySheetPagesThis is the property sheet page.protected java.util.Collection<Resource>removedResourcesResources that have been removed since last activation.protected IResourceChangeListenerresourceChangeListenerThis listens for workspace changes.protected java.util.Map<Resource,Diagnostic>resourceToDiagnosticMapMap to store the diagnostic associated with a resource.protected java.util.Collection<Resource>savedResourcesResources that have been saved.protected ISelectionChangedListenerselectionChangedListenerThis listens to which ever viewer is active.protected java.util.Collection<ISelectionChangedListener>selectionChangedListenersThis keeps track of all theISelectionChangedListeners that are listening to this editor.protected TreeViewerselectionViewerThis is the viewer that shadows the selection in the content outline.protected TableViewertableViewerThis shows how a table view works.protected TreeViewertreeViewerThis shows how a tree view works.protected TreeViewertreeViewerWithColumnsThis shows how a tree view with columns works.protected booleanupdateProblemIndicationControls whether the problem indication should be updated.- 
Fields inherited from class org.eclipse.ui.part.MultiPageEditorPartPAGE_CONTAINER_SITE
 - 
Fields inherited from interface org.eclipse.ui.IEditorPartPROP_DIRTY, PROP_INPUT
 - 
Fields inherited from interface org.eclipse.ui.IWorkbenchPartPROP_TITLE
 
- 
 - 
Constructor SummaryConstructors Constructor Description CharacteristicEditorGen()This creates a model editor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSelectionChangedListener(ISelectionChangedListener listener)This implementsISelectionProvider.DiagnosticanalyzeResourceProblems(Resource resource, java.lang.Exception exception)Returns a diagnostic describing the errors and warnings listed in the resource and the specified exception (if any).protected voidcreateContextMenuFor(StructuredViewer viewer)This creates a context menu for the viewer and adds a listener as well registering the menu for extension.voidcreateModel()This is the method called to load a resource into the editing domain's resource set based on the editor's input.voidcreatePages()This is the method used by the framework to install your own controls.voiddispose()voiddoSave(IProgressMonitor progressMonitor)This is for implementingIEditorPartand simply saves the model file.voiddoSaveAs()This also changes the editor's input.protected voiddoSaveAs(URI uri, IEditorInput editorInput)protected voidfirePropertyChange(int action)This is here for the listener to be able to call it.EditingDomainActionBarContributorgetActionBarContributor()IActionBarsgetActionBars()<T> TgetAdapter(java.lang.Class<T> key)This is how the framework determines which interfaces we implement.AdapterFactorygetAdapterFactory()IContentOutlinePagegetContentOutlinePage()This accesses a cached version of the content outliner.EditingDomaingetEditingDomain()This returns the editing domain as required by theIEditingDomainProviderinterface.IPropertySheetPagegetPropertySheetPage()This accesses a cached version of the property sheet.ISelectiongetSelection()This implementsISelectionProviderto return this editor's overall selection.ViewergetViewer()This returns the viewer as required by theIViewerProviderinterface.voidgotoMarker(IMarker marker)protected voidhandleActivate()Handles activation of the editor or it's associated views.protected voidhandleChangedResources()Handles what to do with changed resources on activation.voidhandleContentOutlineSelection(ISelection selection)This deals with how we want selection in the outliner to affect the other views.protected booleanhandleDirtyConflict()Shows a dialog that asks if conflicting changes should be discarded.protected voidhideTabs()If there is just one page in the multi-page editor part, this hides the single tab at the bottom.voidinit(IEditorSite site, IEditorInput editorInput)This is called during startup.protected voidinitializeEditingDomain()This sets up the editing domain for the model editor.booleanisDirty()This is for implementingIEditorPartand simply tests the command stack.protected booleanisPersisted(Resource resource)This returns whether something has been persisted to the URI of the specified resource.booleanisSaveAsAllowed()This always returns true because it is not currently supported.voidmenuAboutToShow(IMenuManager menuManager)This implementsIMenuListenerto help fill the context menus with contributions from the Edit menu.protected voidpageChange(int pageIndex)This is used to track the active viewer.voidremoveSelectionChangedListener(ISelectionChangedListener listener)This implementsISelectionProvider.voidsetCurrentViewer(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.voidsetCurrentViewerPane(ViewerPane viewerPane)voidsetFocus()voidsetSelection(ISelection selection)This implementsISelectionProviderto set this editor's overall selection.voidsetSelectionToViewer(java.util.Collection<?> collection)This sets the selection into whichever viewer is active.voidsetStatusLineManager(ISelection selection)protected booleanshowOutlineView()Returns whether the outline view should be presented to the user.protected voidshowTabs()If there is more than one page in the multi-page editor part, this shows the tabs at the bottom.protected voidupdateProblemIndication()Updates the problems indication with the information described in the specified diagnostic.- 
Methods inherited from class org.eclipse.ui.part.MultiPageEditorPartactivateSite, addPage, addPage, addPage, addPage, addPageChangedListener, createContainer, createItem, createPageContainer, createPartControl, createSite, deactivateSite, findEditors, getActiveEditor, getActivePage, getContainer, getControl, getEditor, getPageCount, getPageImage, getPageSite, getPageText, getSelectedPage, handlePropertyChange, initializePageSwitching, removePage, removePageChangedListener, setActiveEditor, setActivePage, setControl, setPageImage, setPageText
 - 
Methods inherited from class org.eclipse.ui.part.EditorPartcheckSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartName
 - 
Methods inherited from class org.eclipse.ui.part.WorkbenchPartaddPartPropertyListener, 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.EventManageraddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.eclipse.ui.IWorkbenchPartaddPropertyListener, getSite, getTitle, getTitleImage, removePropertyListener
 
- 
 
- 
- 
- 
Field Detail- 
editingDomainprotected AdapterFactoryEditingDomain editingDomain This keeps track of the editing domain that is used to track all changes to the model.- Generated class or method.
 
 - 
adapterFactoryprotected ComposedAdapterFactory adapterFactory This is the one adapter factory used for providing views of the model.- Generated class or method.
 
 - 
contentOutlinePageprotected IContentOutlinePage contentOutlinePage This is the content outline page.- Generated class or method.
 
 - 
contentOutlineStatusLineManagerprotected IStatusLineManager contentOutlineStatusLineManager This is a kludge...- Generated class or method.
 
 - 
contentOutlineViewerprotected TreeViewer contentOutlineViewer This is the content outline page's viewer.- Generated class or method.
 
 - 
propertySheetPagesprotected java.util.List<PropertySheetPage> propertySheetPages This is the property sheet page.- Generated class or method.
 
 - 
selectionViewerprotected TreeViewer selectionViewer This is the viewer that shadows the selection in the content outline. The parent relation must be correctly defined for this to work.- Generated class or method.
 
 - 
parentViewerprotected TreeViewer parentViewer This inverts the roll of parent and child in the content provider and show parents as a tree.- Generated class or method.
 
 - 
treeViewerprotected TreeViewer treeViewer This shows how a tree view works.- Generated class or method.
 
 - 
listViewerprotected ListViewer listViewer This shows how a list view works. A list viewer doesn't support icons.- Generated class or method.
 
 - 
tableViewerprotected TableViewer tableViewer This shows how a table view works. A table can be used as a list with icons.- Generated class or method.
 
 - 
treeViewerWithColumnsprotected TreeViewer treeViewerWithColumns This shows how a tree view with columns works.- Generated class or method.
 
 - 
currentViewerPaneprotected ViewerPane currentViewerPane This keeps track of the active viewer pane, in the book.- Generated class or method.
 
 - 
currentViewerprotected 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.- Generated class or method.
 
 - 
selectionChangedListenerprotected ISelectionChangedListener selectionChangedListener This listens to which ever viewer is active.- Generated class or method.
 
 - 
selectionChangedListenersprotected java.util.Collection<ISelectionChangedListener> selectionChangedListeners This keeps track of all theISelectionChangedListeners that are listening to this editor.- Generated class or method.
 
 - 
editorSelectionprotected ISelection editorSelection This keeps track of the selection of the editor as a whole.- Generated class or method.
 
 - 
markerHelperprotected MarkerHelper markerHelper The MarkerHelper is responsible for creating workspace resource markers presented in Eclipse's Problems View.- Generated class or method.
 
 - 
partListenerprotected IPartListener partListener This listens for when the outline becomes active- Generated class or method.
 
 - 
removedResourcesprotected java.util.Collection<Resource> removedResources Resources that have been removed since last activation.- Generated class or method.
 
 - 
changedResourcesprotected java.util.Collection<Resource> changedResources Resources that have been changed since last activation.- Generated class or method.
 
 - 
savedResourcesprotected java.util.Collection<Resource> savedResources Resources that have been saved.- Generated class or method.
 
 - 
resourceToDiagnosticMapprotected java.util.Map<Resource,Diagnostic> resourceToDiagnosticMap Map to store the diagnostic associated with a resource.- Generated class or method.
 
 - 
updateProblemIndicationprotected boolean updateProblemIndication Controls whether the problem indication should be updated.- Generated class or method.
 
 - 
problemIndicationAdapterprotected EContentAdapter problemIndicationAdapter Adapter used to update the problem indication when resources are demanded loaded.- Generated class or method.
 
 - 
resourceChangeListenerprotected IResourceChangeListener resourceChangeListener This listens for workspace changes.- Generated class or method.
 
 
- 
 - 
Method Detail- 
handleActivateprotected void handleActivate() Handles activation of the editor or it's associated views.- Generated class or method.
 
 - 
handleChangedResourcesprotected void handleChangedResources() Handles what to do with changed resources on activation.- Generated class or method.
 
 - 
updateProblemIndicationprotected void updateProblemIndication() Updates the problems indication with the information described in the specified diagnostic.- Generated class or method.
 
 - 
handleDirtyConflictprotected boolean handleDirtyConflict() Shows a dialog that asks if conflicting changes should be discarded.- Generated class or method.
 
 - 
initializeEditingDomainprotected void initializeEditingDomain() This sets up the editing domain for the model editor.- Generated class or method.
 
 - 
firePropertyChangeprotected void firePropertyChange(int action) This is here for the listener to be able to call it.- Overrides:
- firePropertyChangein class- WorkbenchPart
- Generated class or method.
 
 - 
setSelectionToViewerpublic void setSelectionToViewer(java.util.Collection<?> collection) This sets the selection into whichever viewer is active.- Generated class or method.
 
 - 
getEditingDomainpublic EditingDomain getEditingDomain() This returns the editing domain as required by theIEditingDomainProviderinterface. This is important for implementing the static methods ofAdapterFactoryEditingDomainand for supportingCommandAction.- Specified by:
- getEditingDomainin interface- IEditingDomainProvider
- Generated class or method.
 
 - 
setCurrentViewerPanepublic void setCurrentViewerPane(ViewerPane viewerPane) - Generated class or method.
 
 - 
setCurrentViewerpublic 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.- Generated class or method.
 
 - 
getViewerpublic Viewer getViewer() This returns the viewer as required by theIViewerProviderinterface.- Specified by:
- getViewerin interface- IViewerProvider
- Generated class or method.
 
 - 
createContextMenuForprotected void createContextMenuFor(StructuredViewer viewer) This creates a context menu for the viewer and adds a listener as well registering the menu for extension.- Generated class or method.
 
 - 
createModelpublic void createModel() This is the method called to load a resource into the editing domain's resource set based on the editor's input.- Generated class or method.
 
 - 
analyzeResourceProblemspublic Diagnostic analyzeResourceProblems(Resource resource, java.lang.Exception exception) Returns a diagnostic describing the errors and warnings listed in the resource and the specified exception (if any).- Generated class or method.
 
 - 
createPagespublic void createPages() This is the method used by the framework to install your own controls.- Specified by:
- createPagesin class- MultiPageEditorPart
- Generated class or method.
 
 - 
hideTabsprotected void hideTabs() If there is just one page in the multi-page editor part, this hides the single tab at the bottom.- Generated class or method.
 
 - 
showTabsprotected void showTabs() If there is more than one page in the multi-page editor part, this shows the tabs at the bottom.- Generated class or method.
 
 - 
pageChangeprotected void pageChange(int pageIndex) This is used to track the active viewer.- Overrides:
- pageChangein class- MultiPageEditorPart
- Generated class or method.
 
 - 
getAdapterpublic <T> T getAdapter(java.lang.Class<T> key) This is how the framework determines which interfaces we implement.- Specified by:
- getAdapterin interface- IAdaptable
- Overrides:
- getAdapterin class- MultiPageEditorPart
- Generated class or method.
 
 - 
getContentOutlinePagepublic IContentOutlinePage getContentOutlinePage() This accesses a cached version of the content outliner.- Generated class or method.
 
 - 
getPropertySheetPagepublic IPropertySheetPage getPropertySheetPage() This accesses a cached version of the property sheet.- Generated class or method.
 
 - 
handleContentOutlineSelectionpublic void handleContentOutlineSelection(ISelection selection) This deals with how we want selection in the outliner to affect the other views.- Generated class or method.
 
 - 
isDirtypublic boolean isDirty() This is for implementingIEditorPartand simply tests the command stack.- Specified by:
- isDirtyin interface- ISaveablePart
- Overrides:
- isDirtyin class- MultiPageEditorPart
- Generated class or method.
 
 - 
doSavepublic void doSave(IProgressMonitor progressMonitor) This is for implementingIEditorPartand simply saves the model file.- Specified by:
- doSavein interface- ISaveablePart
- Specified by:
- doSavein class- EditorPart
- Generated class or method.
 
 - 
isPersistedprotected boolean isPersisted(Resource resource) This returns whether something has been persisted to the URI of the specified resource. The implementation uses the URI converter from the editor's resource set to try to open an input stream.- Generated class or method.
 
 - 
isSaveAsAllowedpublic boolean isSaveAsAllowed() This always returns true because it is not currently supported.- Specified by:
- isSaveAsAllowedin interface- ISaveablePart
- Specified by:
- isSaveAsAllowedin class- EditorPart
- Generated class or method.
 
 - 
doSaveAspublic void doSaveAs() This also changes the editor's input.- Specified by:
- doSaveAsin interface- ISaveablePart
- Specified by:
- doSaveAsin class- EditorPart
- Generated class or method.
 
 - 
doSaveAsprotected void doSaveAs(URI uri, IEditorInput editorInput) - Generated class or method.
 
 - 
gotoMarkerpublic void gotoMarker(IMarker marker) - Specified by:
- gotoMarkerin interface- IGotoMarker
- Generated class or method.
 
 - 
initpublic void init(IEditorSite site, IEditorInput editorInput) This is called during startup.- Specified by:
- initin interface- IEditorPart
- Overrides:
- initin class- MultiPageEditorPart
- Generated class or method.
 
 - 
setFocuspublic void setFocus() - Specified by:
- setFocusin interface- IWorkbenchPart
- Overrides:
- setFocusin class- MultiPageEditorPart
- Generated class or method.
 
 - 
addSelectionChangedListenerpublic void addSelectionChangedListener(ISelectionChangedListener listener) This implementsISelectionProvider.- Specified by:
- addSelectionChangedListenerin interface- ISelectionProvider
- Generated class or method.
 
 - 
removeSelectionChangedListenerpublic void removeSelectionChangedListener(ISelectionChangedListener listener) This implementsISelectionProvider.- Specified by:
- removeSelectionChangedListenerin interface- ISelectionProvider
- Generated class or method.
 
 - 
getSelectionpublic ISelection getSelection() This implementsISelectionProviderto return this editor's overall selection.- Specified by:
- getSelectionin interface- ISelectionProvider
- Generated class or method.
 
 - 
setSelectionpublic void setSelection(ISelection selection) This implementsISelectionProviderto set this editor's overall selection. Calling this result will notify the listeners.- Specified by:
- setSelectionin interface- ISelectionProvider
- Generated class or method.
 
 - 
setStatusLineManagerpublic void setStatusLineManager(ISelection selection) - Generated class or method.
 
 - 
menuAboutToShowpublic void menuAboutToShow(IMenuManager menuManager) This implementsIMenuListenerto help fill the context menus with contributions from the Edit menu.- Specified by:
- menuAboutToShowin interface- IMenuListener
- Generated class or method.
 
 - 
getActionBarContributorpublic EditingDomainActionBarContributor getActionBarContributor() - Generated class or method.
 
 - 
getActionBarspublic IActionBars getActionBars() - Generated class or method.
 
 - 
getAdapterFactorypublic AdapterFactory getAdapterFactory() - Generated class or method.
 
 - 
disposepublic void dispose() - Specified by:
- disposein interface- IWorkbenchPart
- Overrides:
- disposein class- MultiPageEditorPart
- Generated class or method.
 
 - 
showOutlineViewprotected boolean showOutlineView() Returns whether the outline view should be presented to the user.- Generated class or method.
 
 
- 
 
-