public abstract class MultiManager extends java.lang.Object implements Controller, Addin
UPDATE_FROM_ACTION_PERFORMED, UPDATE_FROM_ACTIVE_VIEW_CHANGED, UPDATE_FROM_UNDO, UPDATE_FROM_USER_EXTENSION, UPDATE_FROM_VIEW_SELECTION_CHANGED
Constructor and Description |
---|
MultiManager() |
Modifier and Type | Method and Description |
---|---|
protected abstract DockableView |
createDockableView(Context ctx,
ViewId viewId) |
protected abstract IdeAction |
createShowAction() |
protected IdeAction |
createToggleToolbarAction()
Subclasses should override this method to return the IdeAction
that is responsible for toggling the visibility of this manager's
toolbar.
|
protected DockableView |
findOrCreateView(Context context) |
protected DockableView |
findView(ViewId viewId) |
protected java.lang.String |
getAcceleratorFile()
the name of the accelerator file to register
|
static java.util.Collection<java.lang.String> |
getClonesIDs() |
protected abstract java.lang.String |
getDefaultName()
Get the name of the default View instance managed by this manager as it
would appear in a ViewId instance.
|
protected DockableView |
getDefaultView(Context context) |
ViewId |
getDefaultViewId() |
protected abstract DockableFactory |
getDockableFactory()
Deprecated.
clients should return null and instead use a declarative "dockable-hook"
trigger hook in their extension.xml.
|
DockableView |
getLastView()
Get the last managed View to have been active.
|
DockableView |
getNewView(Context context,
ViewId viewId)
Get a new View instance rooted on the given Context and having the given
ViewId.
|
protected int |
getOrientation(ViewId viewId,
DockableView relative) |
protected DockableView |
getRelativeView(Context context,
ViewId viewId) |
IdeAction |
getShowAction()
Get the IdeAction to be associated with a menu item used for raising the
last managed View to the top of the z-order.
|
protected float |
getToggleToolbarMenuWeight() |
protected abstract java.lang.String |
getViewCategory()
Get the name of the View type managed by this manager as it would appear
in a ViewId instance.
|
protected ViewId |
getViewId(Context context) |
java.util.Collection |
getViews() |
boolean |
handleEvent(IdeAction action,
Context context)
This method is called when a user interaction with a
View
triggers the execution of a command. |
void |
initialize()
Perform any necessary initialization.
|
static boolean |
isClone(java.lang.String uniqueDockableName) |
protected boolean |
isToolbarVisible() |
protected void |
setToolbarVisible(boolean visible) |
DockableView |
showLastView(Context context)
Show the last managed View.
|
DockableView |
showView(Context context)
Show the View for the given Context, creating a new View instance as
necessary.
|
boolean |
update(IdeAction action,
Context context)
This method updates the enabled status of the specified action within the
specified context.
|
public void initialize()
initialize
in interface Addin
DockableFactory
public final IdeAction getShowAction()
public DockableView showLastView(Context context)
#getAction
public DockableView showView(Context context)
#getNewAction
public DockableView getLastView()
public DockableView getNewView(Context context, ViewId viewId)
public java.util.Collection getViews()
public ViewId getDefaultViewId()
ViewId
associated with this manager.protected abstract java.lang.String getViewCategory()
ViewId
,
getDefaultName()
protected abstract java.lang.String getDefaultName()
ViewId
,
getViewCategory()
protected java.lang.String getAcceleratorFile()
protected abstract DockableView createDockableView(Context ctx, ViewId viewId)
protected abstract IdeAction createShowAction()
@Deprecated protected abstract DockableFactory getDockableFactory()
protected IdeAction createToggleToolbarAction()
protected float getToggleToolbarMenuWeight()
protected DockableView findView(ViewId viewId)
protected DockableView findOrCreateView(Context context)
protected DockableView getRelativeView(Context context, ViewId viewId)
protected int getOrientation(ViewId viewId, DockableView relative)
protected boolean isToolbarVisible()
protected void setToolbarVisible(boolean visible)
public boolean handleEvent(IdeAction action, Context context)
Controller
View
triggers the execution of a command.handleEvent
in interface Controller
action
- action whose command is to be executed.public boolean update(IdeAction action, Context context)
Controller
update
in interface Controller
action
- action whose command is to be executed.context
- the current contextprotected DockableView getDefaultView(Context context)
public static final boolean isClone(java.lang.String uniqueDockableName)
public static final java.util.Collection<java.lang.String> getClonesIDs()