Class DtGranularEditorXtextEditorPage<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>
-
- com._1c.g5.v8.dt.md.ui.editor.base.DtGranularEditorEmbeddedEditorPage<M>
-
- com._1c.g5.v8.dt.md.ui.editor.base.DtGranularEditorXtextEditorPage<M>
-
- All Implemented Interfaces:
IDtEditor<M>
,IDtGranularEditorEmbeddedEditorPage<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:
FormEditorModulePage
public class DtGranularEditorXtextEditorPage<M extends org.eclipse.emf.ecore.EObject> extends DtGranularEditorEmbeddedEditorPage<M>
Base class for Xtext editors.
-
-
Field Summary
-
Fields inherited from class com._1c.g5.v8.dt.md.ui.editor.base.DtGranularEditorPage
activeSelection, derivedDataManagerProvider, modelManager, resourceLookup, SECTION_ID_PATTERN
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DtGranularEditorXtextEditorPage(String id, String title)
Instantiates a new DT granular editor Xtext editor page if feature to obtain model to edit unknown.protected
DtGranularEditorXtextEditorPage(String id, String title, org.eclipse.emf.ecore.EStructuralFeature embeddedFeature)
Instantiates a new DT granular editor Xtext editor page.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activateContexts(org.eclipse.ui.contexts.IContextService service)
Activates embedded editor specific contexts.protected org.eclipse.ui.IEditorSite
createEditorSite(org.eclipse.ui.IEditorPart embeddedEditor)
Create embedded editor editor site.org.eclipse.ui.IEditorPart
createEmbeddedEditor()
org.eclipse.ui.IEditorInput
createEmbeddedEditorInput()
void
dispose()
<T> T
getAdapter(Class<T> adapter)
org.eclipse.ui.part.ShowInContext
getShowInContext()
protected Collection<String>
getWaitingPartsId()
Returns parts ids array to be waited before creating control.void
gotoSelection(ISelection selection)
Sets selection to the editorprotected void
initEmbeddedEditor()
Init page embedded editor.void
initialize(org.eclipse.ui.forms.editor.FormEditor editor)
protected void
setEmbeddedFeature(org.eclipse.emf.ecore.EReference embeddedFeature)
Sets embedded feature to obtain model to edit.void
setFocus()
void
showEditorInput(IDtEditorInput<M> editorInput)
Shows the editor input.-
Methods inherited from class com._1c.g5.v8.dt.md.ui.editor.base.DtGranularEditorEmbeddedEditorPage
createPageControls, createPageLayout, doSave, doSaveAs, getActiveSelection, getEmbeddedEditor, getEmbeddedEditorContributorClass, isDirty, isSaveAsAllowed
-
Methods inherited from class com._1c.g5.v8.dt.md.ui.editor.base.DtGranularEditorPage
activate, createFormContent, deactivate, getActiveFeature, getApiEditingContext, getDefaultFeature, getEditingContext, getEditor, getEditorInput, getEditorPageDescriptor, getEventGate, getHelpContextId, getModel, getPageTitle, getPageTitle, getSectionID, init, onEventGateClosed, pathSeparetor, refresh, setActiveFeature, setActiveSelection, setDefaultFeature, showEditorInput, waitDerivedData, waitDerivedData
-
Methods inherited from class org.eclipse.ui.forms.editor.FormPage
canLeaveThePage, createPartControl, getId, getIndex, getManagedForm, getPartControl, getTitleImage, init, isActive, isEditor, 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, 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 com._1c.g5.v8.dt.ui.editor.IDtEditor
getApiEditingContext, getEditingContext, getEditorInput, getModel, init, setActiveFeature, setActiveSelection
-
Methods inherited from interface com._1c.g5.v8.dt.ui.editor.IDtGranularEditorPage
activate, deactivate, setDefaultFeature
-
-
-
-
Constructor Detail
-
DtGranularEditorXtextEditorPage
protected DtGranularEditorXtextEditorPage(String id, String title, org.eclipse.emf.ecore.EStructuralFeature embeddedFeature)
Instantiates a new DT granular editor Xtext editor page.- Parameters:
id
- page ID.title
- page title.embeddedFeature
- feature to obtain model to edit.
-
-
Method Detail
-
initialize
public void initialize(org.eclipse.ui.forms.editor.FormEditor editor)
- Specified by:
initialize
in interfaceorg.eclipse.ui.forms.editor.IFormPage
- Overrides:
initialize
in classDtGranularEditorPage<M extends org.eclipse.emf.ecore.EObject>
-
createEmbeddedEditorInput
public org.eclipse.ui.IEditorInput createEmbeddedEditorInput()
- Returns:
- input for embedded editor.
-
createEmbeddedEditor
public org.eclipse.ui.IEditorPart createEmbeddedEditor()
- Returns:
- embedded editor's
IEditorInput
.
-
showEditorInput
public void showEditorInput(IDtEditorInput<M> editorInput)
Shows the editor input. Override logic because we do not need set new active seletion for xtext editor, new selection will be setted to embedded editor here- Specified by:
showEditorInput
in interfaceIDtEditor<M extends org.eclipse.emf.ecore.EObject>
- Overrides:
showEditorInput
in classDtGranularEditorPage<M extends org.eclipse.emf.ecore.EObject>
- Parameters:
editorInput
- the editor input to show, cannot benull
.- See Also:
IShowEditorInput.showEditorInput(org.eclipse.ui.IEditorInput)
-
gotoSelection
public void gotoSelection(ISelection selection)
Description copied from interface:IGotoSelection
Sets selection to the editor- Specified by:
gotoSelection
in interfaceIGotoSelection
- Overrides:
gotoSelection
in classDtGranularEditorPage<M extends org.eclipse.emf.ecore.EObject>
- Parameters:
selection
- actual selection, can benull
-
activateContexts
public void activateContexts(org.eclipse.ui.contexts.IContextService service)
Description copied from interface:IDtGranularEditorEmbeddedEditorPage
Activates embedded editor specific contexts.- Specified by:
activateContexts
in interfaceIDtGranularEditorEmbeddedEditorPage<M extends org.eclipse.emf.ecore.EObject>
- Overrides:
activateContexts
in classDtGranularEditorEmbeddedEditorPage<M extends org.eclipse.emf.ecore.EObject>
- Parameters:
service
- context service to activate contexts using it.
-
getAdapter
public <T> T getAdapter(Class<T> adapter)
- Specified by:
getAdapter
in interfaceorg.eclipse.core.runtime.IAdaptable
- Overrides:
getAdapter
in classDtGranularEditorEmbeddedEditorPage<M extends org.eclipse.emf.ecore.EObject>
-
getShowInContext
public org.eclipse.ui.part.ShowInContext getShowInContext()
- Specified by:
getShowInContext
in interfaceorg.eclipse.ui.part.IShowInSource
- Overrides:
getShowInContext
in classDtGranularEditorPage<M extends org.eclipse.emf.ecore.EObject>
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceorg.eclipse.ui.IWorkbenchPart
- Overrides:
dispose
in classDtGranularEditorEmbeddedEditorPage<M extends org.eclipse.emf.ecore.EObject>
-
setFocus
public void setFocus()
- Specified by:
setFocus
in interfaceorg.eclipse.ui.IWorkbenchPart
- Overrides:
setFocus
in classDtGranularEditorEmbeddedEditorPage<M extends org.eclipse.emf.ecore.EObject>
-
initEmbeddedEditor
protected void initEmbeddedEditor()
Description copied from class:DtGranularEditorEmbeddedEditorPage
Init page embedded editor.- Overrides:
initEmbeddedEditor
in classDtGranularEditorEmbeddedEditorPage<M extends org.eclipse.emf.ecore.EObject>
-
createEditorSite
protected org.eclipse.ui.IEditorSite createEditorSite(org.eclipse.ui.IEditorPart embeddedEditor)
Description copied from class:DtGranularEditorEmbeddedEditorPage
Create embedded editor editor site.Default implementation delegates execution to parent DT granular editor, sub-classes can override.
- Overrides:
createEditorSite
in classDtGranularEditorEmbeddedEditorPage<M extends org.eclipse.emf.ecore.EObject>
- Parameters:
embeddedEditor
- this embedded editor, cannot benull
- Returns:
- newly created editor site, never
null
-
getWaitingPartsId
protected Collection<String> getWaitingPartsId()
Description copied from class:DtGranularEditorPage
Returns parts ids array to be waited before creating control. Override in successors.- Overrides:
getWaitingPartsId
in classDtGranularEditorPage<M extends org.eclipse.emf.ecore.EObject>
- Returns:
- array of parts ids
-
setEmbeddedFeature
protected void setEmbeddedFeature(org.eclipse.emf.ecore.EReference embeddedFeature)
Sets embedded feature to obtain model to edit.- Parameters:
embeddedFeature
- the feature to obtain model to edit, cannot benull
-
-