use of com.intellij.openapi.actionSystem.ActionGroup in project android by JetBrains.
the class NlActionsToolbar method createToolbarComponent.
private JComponent createToolbarComponent() {
JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
// Create a layout where there are three toolbars:
// +----------------------------------------------------------------------------+
// | Normal toolbar, minus dynamic actions |
// +---------------------------------------------+------------------------------+
// | Dynamic layout actions | Zoom actions and file status |
// +---------------------------------------------+------------------------------+
ConfigurationHolder context = new NlEditorPanel.NlConfigurationHolder(mySurface);
ActionGroup configGroup = createConfigActions(context, mySurface);
ActionManager actionManager = ActionManager.getInstance();
myActionToolbar = actionManager.createActionToolbar("NlConfigToolbar", configGroup, true);
myActionToolbar.getComponent().setName("NlConfigToolbar");
myActionToolbar.setLayoutPolicy(ActionToolbar.WRAP_LAYOUT_POLICY);
JComponent actionToolbarComponent = myActionToolbar.getComponent();
actionToolbarComponent.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
panel.add(actionToolbarComponent, BorderLayout.NORTH);
final ActionToolbar layoutToolBar = actionManager.createActionToolbar("NlLayoutToolbar", myDynamicGroup, true);
layoutToolBar.getComponent().setName("NlLayoutToolbar");
layoutToolBar.setLayoutPolicy(ActionToolbar.WRAP_LAYOUT_POLICY);
JPanel bottom = new JPanel(new BorderLayout());
bottom.add(layoutToolBar.getComponent(), BorderLayout.WEST);
JPanel combined = new JPanel(new BorderLayout());
ActionToolbar zoomToolBar = actionManager.createActionToolbar("NlRhsToolbar", getRhsActions(mySurface), true);
combined.add(zoomToolBar.getComponent(), BorderLayout.WEST);
bottom.add(combined, BorderLayout.EAST);
panel.add(bottom, BorderLayout.SOUTH);
mySurface.addListener(this);
updateViewActions();
return panel;
}
use of com.intellij.openapi.actionSystem.ActionGroup in project intellij-plugins by JetBrains.
the class DartCallHierarchyBrowser method createTrees.
@Override
protected void createTrees(@NotNull Map<String, JTree> type2TreeMap) {
final ActionGroup group = (ActionGroup) ActionManager.getInstance().getAction(GROUP_DART_CALL_HIERARCHY_POPUP);
type2TreeMap.put(CALLER_TYPE, createHierarchyTree(group));
type2TreeMap.put(CALLEE_TYPE, createHierarchyTree(group));
}
use of com.intellij.openapi.actionSystem.ActionGroup in project intellij-plugins by JetBrains.
the class DartMethodHierarchyBrowser method createTrees.
@Override
protected void createTrees(@NotNull Map<String, JTree> trees) {
final JTree tree = createTree(false);
ActionGroup group = (ActionGroup) ActionManager.getInstance().getAction(GROUP_DART_METHOD_HIERARCHY_POPUP);
PopupHandler.installPopupHandler(tree, group, ActionPlaces.METHOD_HIERARCHY_VIEW_POPUP, ActionManager.getInstance());
trees.put(METHOD_TYPE, tree);
}
use of com.intellij.openapi.actionSystem.ActionGroup in project intellij-community by JetBrains.
the class EditorActionUtil method createEditorPopupHandler.
public static EditorPopupHandler createEditorPopupHandler(@NotNull final String groupId) {
return new EditorPopupHandler() {
@Override
public void invokePopup(final EditorMouseEvent event) {
if (!event.isConsumed() && event.getArea() == EditorMouseEventArea.EDITING_AREA) {
ActionGroup group = (ActionGroup) CustomActionsSchema.getInstance().getCorrectedAction(groupId);
showEditorPopup(event, group);
}
}
};
}
use of com.intellij.openapi.actionSystem.ActionGroup in project intellij-community by JetBrains.
the class ContentImpl method setActions.
@Override
public void setActions(final ActionGroup actions, String place, @Nullable JComponent contextComponent) {
final ActionGroup oldActions = myActions;
myActions = actions;
myPlace = place;
myActionsContextComponent = contextComponent;
myChangeSupport.firePropertyChange(PROP_ACTIONS, oldActions, myActions);
}
Aggregations