Package com._1c.g5.v8.dt.dcs.ui
Class DataCompositionSchemaControlContext
- java.lang.Object
-
- com._1c.g5.v8.dt.dcs.ui.DataCompositionSchemaControlContext
-
- All Implemented Interfaces:
IDcsEnvironmentProvider
,IDcsListener
public class DataCompositionSchemaControlContext extends Object implements IDcsEnvironmentProvider
Context contains data for creating data composition schema editors and integrating them for each other
-
-
Constructor Summary
Constructors Constructor Description DataCompositionSchemaControlContext(IV8Project v8Project, DataCompositionSchema schema, String currentLanguageCode, boolean isEditable, IDcsListener dcsListener, IBmModel bmModel, IBmEditingContext editingContext, DcsSelectionProvider dcsSelectionProvider, org.eclipse.swt.widgets.Shell shell, IMdTypeIndex mdTypeIndex, IBmEmfIndexManager emfIndexManager, DataCompositionSchemaEditor editor)
Constructor
-
Method Summary
-
-
-
Constructor Detail
-
DataCompositionSchemaControlContext
public DataCompositionSchemaControlContext(IV8Project v8Project, DataCompositionSchema schema, String currentLanguageCode, boolean isEditable, IDcsListener dcsListener, IBmModel bmModel, IBmEditingContext editingContext, DcsSelectionProvider dcsSelectionProvider, org.eclipse.swt.widgets.Shell shell, IMdTypeIndex mdTypeIndex, IBmEmfIndexManager emfIndexManager, DataCompositionSchemaEditor editor)
Constructor- Parameters:
v8Project
- actualIV8Project
, cannot benull
schema
- actualDataCompositionSchema
for creating and integrating editors, cannot benull
currentLanguageCode
- current language code ofIV8Project
, cannot benull
isEditable
-true
if creating editors can changeDataCompositionSchema
,false
otherwisedcsListener
- actualIDcsListener
for integrating data composition schema editors. It is used for notifying editors for each other, cannot benull
editingContext
- current editorsIBmEditingContext
for changeDataCompositionSchema
, cannot benull
dcsSelectionProvider
- actualDcsSelectionProvider
for integrating data composition schema editors. It is used for getting actual selection of editors, cannot benull
shell
- currentShell
, cannot benull
mdTypeIndex
- actualIMdTypeIndex
, cannot benull
editor
- actualDataCompositionSchemaEditor
, can benull
if data composition editors is used for editing form dynamic list
-
-
Method Detail
-
getShell
public org.eclipse.swt.widgets.Shell getShell()
Gets activeShell
of created editors- Returns:
- active
Shell
, nevernull
-
getDataCompositionSchema
public DataCompositionSchema getDataCompositionSchema()
Gets editingDataCompositionSchema
- Returns:
- editing
DataCompositionSchema
, nevernull
-
getDataCompositionSchemaEditor
public DataCompositionSchemaEditor getDataCompositionSchemaEditor()
Gets actualDataCompositionSchemaEditor
- Returns:
- actual
DataCompositionSchemaEditor
, can benull
if data composition editors is used for editing form dynamic list
-
getV8project
public IV8Project getV8project()
Description copied from interface:IDcsEnvironmentProvider
Get V8 project- Specified by:
getV8project
in interfaceIDcsEnvironmentProvider
- Returns:
- the V8 project
-
getCurrentLanguageCode
public String getCurrentLanguageCode()
Description copied from interface:IDcsEnvironmentProvider
Get current language code- Specified by:
getCurrentLanguageCode
in interfaceIDcsEnvironmentProvider
- Returns:
- current language code
-
getVersion
public Version getVersion()
Description copied from interface:IDcsEnvironmentProvider
Get runtime version- Specified by:
getVersion
in interfaceIDcsEnvironmentProvider
- Returns:
- runtime version
-
isEditable
public boolean isEditable()
Checks possibility for editors changeDataCompositionSchema
- Returns:
true
if editors can changeDataCompositionSchema
,false
otherwise
-
getSelectionProvider
public DcsSelectionProvider getSelectionProvider()
Gets actualDcsSelectionProvider
for integrating data composition schema editors. It is used for getting actual selection of editors- Returns:
- actual
DcsSelectionProvider
, nevernull
-
getEditingContext
public IBmEditingContext getEditingContext()
Description copied from interface:IDcsEnvironmentProvider
Returns the BM editing context.- Specified by:
getEditingContext
in interfaceIDcsEnvironmentProvider
- Returns:
- the BM editing context, never
null
.
-
getBmModel
public IBmModel getBmModel()
Description copied from interface:IDcsEnvironmentProvider
Returns the BM model.- Specified by:
getBmModel
in interfaceIDcsEnvironmentProvider
- Returns:
- the BM model, never
null
.
-
notify
public void notify(DcsEvent event)
Description copied from interface:IDcsListener
Сообщить о событии- Specified by:
notify
in interfaceIDcsListener
- Parameters:
event
- событие
-
createToolbar
public List<CommandAction> createToolbar(org.eclipse.swt.widgets.Composite parent, int style, String... commands)
Creates toolbar action and menu for composite by command ids- Parameters:
parent
-Composite
for adding menu, cannot benull
style
- menu SWT stylecommands
- ids of menu commands
-
addPage
public void addPage(EditorPage page)
Adds createdEditorPage
- Parameters:
page
- created data composition schemaEditorPage
, cannot benull
-
addPages
public void addPages(Collection<EditorPage> pages)
Adds createdEditorPage
s- Parameters:
pages
- created data composition schemaEditorPage
s, cannot benull
-
getPages
public List<EditorPage> getPages()
Gets all createdEditorPage
for editingDataCompositionSchema
- Returns:
- list of created
EditorPage
for editingDataCompositionSchema
, nevernull
-
updateDcsDataSetInfoLocalQueryCache
public void updateDcsDataSetInfoLocalQueryCache(DataCompositionSchemaDataSetQuery dataSet)
Updates cache ofDcsDataSetInfoV8LocalQuery
by information fromDataCompositionSchemaDataSetQuery
SeeDcsPlugin.getDcsDataSetInfoLocalQueryCache()
- Parameters:
dataSet
- actualDataCompositionSchemaDataSetQuery
for updating cache values, cannot benull
-
isDynamicListContext
public boolean isDynamicListContext()
Check thatDataCompositionSchemaEditor
was created or not for editingDataCompositionSchema
If editor was not created that meansDataCompositionSchema
from form dynamic list editing- Returns:
true
ifDataCompositionSchema
from form dynamic list editing andDataCompositionSchemaEditor
was not created,false
otherwise
-
getMdTypeIndex
public IMdTypeIndex getMdTypeIndex()
Gets actualIMdTypeIndex
- Returns:
- actual
IMdTypeIndex
, nevernull
-
getEmfIndexManager
public IBmEmfIndexManager getEmfIndexManager()
Gets actualIMdTypeIndex
- Returns:
- actual
IMdTypeIndex
, nevernull
-
-