Package com._1c.g5.v8.dt.dcs.ui.util
Class DcsUiUtil
java.lang.Object
com._1c.g5.v8.dt.dcs.ui.util.DcsUiUtil
Вспомогательные функции наборов данных.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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- 
DcsUiUtilpublic DcsUiUtil()
 
- 
- 
Method Details- 
renameDataSetpublic static void renameDataSet(org.eclipse.swt.widgets.Shell shell, IBmEditingContext editingContext, DataCompositionSchema schema, DataSet dataSet) Переименовать набор данных- Parameters:
- shell- окно редактора
- editingContext- the BM editing context
- schema- модель скд
- dataSet- набор данных
 
- 
getTemplateNameВыделить шаблонную часть имени без цифр (например, из НаборДанных1 выделить НаборДанных)- Parameters:
- name- имя
- Returns:
- шаблонная часть
 
- 
getNextNamepublic 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 null
- items- sibling objects, can't be null
- nameFeature- name feature, can't be null
- Returns:
- name, never null
 
- 
getAliaspublic static int getAlias(org.eclipse.emf.ecore.EObject obj) Получить текущий вариант встроенного языка- Parameters:
- obj- объект модели
- Returns:
- текущий вариант
 
- 
getCurrentLanguageCodeGet code of current language- Parameters:
- v8project- the V8 project
- Returns:
- code
 
- 
getSettingsProviderGet current setting provider- Returns:
- IDcsSettingsProviderobject
 
- 
setSettingsProviderSet current settings provider- Parameters:
- settingsProvider-- IDcsSettingsProviderobject
 
- 
getActualControlContextGets 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
 
- 
setActualControlContextSets actualDataCompositionSchemaControlContextfor form dynamic list dialog- Parameters:
- actualContext- actual- DataCompositionSchemaControlContextfor form dynamic list dialog, cannot be- null
 
- 
createDropDownMenupublic 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 null
- commands- menu commands, can't be null
- Returns:
- dropdown menu button, never null
 
- 
addContextMenuToViewerpublic 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 be- null
- viewer- viewer, can't be- null
- table-- TableExviewer's table, can't be- null
- contextMenuId- context menu id, can be- null
- contextId- context id, can't be- null
 
- 
addContextMenuToViewerCreates context menu forTableExViewer,TableExTreeViewerviewer- Parameters:
- table-- TableExviewer's table, can't be- null
- contextMenuId- context menu id, can't be- null
- contextId- context id, can't be- null
 
- 
createColumnpublic static TableExViewerColumn createColumn(ColumnViewer viewer, int groupStyle, int width, String text) Create viewer's column- Parameters:
- viewer- parent viewer, can't be- null
- groupStyle- column style
- width- width
- text- title, can be- null
- Returns:
- column
 
- 
createColumnpublic static TableExViewerColumn createColumn(TableExViewerColumn group, int groupStyle, int width, String text) Create viewer's column- Parameters:
- group- parent column, can't be- null
- groupStyle- column style
- width- width
- text- title, can be- null
- Returns:
- column
 
- 
createSchemaCreate schema object- Parameters:
- v8project- the V8 project, can't be null
- Returns:
- schema, never null
 
- 
getEditorGet current dcs editor- Returns:
- dcs editor, can be null
 
- 
getEditorActivePageGet active dcs editor page- Returns:
- page or null if editor is null
 
- 
copyTypeQualifiersCopy type qualifiers- Parameters:
- srcType- - source type, not null
- destType- - destination type, not null
 
- 
createBorderCompositepublic 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 be- null.
- Returns:
- created border composite. Cannot return null.
 
 
-