Package com._1c.g5.v8.dt.form.ui.editor
Class FormEditorPage
- java.lang.Object
-
- org.eclipse.core.commands.common.EventManager
-
- org.eclipse.ui.part.WorkbenchPart
-
- org.eclipse.ui.part.EditorPart
-
- org.eclipse.ui.forms.editor.FormPage
-
- com._1c.g5.v8.dt.md.ui.editor.base.DtGranularEditorPage<M>
-
- com._1c.g5.v8.dt.md.ui.editor.base.DtGranularEditorSingleSectionPage<Form>
-
- com._1c.g5.v8.dt.form.ui.editor.FormEditorPage
-
- All Implemented Interfaces:
IFormEditorPage
,IDtEditor<Form>
,IDtGranularEditorPage<Form>
,IGotoSelection
,org.eclipse.core.runtime.IAdaptable
,org.eclipse.core.runtime.IExecutableExtension
,org.eclipse.ui.forms.editor.IFormPage
,org.eclipse.ui.IEditorPart
,org.eclipse.ui.ISaveablePart
,org.eclipse.ui.IShowEditorInput
,org.eclipse.ui.IWorkbenchPart
,org.eclipse.ui.IWorkbenchPart2
,org.eclipse.ui.IWorkbenchPart3
,org.eclipse.ui.part.IShowInSource
,org.eclipse.ui.part.IWorkbenchPartOrientation
public class FormEditorPage extends DtGranularEditorSingleSectionPage<Form> implements IFormEditorPage
Form editor main page.
-
-
Field Summary
Fields Modifier and Type Field Description static String
ITEMS_TOOLBAR_ID
Form items viewer toolbar id.static String
PAGE_ID
ID of this page.-
Fields inherited from class com._1c.g5.v8.dt.md.ui.editor.base.DtGranularEditorPage
activeSelection, derivedDataManagerProvider, modelManager, SECTION_ID_PATTERN
-
-
Constructor Summary
Constructors Modifier Constructor Description FormEditorPage()
Creates a new main page ofFormEditor
protected
FormEditorPage(String id, String title)
Creates a new main page ofFormEditor
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FormActionsGroup
createAttributesActionGroup(FormAttributeTreeViewer attributesViewer, MappingController controller, FormCopyPasteActionProvider copyPasteActionProvider)
protected FormAttributeTreeViewer
createAttributeTreeViewer(org.eclipse.swt.widgets.Composite parent, int style, IDataSourceInfoAssociationService associationService, IUseAlwaysAttributeService useAlwaysAttributeService, ISaveDataAttributeService saveDataAttributeService)
protected FormActionsGroup
createFormCommandActionGroup(FormTableViewer commandsViewer, MappingController controller, FormCopyPasteActionProvider copyPasteActionProvider)
protected FormCommandsTableViewer
createFormCommandsViewer(org.eclipse.swt.widgets.Composite parent, int style)
protected FormItemActionsGroup
createFormItemActionsGroup(FormCopyPasteActionProvider copyPasteActionProvider)
protected FormItemsViewer
createFormItemsViewer(org.eclipse.swt.widgets.Composite treeComposite, MappingController controller)
protected FormActionsGroup
createFormParameterActionGroup(FormTableViewer parametersViewer, FormCopyPasteActionProvider copyPasteActionProvider)
protected FormParametersTableViewer
createFormParametersViewer(org.eclipse.swt.widgets.Composite parent, int style)
protected IFormEditorStateListener
createModelRefreshContributor(IRefresher refresher)
protected void
createPageControls(org.eclipse.ui.forms.IManagedForm managedForm)
Creates the controls of this page.protected void
createStatusBar(org.eclipse.swt.widgets.Composite parent)
void
dispose()
<T> T
getAdapter(Class<T> adapter)
protected FormAttributeTreeViewer
getAttributesViewer()
IBmModel
getBmModel()
Returns the BM model instance for the form model object, opened on this page.protected FormTableViewer
getFormCommandsViewer()
protected FormTableViewer
getFormParametersViewer()
protected FormItemsViewer
getItemsViewer()
MappingController
getMappingController()
Returns the mapping model controller.Form
getModel()
Returns the form model object, opened on this page.protected String
getPageTitle()
Returns the page title.org.eclipse.swt.widgets.Shell
getShell()
Returns SWT shell.FormEditorStateSwitcher
getStateSwitcher()
Returns the swither of form editor state.protected IV8Project
getV8project()
protected IV8ProjectManager
getV8ProjectManager()
protected Collection<String>
getWaitingPartsId()
Returns parts ids array to be waited before creating control.void
initialize(org.eclipse.ui.forms.editor.FormEditor editor)
boolean
isReadOnly()
Tells whether form page is in read-only mode, i.e.void
refresh(FormEditorComponent component)
Refreshes the form editor UI component.void
setActiveComponent(FormEditorComponent component)
Sets the active component.void
setFocus()
void
setSelection(FormEditorComponent component, boolean setFocus, Object... selection)
Selects the provided objects in the provided form editor UI component.-
Methods inherited from class com._1c.g5.v8.dt.md.ui.editor.base.DtGranularEditorSingleSectionPage
createPageLayout
-
Methods inherited from class com._1c.g5.v8.dt.md.ui.editor.base.DtGranularEditorPage
activate, createFormContent, deactivate, getActiveFeature, getActiveSelection, getApiEditingContext, getDefaultFeature, getEditingContext, getEditor, getEditorInput, getEditorPageDescriptor, getEventGate, getHelpContextId, getPageTitle, getSectionID, getShowInContext, gotoSelection, init, onEventGateClosed, pathSeparetor, refresh, setActiveFeature, setActiveSelection, setDefaultFeature, showEditorInput, showEditorInput, waitDerivedData, waitDerivedData
-
Methods inherited from class org.eclipse.ui.forms.editor.FormPage
canLeaveThePage, createPartControl, doSave, doSaveAs, getId, getIndex, getManagedForm, getPartControl, getTitleImage, init, isActive, isDirty, isEditor, isSaveAsAllowed, selectReveal, setActive, setIndex
-
Methods inherited from class org.eclipse.ui.part.EditorPart
checkSite, 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, 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 com._1c.g5.v8.dt.form.ui.editor.IFormEditorPage
getEditingContext
-
Methods inherited from interface org.eclipse.ui.forms.editor.IFormPage
canLeaveThePage, getId, getIndex, getManagedForm, getPartControl, isActive, isEditor, selectReveal, setActive, setIndex
-
-
-
-
Field Detail
-
PAGE_ID
public static final String PAGE_ID
ID of this page.- See Also:
- Constant Field Values
-
ITEMS_TOOLBAR_ID
public static final String ITEMS_TOOLBAR_ID
Form items viewer toolbar id. Value is "toolbar:com._1c.g5.v8.dt.form.ui.formEditor.items".- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FormEditorPage
public FormEditorPage()
Creates a new main page ofFormEditor
-
FormEditorPage
protected FormEditorPage(String id, String title)
Creates a new main page ofFormEditor
.- Parameters:
id
- the id of this page, cannot benull
title
- the title of this page, cannot benull
-
-
Method Detail
-
initialize
public void initialize(org.eclipse.ui.forms.editor.FormEditor editor)
- Specified by:
initialize
in interfaceorg.eclipse.ui.forms.editor.IFormPage
- Overrides:
initialize
in classDtGranularEditorPage<Form>
-
setFocus
public void setFocus()
- Specified by:
setFocus
in interfaceorg.eclipse.ui.IWorkbenchPart
- Overrides:
setFocus
in classDtGranularEditorPage<Form>
-
getShell
public org.eclipse.swt.widgets.Shell getShell()
Description copied from interface:IFormEditorPage
Returns SWT shell.- Specified by:
getShell
in interfaceIFormEditorPage
- Returns:
- the SWT shell, never
null
-
isReadOnly
public boolean isReadOnly()
Description copied from interface:IFormEditorPage
Tells whether form page is in read-only mode, i.e. it is impossible to change anything for a user.- Specified by:
isReadOnly
in interfaceIFormEditorPage
- Returns:
true
if read-only mode enabled,false
otherwise
-
getBmModel
public IBmModel getBmModel()
Description copied from interface:IFormEditorPage
Returns the BM model instance for the form model object, opened on this page.- Specified by:
getBmModel
in interfaceIFormEditorPage
- Returns:
- the BM model instance, never
null
-
getModel
public Form getModel()
Description copied from interface:IFormEditorPage
Returns the form model object, opened on this page.- Specified by:
getModel
in interfaceIDtEditor<Form>
- Specified by:
getModel
in interfaceIFormEditorPage
- Overrides:
getModel
in classDtGranularEditorPage<Form>
- Returns:
- the sessioned model being edited.
-
createPageControls
protected void createPageControls(org.eclipse.ui.forms.IManagedForm managedForm)
Description copied from class:DtGranularEditorPage
Creates the controls of this page.- Specified by:
createPageControls
in classDtGranularEditorPage<Form>
- Parameters:
managedForm
- managed form that will contain the controls.
-
getAttributesViewer
protected FormAttributeTreeViewer getAttributesViewer()
-
getFormCommandsViewer
protected FormTableViewer getFormCommandsViewer()
-
getFormParametersViewer
protected FormTableViewer getFormParametersViewer()
-
createStatusBar
protected void createStatusBar(org.eclipse.swt.widgets.Composite parent)
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceorg.eclipse.ui.IWorkbenchPart
- Overrides:
dispose
in classDtGranularEditorPage<Form>
-
getAdapter
public <T> T getAdapter(Class<T> adapter)
- Specified by:
getAdapter
in interfaceorg.eclipse.core.runtime.IAdaptable
- Overrides:
getAdapter
in classorg.eclipse.ui.part.WorkbenchPart
-
getMappingController
public MappingController getMappingController()
Description copied from interface:IFormEditorPage
Returns the mapping model controller.- Specified by:
getMappingController
in interfaceIFormEditorPage
- Returns:
- the mapping controller with mapping model for the form, never
null
-
getStateSwitcher
public FormEditorStateSwitcher getStateSwitcher()
Description copied from interface:IFormEditorPage
Returns the swither of form editor state.- Specified by:
getStateSwitcher
in interfaceIFormEditorPage
- Returns:
- the form editor state switcher, never
null
-
refresh
public void refresh(FormEditorComponent component)
Description copied from interface:IFormEditorPage
Refreshes the form editor UI component.- Specified by:
refresh
in interfaceIFormEditorPage
- Parameters:
component
- the form editor UI component to refresh, cannot benull
-
setSelection
public void setSelection(FormEditorComponent component, boolean setFocus, Object... selection)
Description copied from interface:IFormEditorPage
Selects the provided objects in the provided form editor UI component.- Specified by:
setSelection
in interfaceIFormEditorPage
- Parameters:
component
- the form editor UI component to select objects in, cannot benull
setFocus
-true
if also need to set focus on the component,false
otherwiseselection
- the objects to select, cannot benull
or empty
-
setActiveComponent
public void setActiveComponent(FormEditorComponent component)
Description copied from interface:IFormEditorPage
Sets the active component.- Specified by:
setActiveComponent
in interfaceIFormEditorPage
- Parameters:
component
- the component which should be activated, cannot benull
-
getPageTitle
protected String getPageTitle()
Description copied from class:DtGranularEditorPage
Returns the page title.- Overrides:
getPageTitle
in classDtGranularEditorPage<Form>
- Returns:
- this page title, never
null
-
getWaitingPartsId
protected Collection<String> getWaitingPartsId()
Description copied from class:DtGranularEditorPage
Returns parts ids array to be waited before creating control. Override in successors.- Overrides:
getWaitingPartsId
in classDtGranularEditorPage<Form>
- Returns:
- array of parts ids
-
getItemsViewer
protected FormItemsViewer getItemsViewer()
-
createFormItemActionsGroup
protected FormItemActionsGroup createFormItemActionsGroup(FormCopyPasteActionProvider copyPasteActionProvider)
-
createModelRefreshContributor
protected IFormEditorStateListener createModelRefreshContributor(IRefresher refresher)
-
createFormItemsViewer
protected FormItemsViewer createFormItemsViewer(org.eclipse.swt.widgets.Composite treeComposite, MappingController controller)
-
createAttributeTreeViewer
protected FormAttributeTreeViewer createAttributeTreeViewer(org.eclipse.swt.widgets.Composite parent, int style, IDataSourceInfoAssociationService associationService, IUseAlwaysAttributeService useAlwaysAttributeService, ISaveDataAttributeService saveDataAttributeService)
-
createFormCommandsViewer
protected FormCommandsTableViewer createFormCommandsViewer(org.eclipse.swt.widgets.Composite parent, int style)
-
createFormParametersViewer
protected FormParametersTableViewer createFormParametersViewer(org.eclipse.swt.widgets.Composite parent, int style)
-
createFormCommandActionGroup
protected FormActionsGroup createFormCommandActionGroup(FormTableViewer commandsViewer, MappingController controller, FormCopyPasteActionProvider copyPasteActionProvider)
-
createFormParameterActionGroup
protected FormActionsGroup createFormParameterActionGroup(FormTableViewer parametersViewer, FormCopyPasteActionProvider copyPasteActionProvider)
-
createAttributesActionGroup
protected FormActionsGroup createAttributesActionGroup(FormAttributeTreeViewer attributesViewer, MappingController controller, FormCopyPasteActionProvider copyPasteActionProvider)
-
getV8project
protected IV8Project getV8project()
-
getV8ProjectManager
protected IV8ProjectManager getV8ProjectManager()
-
-