Example usage for com.intellij.openapi.actionSystem ActionPlaces DIFF_TOOLBAR

List of usage examples for com.intellij.openapi.actionSystem ActionPlaces DIFF_TOOLBAR

Introduction

In this page you can find the example usage for com.intellij.openapi.actionSystem ActionPlaces DIFF_TOOLBAR.

Prototype

String DIFF_TOOLBAR

To view the source code for com.intellij.openapi.actionSystem ActionPlaces DIFF_TOOLBAR.

Click Source Link

Usage

From source file:com.intellij.diff.impl.DiffRequestProcessor.java

License:Apache License

protected void buildToolbar(@Nullable List<AnAction> viewerActions) {
    ActionGroup group = collectToolbarActions(viewerActions);
    ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.DIFF_TOOLBAR, group,
            true);/*  w w w .  j av a2 s.co  m*/

    DataManager.registerDataProvider(toolbar.getComponent(), myMainPanel);
    toolbar.setTargetComponent(toolbar.getComponent());

    myToolbarPanel.setContent(toolbar.getComponent());
    for (AnAction action : group.getChildren(null)) {
        action.registerCustomShortcutSet(action.getShortcutSet(), myMainPanel);
    }
}