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

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

Introduction

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

Prototype

boolean isContentBuiltIn();

Source Link

Usage

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

License:Apache License

@Override
@NotNull//from w ww.  j av a 2s  . co 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;
}