Class DtGranularEditorPage<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
org.eclipse.ui.forms.editor.FormPage
com._1c.g5.v8.dt.md.ui.editor.base.DtGranularEditorPage<M>
- All Implemented Interfaces:
IDtEditor<M>
,IDtGranularEditorPage<M>
,IGotoSelection
,org.eclipse.core.runtime.IAdaptable
,org.eclipse.core.runtime.IExecutableExtension
,org.eclipse.ui.forms.editor.IFormPage
,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:
AbstractDtGranularEditorAefPage
,DtGranularEditorEmbeddedEditorPage
,DtGranularEditorSingleSectionPage
,HtmlDocumentPreviewEditorPage
,HtmlDocumentTextEditorPage
,HtmlDocumentWysiwygEditorPage
,RightsEditorRestrictionTemplatesPage
,RightsEditorRightsPage
,TemplateEditorActiveDocumentPage
public abstract class DtGranularEditorPage<M extends org.eclipse.emf.ecore.EObject>
extends org.eclipse.ui.forms.editor.FormPage
implements IDtGranularEditorPage<M>
Base class for all DT granular editor pages.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ISelection
Active selection on the pageprotected IDerivedDataManagerProvider
protected IBmModelManager
protected IResourceLookup
protected static final String
The sections pattern.Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DtGranularEditorPage
(String id, String title) Instantiates a new DT granular editor page. -
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
Performs necessary actions when this page is activated (i. e. becomes visible and active).protected final void
createFormContent
(org.eclipse.ui.forms.IManagedForm managedForm) protected abstract void
createPageControls
(org.eclipse.ui.forms.IManagedForm managedForm) Creates the controls of this page.protected org.eclipse.swt.widgets.Layout
void
Performs necessary actions when this page is deactivated (i. e. ceases to be visible and active).void
dispose()
protected org.eclipse.emf.ecore.EStructuralFeature
Returns the active feature.protected ISelection
Returns the active selection.Returns theIEditingContext
instance associated with the editor.protected org.eclipse.emf.ecore.EStructuralFeature
Returns the default pages feature.protected EditorPageDescriptor
Returns editor page descriptor.protected EventGate
Returns the event gate of this page.protected String
Returns help context id to bind help to.getModel()
protected String
Returns the page title.protected String
getPageTitle
(org.eclipse.emf.ecore.EObject modelObject) Returns the page title based on the provided model object.static String
getSectionID
(String pageID, String sectionName) This method create section IDorg.eclipse.ui.part.ShowInContext
protected Collection<String>
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
initialize
(org.eclipse.ui.forms.editor.FormEditor editor) protected void
Performs necessary actions when the event gate manager transitions into CLOSED state.protected String
Returns granual editor page title path separator.protected void
refresh()
Fully refreshes the contents of the page as if it was just opened for the first time.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
setDefaultFeature
(org.eclipse.emf.ecore.EStructuralFeature feature) Sets the default feature of the page.void
setFocus()
void
showEditorInput
(IDtEditorInput<M> editorInput) Shows the editor input.void
showEditorInput
(org.eclipse.ui.IEditorInput editorInput) protected boolean
Waits when dependent derivid data of the editor will finish computation.protected boolean
waitDerivedData
(org.eclipse.emf.ecore.EObject model) Waits when dependent derivid data of the editor will finish computation.Methods inherited from class org.eclipse.ui.forms.editor.FormPage
canLeaveThePage, createPartControl, doSave, doSaveAs, getId, getIndex, getManagedForm, getPartControl, getTitleImage, init, isActive, isDirty, isEditor, isSaveAsAllowed, selectReveal, setActive, setIndex
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, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, 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 org.eclipse.core.runtime.IAdaptable
getAdapter
Methods inherited from interface org.eclipse.ui.IEditorPart
getEditorSite, init
Methods inherited from interface org.eclipse.ui.forms.editor.IFormPage
canLeaveThePage, getId, getIndex, getManagedForm, getPartControl, isActive, isEditor, selectReveal, setActive, setIndex
Methods inherited from interface org.eclipse.ui.ISaveablePart
doSave, doSaveAs, isDirty, isSaveAsAllowed, isSaveOnCloseNeeded
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, createPartControl, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
-
Field Details
-
SECTION_ID_PATTERN
The sections pattern.
How usage:String.format(SECTION_ID_PATTERN, "PageID","sectionName")
- See Also:
-
derivedDataManagerProvider
-
resourceLookup
-
modelManager
-
activeSelection
Active selection on the page
-
-
Constructor Details
-
DtGranularEditorPage
Instantiates a new DT granular editor page.- Parameters:
id
- ID of this page.title
- title of this page.
-
-
Method Details
-
getSectionID
This method create section ID- Parameters:
pageID
- the page id for which creating section, cannot benull
sectionName
- the section name, cannot benull
- Returns:
- the section id, cannot be
null
-
initialize
public void initialize(org.eclipse.ui.forms.editor.FormEditor editor) - Specified by:
initialize
in interfaceorg.eclipse.ui.forms.editor.IFormPage
- Overrides:
initialize
in classorg.eclipse.ui.forms.editor.FormPage
-
getEditor
- Specified by:
getEditor
in interfaceorg.eclipse.ui.forms.editor.IFormPage
- Overrides:
getEditor
in classorg.eclipse.ui.forms.editor.FormPage
-
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
-
setDefaultFeature
public void setDefaultFeature(org.eclipse.emf.ecore.EStructuralFeature feature) Description copied from interface:IDtGranularEditorPage
Sets the default feature of the page. Initial focus will be set to the corresponding field.- Specified by:
setDefaultFeature
in interfaceIDtGranularEditorPage<M extends org.eclipse.emf.ecore.EObject>
- Parameters:
feature
- feature to set.
-
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
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.
-
showEditorInput
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
-
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)
-
getEditingContext
- Specified by:
getEditingContext
in interfaceIDtEditor<M extends org.eclipse.emf.ecore.EObject>
- Returns:
- BM editing context associated with the editor.
-
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.
-
getModel
-
setFocus
public void setFocus()- Specified by:
setFocus
in interfaceorg.eclipse.ui.IWorkbenchPart
- Overrides:
setFocus
in classorg.eclipse.ui.forms.editor.FormPage
-
dispose
public void dispose()- Specified by:
dispose
in interfaceorg.eclipse.ui.IWorkbenchPart
- Overrides:
dispose
in classorg.eclipse.ui.forms.editor.FormPage
-
gotoSelection
Description copied from interface:IGotoSelection
Sets selection to the editor- Specified by:
gotoSelection
in interfaceIGotoSelection
- Parameters:
selection
- actual selection, can benull
-
getShowInContext
public org.eclipse.ui.part.ShowInContext getShowInContext()- Specified by:
getShowInContext
in interfaceorg.eclipse.ui.part.IShowInSource
-
activate
public void activate()Description copied from interface:IDtGranularEditorPage
Performs necessary actions when this page is activated (i. e. becomes visible and active).- Specified by:
activate
in interfaceIDtGranularEditorPage<M extends org.eclipse.emf.ecore.EObject>
-
deactivate
public void deactivate()Description copied from interface:IDtGranularEditorPage
Performs necessary actions when this page is deactivated (i. e. ceases to be visible and active).- Specified by:
deactivate
in interfaceIDtGranularEditorPage<M extends org.eclipse.emf.ecore.EObject>
-
getActiveFeature
protected org.eclipse.emf.ecore.EStructuralFeature getActiveFeature()Returns the active feature.- Returns:
- the active feature or
null
.
-
getActiveSelection
Returns the active selection.- Returns:
- the active selection or
null
.
-
refresh
protected void refresh()Fully refreshes the contents of the page as if it was just opened for the first time. -
onEventGateClosed
protected void onEventGateClosed()Performs necessary actions when the event gate manager transitions into CLOSED state. -
waitDerivedData
protected boolean waitDerivedData()Waits when dependent derivid data of the editor will finish computation.- Returns:
true
if waiting of computation is finishing well, otherwisefalse
.
-
waitDerivedData
protected boolean waitDerivedData(org.eclipse.emf.ecore.EObject model) Waits when dependent derivid data of the editor will finish computation.- Parameters:
model
- the model object, cannot benull
- Returns:
true
if waiting of computation is finishing well, otherwisefalse
.
-
createFormContent
protected final void createFormContent(org.eclipse.ui.forms.IManagedForm managedForm) - Overrides:
createFormContent
in classorg.eclipse.ui.forms.editor.FormPage
-
getHelpContextId
Returns help context id to bind help to.- Returns:
- help context id or
null
if no help is needed
-
getWaitingPartsId
Returns parts ids array to be waited before creating control. Override in successors.- Returns:
- array of parts ids
-
getPageTitle
Returns the page title.- Returns:
- this page title, never
null
-
getPageTitle
Returns the page title based on the provided model object.- Parameters:
modelObject
- the model object, cannot benull
- Returns:
- the page title, never
null
-
pathSeparetor
Returns granual editor page title path separator.- Returns:
- granual editor page title path separator, never
null
-
createPageLayout
protected org.eclipse.swt.widgets.Layout createPageLayout()- Returns:
- layout for this page.
-
createPageControls
protected abstract void createPageControls(org.eclipse.ui.forms.IManagedForm managedForm) Creates the controls of this page.- Parameters:
managedForm
- managed form that will contain the controls.
-
getEventGate
Returns the event gate of this page. It is created on first call.- Returns:
- the event gate of the page
-
getEditorPageDescriptor
Returns editor page descriptor.- Returns:
- editorPageDescriptor, the editor page descriptor, can be
null
-
getDefaultFeature
protected org.eclipse.emf.ecore.EStructuralFeature getDefaultFeature()Returns the default pages feature.- Returns:
- the default pages feature, or
null
if there is no default feature.
-