Package com._1c.g5.v8.dt.dcs.ui
Class DataCompositionSchemaEditor
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
com._1c.g5.v8.dt.dcs.ui.DataCompositionSchemaEditor
- All Implemented Interfaces:
IBmAsyncEventListener
,EditorDirtyProperty.DirtyMarkableEditor
,IDcsEnvironmentProvider
,IDcsListener
,ITitleChangeListener
,org.eclipse.core.runtime.IAdaptable
,org.eclipse.core.runtime.IExecutableExtension
,org.eclipse.ui.IEditorPart
,org.eclipse.ui.ISaveablePart
,org.eclipse.ui.IWorkbenchPart
,org.eclipse.ui.IWorkbenchPart2
,org.eclipse.ui.IWorkbenchPart3
,org.eclipse.ui.part.IWorkbenchPartOrientation
public class DataCompositionSchemaEditor
extends org.eclipse.ui.part.EditorPart
implements EditorDirtyProperty.DirtyMarkableEditor, ITitleChangeListener, IDcsListener, IDcsEnvironmentProvider, IBmAsyncEventListener
Редактор схемы компоновки данных
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.eclipse.core.databinding.DataBindingContext
Data binding supportstatic final String
static final String
protected final org.eclipse.core.databinding.ObservablesManager
Data binding supportFields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
createPartControl
(org.eclipse.swt.widgets.Composite parent) void
dispose()
void
void
doSave
(org.eclipse.core.runtime.IProgressMonitor monitor) Nothingvoid
doSaveAs()
Model editor is not intended to work with resource.Получить активную страницуgetAdapter
(Class adapter) Returns the BM model.Gets actualDataCompositionSchemaControlContext
Gets editing context.Get current language codeGet editing context.protected org.eclipse.ui.ISharedImages
Returns the shared images for the workbench.getModel()
Получить модельstatic IModelApi
Deprecated.use IModelApi directlyGet opened editor for nested schemagetPages()
Получить все страницыprotected org.eclipse.swt.widgets.Composite
Returns the parent compositeReturns resource lookup.Получить SelectionProviderGet V8 projectGet runtime versionvoid
handleAsyncEvent
(BmEvent bmEvent) Invoked to notify about a BM event.void
init
(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input) boolean
isDirty()
boolean
Returnstrue
if editor can be edited.boolean
Whether some nested schema editor was openedboolean
Model editor is not intended to work with resource.protected org.eclipse.ui.IEditorInput
normalizeInput
(org.eclipse.ui.IEditorInput input) Convert specified editor input object.void
Сообщить о событииprotected void
observe
(org.eclipse.core.databinding.observable.value.IObservableValue value, org.eclipse.core.databinding.observable.value.IValueChangeListener listener) Data binding support.
Addslistener
to thevalue
and registers thisvalue
into .void
setDirty
(boolean dirty) Implementers are advised to not rely on this method to be called in UI thread.void
setFocus()
void
Установить модельvoid
Indicates that a title has changed.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
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
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.IEditorPart
getEditorInput, getEditorSite
Methods inherited from interface org.eclipse.ui.ISaveablePart
doSaveAs, isSaveAsAllowed, isSaveOnCloseNeeded
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, createPartControl, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
-
Field Details
-
MENU_MANAGER
- See Also:
-
EDITOR_ID
- See Also:
-
templates
-
observables
protected final org.eclipse.core.databinding.ObservablesManager observablesData binding support -
bindings
protected final org.eclipse.core.databinding.DataBindingContext bindingsData binding support
-
-
Constructor Details
-
DataCompositionSchemaEditor
public DataCompositionSchemaEditor()
-
-
Method Details
-
getModelApiByEditingContext
Deprecated.use IModelApi directlyReturns theIModelApi
by the specified editing context.- Parameters:
context
- the BM editing context, cannot benull
.- Returns:
- {IModelApi} instance.
-
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
- Throws:
org.eclipse.ui.PartInitException
-
titleChanged
public void titleChanged()Description copied from interface:ITitleChangeListener
Indicates that a title has changed.- Specified by:
titleChanged
in interfaceITitleChangeListener
-
notify
Description copied from interface:IDcsListener
Сообщить о событии- Specified by:
notify
in interfaceIDcsListener
- Parameters:
event
- событие
-
getV8project
Description copied from interface:IDcsEnvironmentProvider
Get V8 project- Specified by:
getV8project
in interfaceIDcsEnvironmentProvider
- Returns:
- the V8 project
-
getBmModel
Description copied from interface:IDcsEnvironmentProvider
Returns the BM model.- Specified by:
getBmModel
in interfaceIDcsEnvironmentProvider
- Returns:
- the BM model, never
null
.
-
getCurrentLanguageCode
Description copied from interface:IDcsEnvironmentProvider
Get current language code- Specified by:
getCurrentLanguageCode
in interfaceIDcsEnvironmentProvider
- Returns:
- current language code
-
getVersion
Description copied from interface:IDcsEnvironmentProvider
Get runtime version- Specified by:
getVersion
in interfaceIDcsEnvironmentProvider
- Returns:
- runtime version
-
dispose
public void dispose()- Specified by:
dispose
in interfaceorg.eclipse.ui.IWorkbenchPart
-
getSelectionProvider
Получить SelectionProvider- Returns:
- SelectionProvider
-
getModel
Получить модель- Returns:
- модель
-
setModel
Установить модель- Parameters:
model
- модель
-
getAdapter
- Specified by:
getAdapter
in interfaceorg.eclipse.core.runtime.IAdaptable
- Overrides:
getAdapter
in classorg.eclipse.ui.part.WorkbenchPart
-
setFocus
public void setFocus()- Specified by:
setFocus
in interfaceorg.eclipse.ui.IWorkbenchPart
- Specified by:
setFocus
in classorg.eclipse.ui.part.WorkbenchPart
-
isDirty
public boolean isDirty()- Specified by:
isDirty
in interfaceorg.eclipse.ui.ISaveablePart
-
setDirty
public void setDirty(boolean dirty) Description copied from interface:EditorDirtyProperty.DirtyMarkableEditor
Implementers are advised to not rely on this method to be called in UI thread.- Specified by:
setDirty
in interfaceEditorDirtyProperty.DirtyMarkableEditor
-
doSave
public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor) Nothing- Specified by:
doSave
in interfaceorg.eclipse.ui.ISaveablePart
-
doCreateContent
public void doCreateContent() -
getActivePage
Получить активную страницу- Returns:
- страница
-
getPages
Получить все страницы- Returns:
- страницы
-
getResourceLookup
Returns resource lookup.- Returns:
- the resource lookup, cannot be
null
-
getEditingContext
Get editing context.- Specified by:
getEditingContext
in interfaceIDcsEnvironmentProvider
- Returns:
- editing context, null for main schema
-
getCoreEditingContext
Gets editing context.- Returns:
- a non-null editing context if the editor is initialized. If the editor is not initialized the result is not specified.
-
getNestedOpenedEditor
Get opened editor for nested schema- Parameters:
nested
- nested schema object- Returns:
- editor or null if editor not found
-
isNestedEditorOpened
public boolean isNestedEditorOpened()Whether some nested schema editor was opened- Returns:
- whether some nested schema editor was opened
-
isEditable
public boolean isEditable()Returnstrue
if editor can be edited.- Returns:
true
if editor can be edited,false
otherwise
-
handleAsyncEvent
Description copied from interface:IBmAsyncEventListener
Invoked to notify about a BM event.- Specified by:
handleAsyncEvent
in interfaceIBmAsyncEventListener
- Parameters:
bmEvent
- the BM event. Nevernull
.
-
getControlContext
Gets actualDataCompositionSchemaControlContext
- Returns:
- actual
DataCompositionSchemaControlContext
, nevernull
-
observe
protected void observe(org.eclipse.core.databinding.observable.value.IObservableValue value, org.eclipse.core.databinding.observable.value.IValueChangeListener listener) Data binding support.
Addslistener
to thevalue
and registers thisvalue
into . Thisvalue
will be disposed automaticly when editor closed. -
doSaveAs
public void doSaveAs()Model editor is not intended to work with resource. Always throws theUnsupportedOperationException
- Specified by:
doSaveAs
in interfaceorg.eclipse.ui.ISaveablePart
- Specified by:
doSaveAs
in classorg.eclipse.ui.part.EditorPart
-
normalizeInput
protected org.eclipse.ui.IEditorInput normalizeInput(org.eclipse.ui.IEditorInput input) throws org.eclipse.ui.PartInitException Convert specified editor input object. It is called from the init() method before setInput().
Implementors of this method must throwsPartInitException
in case editor input object type is understood.- Parameters:
input
-- Returns:
- converted editor input
- Throws:
org.eclipse.ui.PartInitException
-
isSaveAsAllowed
public boolean isSaveAsAllowed()Model editor is not intended to work with resource. Always returnsfalse
.- Specified by:
isSaveAsAllowed
in interfaceorg.eclipse.ui.ISaveablePart
- Specified by:
isSaveAsAllowed
in classorg.eclipse.ui.part.EditorPart
- Returns:
- Always
false
-
createPartControl
public 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
- See Also:
-
WorkbenchPart.createPartControl(Composite)
-
getParent
protected org.eclipse.swt.widgets.Composite getParent()Returns the parent composite- Returns:
- the parent composite
-
getImages
protected org.eclipse.ui.ISharedImages getImages()Returns the shared images for the workbench.- Returns:
- the shared image manager
-