Class FormItemActionsGroup
- java.lang.Object
-
- com._1c.g5.v8.dt.form.ui.editor.actionsgroup.AbstractActionsGroup
-
- com._1c.g5.v8.dt.form.ui.editor.actionsgroup.FormActionsGroup
-
- com._1c.g5.v8.dt.form.ui.editor.item.FormItemActionsGroup
-
- All Implemented Interfaces:
IGlobalActionsProvider
public class FormItemActionsGroup extends FormActionsGroup
The actions group of form items.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com._1c.g5.v8.dt.form.ui.editor.actionsgroup.FormActionsGroup
FormActionsGroup.FormAction
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.jface.action.IToolBarManager
toolBarManager
-
Fields inherited from class com._1c.g5.v8.dt.form.ui.editor.actionsgroup.AbstractActionsGroup
provider
-
-
Constructor Summary
Constructors Constructor Description FormItemActionsGroup(ISelectionProvider provider, MappingController controller, IFormEditorPage editorPage, FormCopyPasteActionProvider copyPasteActionProvider)
Creates a new actions group.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
calculateActionsState(IStructuredSelection selection)
Method for recalculation actions state, at change selection.protected List<com._1c.g5.v8.dt.form.internal.ui.service._goto.GoToItem>
calculateAvailablesGoToTtems()
This method calculate available the goto item for current selectionvoid
contributeToMenu(org.eclipse.jface.action.IMenuManager manager)
This method contribute to context menuvoid
contributeToToolbar(org.eclipse.jface.action.IToolBarManager manager)
This method contribute to toolbarvoid
dispose()
Clears allocated resources.protected org.eclipse.jface.action.IAction
getChangeResolutionAction()
Returns change resolution action.protected org.eclipse.jface.action.IAction
getChangeWysiwygViewAction()
Returns change wysiwyg view action.String
getContextId()
The id of context which provides this class.Set<org.eclipse.jface.action.IAction>
getGlobalActions()
Returns the global action for current context.protected org.eclipse.jface.action.IAction
getRotateDisplayAction()
Returns rotate display action.void
listenResolutionChanges(BiConsumer<Integer,Integer> resolutionListener, int currentWidth, int currentHeight)
Start listening of resolution changes.void
listenWysiwygViewChanges(Consumer<Boolean> viewChangeListener, boolean isCurrentViewCompact)
Start listening of WYSIWYG view changes.protected void
runAddAction()
run the add actionprotected void
runChangeVisibilityItemByType(ItemType type)
The method change item visibility by inverse current visible valueprotected void
runDeleteAction()
run the delete actionprotected void
runEditAction()
run the edit actionprotected void
runFormAction(String id)
Calls when action runprotected void
runMoveDownAction()
run the move down actionprotected void
runMoveUpAction()
run the move up actionprotected void
runPreviewAction()
The method run a preview actionprotected void
runShowCommandBarAction()
The method run a show command bar action-
Methods inherited from class com._1c.g5.v8.dt.form.ui.editor.actionsgroup.FormActionsGroup
createAddAction, createDeleteAction, createEditAction, createGoToAction, createMoveDownAction, createMoveUpAction, createShowPropertyAction, execute, getAddAction, getCopyAction, getDeleteAction, getEditAction, getEditingContext, getEditorPage, getGotoAction, getModel, getMoveDownAction, getMoveUpAction, getPasteAction, getPreviewAction, getShowPropertyAction, getV8project, isReadOnlyMode, runCopyAction, runGoToAction, runPasteAction, setSelectionAndNavigateToProperties, setV8ProjectManager
-
Methods inherited from class com._1c.g5.v8.dt.form.ui.editor.actionsgroup.AbstractActionsGroup
contributeToMenu, contributeToToolbar, getSelection, getSingleObject, isEmptySelection, isMultiSelection, refresh, selectionChanged, setSelection
-
-
-
-
Constructor Detail
-
FormItemActionsGroup
public FormItemActionsGroup(ISelectionProvider provider, MappingController controller, IFormEditorPage editorPage, FormCopyPasteActionProvider copyPasteActionProvider)
Creates a new actions group.- Parameters:
provider
- the selection providercontroller
- the mapping model controllereditorPage
- the form editor pagecopyPasteActionProvider
- the copy paste action provider
-
-
Method Detail
-
listenResolutionChanges
public void listenResolutionChanges(BiConsumer<Integer,Integer> resolutionListener, int currentWidth, int currentHeight)
Start listening of resolution changes. The listener and the current active resolution must be given to subscribe.- Parameters:
resolutionListener
- the listener to setcurrentWidth
- the current width
-
listenWysiwygViewChanges
public void listenWysiwygViewChanges(Consumer<Boolean> viewChangeListener, boolean isCurrentViewCompact)
Start listening of WYSIWYG view changes. The listener and the current active view (compact or not) must be given to subscribe.- Parameters:
viewChangeListener
- the listener to setisCurrentViewCompact
- the current view state, compact or not
-
dispose
public void dispose()
Description copied from class:AbstractActionsGroup
Clears allocated resources. Must be called explicitly.- Overrides:
dispose
in classFormActionsGroup
-
getContextId
public String getContextId()
Description copied from interface:IGlobalActionsProvider
The id of context which provides this class.- Returns:
- the context id
-
getGlobalActions
public Set<org.eclipse.jface.action.IAction> getGlobalActions()
Description copied from interface:IGlobalActionsProvider
Returns the global action for current context. This method can not returnsnull
. If provider has not global actions, is should be return empty set.- Returns:
- the global actions
- See Also:
Collections.emptySet()
-
contributeToToolbar
public void contributeToToolbar(org.eclipse.jface.action.IToolBarManager manager)
Description copied from class:AbstractActionsGroup
This method contribute to toolbar- Specified by:
contributeToToolbar
in classAbstractActionsGroup
- Parameters:
manager
- the toolbar manager
-
contributeToMenu
public void contributeToMenu(org.eclipse.jface.action.IMenuManager manager)
Description copied from class:AbstractActionsGroup
This method contribute to context menu- Specified by:
contributeToMenu
in classAbstractActionsGroup
- Parameters:
manager
- the context menu manager
-
runFormAction
protected void runFormAction(String id)
Description copied from class:FormActionsGroup
Calls when action run- Overrides:
runFormAction
in classFormActionsGroup
- Parameters:
id
- the running action id- See Also:
FormActionFactory
,ActionFactory
-
runAddAction
protected void runAddAction()
Description copied from class:FormActionsGroup
run the add action- Overrides:
runAddAction
in classFormActionsGroup
-
runEditAction
protected void runEditAction()
Description copied from class:FormActionsGroup
run the edit action- Overrides:
runEditAction
in classFormActionsGroup
-
runDeleteAction
protected void runDeleteAction()
Description copied from class:FormActionsGroup
run the delete action- Overrides:
runDeleteAction
in classFormActionsGroup
-
runMoveUpAction
protected void runMoveUpAction()
Description copied from class:FormActionsGroup
run the move up action- Overrides:
runMoveUpAction
in classFormActionsGroup
-
runMoveDownAction
protected void runMoveDownAction()
Description copied from class:FormActionsGroup
run the move down action- Overrides:
runMoveDownAction
in classFormActionsGroup
-
runPreviewAction
protected void runPreviewAction()
The method run a preview action
-
runShowCommandBarAction
protected void runShowCommandBarAction()
The method run a show command bar action
-
runChangeVisibilityItemByType
protected void runChangeVisibilityItemByType(ItemType type)
The method change item visibility by inverse current visible value- Parameters:
type
- the type by search item for change item
-
calculateAvailablesGoToTtems
protected List<com._1c.g5.v8.dt.form.internal.ui.service._goto.GoToItem> calculateAvailablesGoToTtems()
Description copied from class:FormActionsGroup
This method calculate available the goto item for current selection- Overrides:
calculateAvailablesGoToTtems
in classFormActionsGroup
- Returns:
- the available goto items. If items hot exists should return empty list.
-
calculateActionsState
protected void calculateActionsState(IStructuredSelection selection)
Description copied from class:AbstractActionsGroup
Method for recalculation actions state, at change selection. This method is called when change selection.- Specified by:
calculateActionsState
in classAbstractActionsGroup
- Parameters:
selection
- the changed selection
-
getRotateDisplayAction
protected org.eclipse.jface.action.IAction getRotateDisplayAction()
Returns rotate display action.- Returns:
- rotate display action, never
null
-
getChangeResolutionAction
protected org.eclipse.jface.action.IAction getChangeResolutionAction()
Returns change resolution action.- Returns:
- change resolution action, never
null
-
getChangeWysiwygViewAction
protected org.eclipse.jface.action.IAction getChangeWysiwygViewAction()
Returns change wysiwyg view action.- Returns:
- change wysiwyg view action, never
null
-
-