Example usage for com.intellij.openapi.ui ComponentWithActions getToolbarPlace

List of usage examples for com.intellij.openapi.ui ComponentWithActions getToolbarPlace

Introduction

In this page you can find the example usage for com.intellij.openapi.ui ComponentWithActions getToolbarPlace.

Prototype

@Nullable
    String getToolbarPlace();

Source Link

Usage

From source file:com.intellij.execution.ui.layout.impl.RunnerLayoutUiImpl.java

License:Apache License

@Override
@NotNull// w w w .java2 s.  c  o m
public Content createContent(@NotNull final String contentId, @NotNull final ComponentWithActions withActions,
        @NotNull final String displayName, @Nullable final Icon icon, @Nullable final JComponent toFocus) {
    final Content content = getContentFactory().createContent(withActions.getComponent(), displayName, false);
    content.putUserData(CONTENT_TYPE, contentId);
    content.putUserData(ViewImpl.ID, contentId);
    content.setIcon(icon);
    if (toFocus != null) {
        content.setPreferredFocusableComponent(toFocus);
    }

    if (!withActions.isContentBuiltIn()) {
        content.setSearchComponent(withActions.getSearchComponent());
        content.setActions(withActions.getToolbarActions(), withActions.getToolbarPlace(),
                withActions.getToolbarContextComponent());
    }

    return content;
}