Package com._1c.g5.v8.dt.form.ui.editor
Class FormContextSwitcher
- java.lang.Object
-
- com._1c.g5.v8.dt.form.ui.editor.FormContextSwitcher
-
public class FormContextSwitcher extends Object
The context switcher of form editor
-
-
Constructor Summary
Constructors Constructor Description FormContextSwitcher(org.eclipse.ui.IActionBars actionBars, org.eclipse.ui.contexts.IContextService contextService)
Creates a new context switcher
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
bind(IGlobalActionsProvider provider)
The method activate context using the providerstatic FormContextSwitcher
create(org.eclipse.ui.part.EditorPart part)
Creates aFormContextSwitcher
forEditorPart
void
dispose()
Dispose classString
getActiveContextId()
Returns current active context id.boolean
isActive()
Checks active context existsvoid
register(org.eclipse.swt.widgets.Control ui, IGlobalActionsProvider provider)
Add global context provider.protected void
unbind(IGlobalActionsProvider provider)
The method deactivate current contextvoid
unbindAll()
The method deactivates all contexts
-
-
-
Method Detail
-
create
public static FormContextSwitcher create(org.eclipse.ui.part.EditorPart part)
Creates aFormContextSwitcher
forEditorPart
- Parameters:
part
- the part for creates a context switcher- Returns:
- a new context switcher
-
register
public void register(org.eclipse.swt.widgets.Control ui, IGlobalActionsProvider provider)
Add global context provider.- Parameters:
ui
- the control at which activation(set focus) to bind context and actionprovider
- the global action provider
-
dispose
public void dispose()
Dispose class
-
isActive
public boolean isActive()
Checks active context exists- Returns:
- return
true
if active context exists
-
getActiveContextId
public String getActiveContextId()
Returns current active context id.- Returns:
- if current context has not returns
null
, otherwise return context identifier.
-
unbindAll
public void unbindAll()
The method deactivates all contexts
-
bind
protected void bind(IGlobalActionsProvider provider)
The method activate context using the provider- Parameters:
provider
- the activation provider
-
unbind
protected void unbind(IGlobalActionsProvider provider)
The method deactivate current context- Parameters:
provider
- the deactivating provider
-
-