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 Modifier and Type Class Description static classDataCompositionSchemaEditor.ErrorDescriptor
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.core.databinding.DataBindingContextbindingsData binding supportstatic StringEDITOR_IDstatic StringMENU_MANAGERprotected org.eclipse.core.databinding.ObservablesManagerobservablesData binding supportTemplatestemplates
-
Constructor Summary
Constructors Constructor Description DataCompositionSchemaEditor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidcreatePartControl(org.eclipse.swt.widgets.Composite parent)voiddispose()voiddoCreateContent()voiddoSave(org.eclipse.core.runtime.IProgressMonitor monitor)NothingvoiddoSaveAs()Model editor is not intended to work with resource.EditorPagegetActivePage()Получить активную страницуObjectgetAdapter(Class adapter)IBmModelgetBmModel()Returns the BM model.DataCompositionSchemaControlContextgetControlContext()Gets actualDataCompositionSchemaControlContextIEditingContextgetCoreEditingContext()Gets editing context.StringgetCurrentLanguageCode()Get current language codeIBmEditingContextgetEditingContext()Get editing context.protected org.eclipse.ui.ISharedImagesgetImages()Returns the shared images for the workbench.ObjectgetModel()Получить модельstatic IModelApigetModelApiByEditingContext(IBmEditingContext context)Deprecated.use IModelApi directlyDataCompositionSchemaEditorgetNestedOpenedEditor(NestedDataCompositionSchema nested)Get opened editor for nested schemaList<EditorPage>getPages()Получить все страницыprotected org.eclipse.swt.widgets.CompositegetParent()Returns the parent compositeIResourceLookupgetResourceLookup()Returns resource lookup.DcsSelectionProvidergetSelectionProvider()Получить SelectionProviderIV8ProjectgetV8project()Get V8 projectVersiongetVersion()Get runtime versionvoidhandleAsyncEvent(BmEvent bmEvent)Invoked to notify about a BM event.voidinit(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input)booleanisDirty()booleanisEditable()Returnstrueif editor can be edited.booleanisNestedEditorOpened()Whether some nested schema editor was openedbooleanisSaveAsAllowed()Model editor is not intended to work with resource.protected org.eclipse.ui.IEditorInputnormalizeInput(org.eclipse.ui.IEditorInput input)Convert specified editor input object.voidnotify(DcsEvent event)Сообщить о событииprotected voidobserve(org.eclipse.core.databinding.observable.value.IObservableValue value, org.eclipse.core.databinding.observable.value.IValueChangeListener listener)Data binding support.
Addslistenerto thevalueand registers thisvalueinto .voidsetDirty(boolean dirty)Implementers are advised to not rely on this method to be called in UI thread.voidsetFocus()voidsetModel(Object model)Установить модельvoidtitleChanged()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
-
-
-
-
Field Detail
-
MENU_MANAGER
public static final String MENU_MANAGER
- See Also:
- Constant Field Values
-
EDITOR_ID
public static final String EDITOR_ID
- See Also:
- Constant Field Values
-
templates
public Templates templates
-
observables
protected final org.eclipse.core.databinding.ObservablesManager observables
Data binding support
-
bindings
protected final org.eclipse.core.databinding.DataBindingContext bindings
Data binding support
-
-
Method Detail
-
getModelApiByEditingContext
@Deprecated public static IModelApi getModelApiByEditingContext(IBmEditingContext context)
Deprecated.use IModelApi directlyReturns theIModelApiby 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:
initin interfaceorg.eclipse.ui.IEditorPart- Throws:
org.eclipse.ui.PartInitException
-
titleChanged
public void titleChanged()
Description copied from interface:ITitleChangeListenerIndicates that a title has changed.- Specified by:
titleChangedin interfaceITitleChangeListener
-
notify
public void notify(DcsEvent event)
Description copied from interface:IDcsListenerСообщить о событии- Specified by:
notifyin interfaceIDcsListener- Parameters:
event- событие
-
getV8project
public IV8Project getV8project()
Description copied from interface:IDcsEnvironmentProviderGet V8 project- Specified by:
getV8projectin interfaceIDcsEnvironmentProvider- Returns:
- the V8 project
-
getBmModel
public IBmModel getBmModel()
Description copied from interface:IDcsEnvironmentProviderReturns the BM model.- Specified by:
getBmModelin interfaceIDcsEnvironmentProvider- Returns:
- the BM model, never
null.
-
getCurrentLanguageCode
public String getCurrentLanguageCode()
Description copied from interface:IDcsEnvironmentProviderGet current language code- Specified by:
getCurrentLanguageCodein interfaceIDcsEnvironmentProvider- Returns:
- current language code
-
getVersion
public Version getVersion()
Description copied from interface:IDcsEnvironmentProviderGet runtime version- Specified by:
getVersionin interfaceIDcsEnvironmentProvider- Returns:
- runtime version
-
dispose
public void dispose()
- Specified by:
disposein interfaceorg.eclipse.ui.IWorkbenchPart
-
getSelectionProvider
public DcsSelectionProvider getSelectionProvider()
Получить SelectionProvider- Returns:
- SelectionProvider
-
getModel
public Object getModel()
Получить модель- Returns:
- модель
-
setModel
public void setModel(Object model)
Установить модель- Parameters:
model- модель
-
getAdapter
public Object getAdapter(Class adapter)
- Specified by:
getAdapterin interfaceorg.eclipse.core.runtime.IAdaptable- Overrides:
getAdapterin classorg.eclipse.ui.part.WorkbenchPart
-
setFocus
public void setFocus()
- Specified by:
setFocusin interfaceorg.eclipse.ui.IWorkbenchPart- Specified by:
setFocusin classorg.eclipse.ui.part.WorkbenchPart
-
isDirty
public boolean isDirty()
- Specified by:
isDirtyin interfaceorg.eclipse.ui.ISaveablePart
-
setDirty
public void setDirty(boolean dirty)
Description copied from interface:EditorDirtyProperty.DirtyMarkableEditorImplementers are advised to not rely on this method to be called in UI thread.- Specified by:
setDirtyin interfaceEditorDirtyProperty.DirtyMarkableEditor
-
doSave
public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
Nothing- Specified by:
doSavein interfaceorg.eclipse.ui.ISaveablePart
-
doCreateContent
public void doCreateContent()
-
getActivePage
public EditorPage getActivePage()
Получить активную страницу- Returns:
- страница
-
getPages
public List<EditorPage> getPages()
Получить все страницы- Returns:
- страницы
-
getResourceLookup
public IResourceLookup getResourceLookup()
Returns resource lookup.- Returns:
- the resource lookup, cannot be
null
-
getEditingContext
public IBmEditingContext getEditingContext()
Get editing context.- Specified by:
getEditingContextin interfaceIDcsEnvironmentProvider- Returns:
- editing context, null for main schema
-
getCoreEditingContext
public IEditingContext 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
public DataCompositionSchemaEditor getNestedOpenedEditor(NestedDataCompositionSchema nested)
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()
Returnstrueif editor can be edited.- Returns:
trueif editor can be edited,falseotherwise
-
handleAsyncEvent
public void handleAsyncEvent(BmEvent bmEvent)
Description copied from interface:IBmAsyncEventListenerInvoked to notify about a BM event.- Specified by:
handleAsyncEventin interfaceIBmAsyncEventListener- Parameters:
bmEvent- the BM event. Nevernull.
-
getControlContext
public DataCompositionSchemaControlContext 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.
Addslistenerto thevalueand registers thisvalueinto . Thisvaluewill be disposed automaticly when editor closed.
-
doSaveAs
public void doSaveAs()
Model editor is not intended to work with resource. Always throws theUnsupportedOperationException- Specified by:
doSaveAsin interfaceorg.eclipse.ui.ISaveablePart- Specified by:
doSaveAsin classorg.eclipse.ui.part.EditorPart
-
normalizeInput
protected org.eclipse.ui.IEditorInput normalizeInput(org.eclipse.ui.IEditorInput input) throws org.eclipse.ui.PartInitExceptionConvert specified editor input object. It is called from the init() method before setInput().
Implementors of this method must throwsPartInitExceptionin 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:
isSaveAsAllowedin interfaceorg.eclipse.ui.ISaveablePart- Specified by:
isSaveAsAllowedin classorg.eclipse.ui.part.EditorPart- Returns:
- Always
false
-
createPartControl
public void createPartControl(org.eclipse.swt.widgets.Composite parent)
- Specified by:
createPartControlin interfaceorg.eclipse.ui.IWorkbenchPart- Specified by:
createPartControlin 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
-
-