Package com._1c.g5.v8.dt.dcs.ui.util
Class DcsUiUtil
java.lang.Object
com._1c.g5.v8.dt.dcs.ui.util.DcsUiUtil
Вспомогательные функции наборов данных.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddContextMenuToViewer(TableEx table, String contextMenuId, String contextId) Creates context menu forTableExViewer,TableExTreeViewerviewerstatic voidaddContextMenuToViewer(org.eclipse.ui.IWorkbenchPartSite site, ColumnViewer viewer, TableEx table, String contextMenuId, String contextId) Creates context menu forTableExViewer,TableExTreeViewerviewerstatic voidcopyTypeQualifiers(TypeDescription srcType, TypeDescription destType) Copy type qualifiersstatic org.eclipse.swt.widgets.CompositecreateBorderComposite(org.eclipse.swt.widgets.Composite parent) Creates and returns border composite.static TableExViewerColumncreateColumn(TableExViewerColumn group, int groupStyle, int width, String text) Create viewer's columnstatic TableExViewerColumncreateColumn(ColumnViewer viewer, int groupStyle, int width, String text) Create viewer's columnstatic org.eclipse.jface.action.ActioncreateDropDownMenu(String imageSymbolicName, org.eclipse.jface.action.IAction... commands) Creates dropdown menu buttonstatic DataCompositionSchemacreateSchema(IV8Project v8project) Create schema objectGets actualDataCompositionSchemaControlContextfor form dynamic list dialog.static intgetAlias(org.eclipse.emf.ecore.EObject obj) Получить текущий вариант встроенного языкаstatic StringgetCurrentLanguageCode(IV8Project v8project) Get code of current languagestatic DataCompositionSchemaEditorGet current dcs editorstatic EditorPageGet active dcs editor pagestatic StringgetNextName(String template, List<? extends org.eclipse.emf.ecore.EObject> items, org.eclipse.emf.ecore.EStructuralFeature nameFeature) Get next name for object (Field1, Field2...)static IDcsSettingsProviderGet current setting providerstatic StringgetTemplateName(String name) Выделить шаблонную часть имени без цифр (например, из НаборДанных1 выделить НаборДанных)static voidrenameDataSet(org.eclipse.swt.widgets.Shell shell, IBmEditingContext editingContext, DataCompositionSchema schema, DataSet dataSet) Переименовать набор данныхstatic voidsetActualControlContext(DataCompositionSchemaControlContext actualContext) Sets actualDataCompositionSchemaControlContextfor form dynamic list dialogstatic voidsetSettingsProvider(IDcsSettingsProvider settingsProvider) Set current settings provider
-
Constructor Details
-
DcsUiUtil
public DcsUiUtil()
-
-
Method Details
-
renameDataSet
public static void renameDataSet(org.eclipse.swt.widgets.Shell shell, IBmEditingContext editingContext, DataCompositionSchema schema, DataSet dataSet) Переименовать набор данных- Parameters:
shell- окно редактораeditingContext- the BM editing contextschema- модель скдdataSet- набор данных
-
getTemplateName
Выделить шаблонную часть имени без цифр (например, из НаборДанных1 выделить НаборДанных)- Parameters:
name- имя- Returns:
- шаблонная часть
-
getNextName
public static String getNextName(String template, List<? extends org.eclipse.emf.ecore.EObject> items, org.eclipse.emf.ecore.EStructuralFeature nameFeature) Get next name for object (Field1, Field2...)- Parameters:
template- name template, can't be nullitems- sibling objects, can't be nullnameFeature- name feature, can't be null- Returns:
- name, never null
-
getAlias
public static int getAlias(org.eclipse.emf.ecore.EObject obj) Получить текущий вариант встроенного языка- Parameters:
obj- объект модели- Returns:
- текущий вариант
-
getCurrentLanguageCode
Get code of current language- Parameters:
v8project- the V8 project- Returns:
- code
-
getSettingsProvider
Get current setting provider- Returns:
IDcsSettingsProviderobject
-
setSettingsProvider
Set current settings provider- Parameters:
settingsProvider-IDcsSettingsProviderobject
-
getActualControlContext
Gets actualDataCompositionSchemaControlContextfor form dynamic list dialog. Important thatDataCompositionSchemaEditordoes not call methodsetActualControlContext(DataCompositionSchemaControlContext)- Returns:
- actual
DataCompositionSchemaControlContextfor form dynamic list dialog, can benullif dynamic list dialog is not open
-
setActualControlContext
Sets actualDataCompositionSchemaControlContextfor form dynamic list dialog- Parameters:
actualContext- actualDataCompositionSchemaControlContextfor form dynamic list dialog, cannot benull
-
createDropDownMenu
public static org.eclipse.jface.action.Action createDropDownMenu(String imageSymbolicName, org.eclipse.jface.action.IAction... commands) Creates dropdown menu button- Parameters:
imageSymbolicName- menu image, can't be nullcommands- menu commands, can't be null- Returns:
- dropdown menu button, never null
-
addContextMenuToViewer
public static void addContextMenuToViewer(org.eclipse.ui.IWorkbenchPartSite site, ColumnViewer viewer, TableEx table, String contextMenuId, String contextId) Creates context menu forTableExViewer,TableExTreeViewerviewer- Parameters:
site- editor's site, can't benullviewer- viewer, can't benulltable-TableExviewer's table, can't benullcontextMenuId- context menu id, can benullcontextId- context id, can't benull
-
addContextMenuToViewer
Creates context menu forTableExViewer,TableExTreeViewerviewer- Parameters:
table-TableExviewer's table, can't benullcontextMenuId- context menu id, can't benullcontextId- context id, can't benull
-
createColumn
public static TableExViewerColumn createColumn(ColumnViewer viewer, int groupStyle, int width, String text) Create viewer's column- Parameters:
viewer- parent viewer, can't benullgroupStyle- column stylewidth- widthtext- title, can benull- Returns:
- column
-
createColumn
public static TableExViewerColumn createColumn(TableExViewerColumn group, int groupStyle, int width, String text) Create viewer's column- Parameters:
group- parent column, can't benullgroupStyle- column stylewidth- widthtext- title, can benull- Returns:
- column
-
createSchema
Create schema object- Parameters:
v8project- the V8 project, can't be null- Returns:
- schema, never null
-
getEditor
Get current dcs editor- Returns:
- dcs editor, can be null
-
getEditorActivePage
Get active dcs editor page- Returns:
- page or null if editor is null
-
copyTypeQualifiers
Copy type qualifiers- Parameters:
srcType- - source type, not nulldestType- - destination type, not null
-
createBorderComposite
public static org.eclipse.swt.widgets.Composite createBorderComposite(org.eclipse.swt.widgets.Composite parent) Creates and returns border composite. Use it to paint border around inner control.
Important: User should not change layout of returned composite.
How to use:- create border composite
- create control inside border composite
- created control will have border around it
new List(createBorderComposite(Composite parent), SWT.NONE) will create list with border around it.
This border supports dark theme (SWT.BORDER does not)- Parameters:
parent- - parent to create border composite. Cannot benull.- Returns:
- created border composite. Cannot return
null.
-