Package com._1c.g5.v8.dt.ui.editor
Class DtEditor<M extends org.eclipse.emf.ecore.EObject>
- java.lang.Object
-
- org.eclipse.core.commands.common.EventManager
-
- org.eclipse.ui.part.WorkbenchPart
-
- org.eclipse.ui.part.EditorPart
-
- com._1c.g5.v8.dt.ui.editor.DtEditor<M>
-
- All Implemented Interfaces:
IDtEditor<M>
,IGotoSelection
,org.eclipse.core.runtime.IAdaptable
,org.eclipse.core.runtime.IExecutableExtension
,org.eclipse.ui.IEditorPart
,org.eclipse.ui.ISaveablePart
,org.eclipse.ui.IShowEditorInput
,org.eclipse.ui.IWorkbenchPart
,org.eclipse.ui.IWorkbenchPart2
,org.eclipse.ui.IWorkbenchPart3
,org.eclipse.ui.part.IShowInSource
,org.eclipse.ui.part.IWorkbenchPartOrientation
- Direct Known Subclasses:
AbstractAefBoundDtEditor
,AllRolesEditor
public abstract class DtEditor<M extends org.eclipse.emf.ecore.EObject> extends org.eclipse.ui.part.EditorPart implements IDtEditor<M>
Base class for all DT plain editors.
-
-
Field Summary
Fields Modifier and Type Field Description protected IBmModel
bmModel
protected IConfigurationProvider
configurationProvider
protected IDerivedDataManagerProvider
derivedDataManagerProvider
protected DtEditorProxyInputHelperService
dtEditorProxyInputHelperService
protected IBmModelManager
modelManager
protected IResourceLookup
resourceLookup
protected IServicesOrchestrator
serviceOrchestrator
-
Constructor Summary
Constructors Constructor Description DtEditor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
createControls(org.eclipse.ui.forms.IManagedForm managedForm)
Creates editor controls.void
createPartControl(org.eclipse.swt.widgets.Composite parent)
void
dispose()
void
doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
void
doSaveAs()
<T> T
getAdapter(Class<T> adapter)
IEditingContext
getApiEditingContext()
Returns theIEditingContext
instance associated with the editor.IBmLocalEditingContext
getEditingContext()
IDtEditorInput<M>
getEditorInput()
M
getModel()
org.eclipse.ui.part.ShowInContext
getShowInContext()
protected org.eclipse.ui.forms.widgets.FormToolkit
getToolkit()
Returns the form toolkitprotected Collection<String>
getWaitingPartsId()
Returns parts ids array to be waited before creating control.void
gotoSelection(ISelection selection)
Sets selection to the editorvoid
init(org.eclipse.ui.IEditorSite site, IDtEditorInput<M> input)
Initializes the editor.void
init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input)
boolean
isDirty()
boolean
isSaveAsAllowed()
void
setActiveFeature(org.eclipse.emf.ecore.EStructuralFeature feature)
Sets the active feature of the editor.void
setActiveSelection(ISelection selection, DtEditorSelectionProcessingPolicy policy)
Sets the active selection of the editor.void
setFocus()
void
showEditorInput(IDtEditorInput<M> editorInput)
Shows the editor input.void
showEditorInput(org.eclipse.ui.IEditorInput editorInput)
-
Methods inherited from class org.eclipse.ui.part.EditorPart
checkSite, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartName
-
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, 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
-
-
-
-
Field Detail
-
bmModel
protected IBmModel bmModel
-
resourceLookup
@Inject protected IResourceLookup resourceLookup
-
derivedDataManagerProvider
@Inject protected IDerivedDataManagerProvider derivedDataManagerProvider
-
serviceOrchestrator
@Inject protected IServicesOrchestrator serviceOrchestrator
-
configurationProvider
@Inject protected IConfigurationProvider configurationProvider
-
modelManager
@Inject protected IBmModelManager modelManager
-
dtEditorProxyInputHelperService
@Inject protected DtEditorProxyInputHelperService dtEditorProxyInputHelperService
-
-
Method Detail
-
createPartControl
public final void createPartControl(org.eclipse.swt.widgets.Composite parent)
- Specified by:
createPartControl
in interfaceorg.eclipse.ui.IWorkbenchPart
- Specified by:
createPartControl
in classorg.eclipse.ui.part.WorkbenchPart
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceorg.eclipse.ui.IWorkbenchPart
- Overrides:
dispose
in classorg.eclipse.ui.part.WorkbenchPart
-
doSave
public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
- Specified by:
doSave
in interfaceorg.eclipse.ui.ISaveablePart
- Specified by:
doSave
in classorg.eclipse.ui.part.EditorPart
-
doSaveAs
public void doSaveAs()
- Specified by:
doSaveAs
in interfaceorg.eclipse.ui.ISaveablePart
- Specified by:
doSaveAs
in classorg.eclipse.ui.part.EditorPart
-
getAdapter
public <T> T getAdapter(Class<T> adapter)
- Specified by:
getAdapter
in interfaceorg.eclipse.core.runtime.IAdaptable
- Overrides:
getAdapter
in classorg.eclipse.ui.part.WorkbenchPart
-
getEditorInput
public IDtEditorInput<M> getEditorInput()
- Specified by:
getEditorInput
in interfaceIDtEditor<M extends org.eclipse.emf.ecore.EObject>
- Specified by:
getEditorInput
in interfaceorg.eclipse.ui.IEditorPart
- Overrides:
getEditorInput
in classorg.eclipse.ui.part.EditorPart
-
getModel
public M getModel()
-
getEditingContext
public IBmLocalEditingContext getEditingContext()
- Specified by:
getEditingContext
in interfaceIDtEditor<M extends org.eclipse.emf.ecore.EObject>
- Returns:
- BM editing context associated with the editor.
-
getApiEditingContext
public IEditingContext getApiEditingContext()
Description copied from interface:IDtEditor
Returns theIEditingContext
instance associated with the editor.- Specified by:
getApiEditingContext
in interfaceIDtEditor<M extends org.eclipse.emf.ecore.EObject>
- Returns:
- the
IEditingContext
instance associated with the editor, can benull
if the editor is not initialized or it is already disposed.
-
gotoSelection
public void gotoSelection(ISelection selection)
Description copied from interface:IGotoSelection
Sets selection to the editor- Specified by:
gotoSelection
in interfaceIGotoSelection
- Parameters:
selection
- actual selection, can benull
-
init
public void init(org.eclipse.ui.IEditorSite site, IDtEditorInput<M> input) throws org.eclipse.ui.PartInitException
Description copied from interface:IDtEditor
Initializes the editor.- Specified by:
init
in interfaceIDtEditor<M extends org.eclipse.emf.ecore.EObject>
- Parameters:
site
- the editor site, cannot benull
.input
- the editor input, cannot benull
.- Throws:
org.eclipse.ui.PartInitException
- if this editor was not initialized successfully- See Also:
IEditorPart.init(IEditorSite, org.eclipse.ui.IEditorInput)
-
init
public void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input) throws org.eclipse.ui.PartInitException
- Specified by:
init
in interfaceorg.eclipse.ui.IEditorPart
- Specified by:
init
in classorg.eclipse.ui.part.EditorPart
- Throws:
org.eclipse.ui.PartInitException
-
isDirty
public boolean isDirty()
- Specified by:
isDirty
in interfaceorg.eclipse.ui.ISaveablePart
- Specified by:
isDirty
in classorg.eclipse.ui.part.EditorPart
-
isSaveAsAllowed
public boolean isSaveAsAllowed()
- Specified by:
isSaveAsAllowed
in interfaceorg.eclipse.ui.ISaveablePart
- Specified by:
isSaveAsAllowed
in classorg.eclipse.ui.part.EditorPart
-
setActiveFeature
public void setActiveFeature(org.eclipse.emf.ecore.EStructuralFeature feature)
Description copied from interface:IDtEditor
Sets the active feature of the editor.- Specified by:
setActiveFeature
in interfaceIDtEditor<M extends org.eclipse.emf.ecore.EObject>
- Parameters:
feature
- the feature active at this moment, ornull
if there is no active feature.
-
setActiveSelection
public void setActiveSelection(ISelection selection, DtEditorSelectionProcessingPolicy policy)
Description copied from interface:IDtEditor
Sets the active selection of the editor.- Specified by:
setActiveSelection
in interfaceIDtEditor<M extends org.eclipse.emf.ecore.EObject>
- Parameters:
selection
- selection active at this moment.policy
- selection processing policy.
-
setFocus
public void setFocus()
- Specified by:
setFocus
in interfaceorg.eclipse.ui.IWorkbenchPart
- Specified by:
setFocus
in classorg.eclipse.ui.part.WorkbenchPart
-
showEditorInput
public void showEditorInput(IDtEditorInput<M> editorInput)
Description copied from interface:IDtEditor
Shows the editor input.- Specified by:
showEditorInput
in interfaceIDtEditor<M extends org.eclipse.emf.ecore.EObject>
- Parameters:
editorInput
- the editor input to show, cannot benull
.- See Also:
IShowEditorInput.showEditorInput(org.eclipse.ui.IEditorInput)
-
showEditorInput
public void showEditorInput(org.eclipse.ui.IEditorInput editorInput)
- Specified by:
showEditorInput
in interfaceorg.eclipse.ui.IShowEditorInput
-
getShowInContext
public org.eclipse.ui.part.ShowInContext getShowInContext()
- Specified by:
getShowInContext
in interfaceorg.eclipse.ui.part.IShowInSource
-
getWaitingPartsId
protected Collection<String> getWaitingPartsId()
Returns parts ids array to be waited before creating control. Override in successors.- Returns:
- array of parts ids
-
createControls
protected abstract void createControls(org.eclipse.ui.forms.IManagedForm managedForm)
Creates editor controls.- Parameters:
managedForm
- the managed form, cannot benull
.
-
getToolkit
protected org.eclipse.ui.forms.widgets.FormToolkit getToolkit()
Returns the form toolkit- Returns:
- the form toolkit or
null
ifcreateControls(IManagedForm)
was not invoked for this instance of the editor.
-
-