本文整理汇总了Java中com.intellij.ui.content.Content.setActions方法的典型用法代码示例。如果您正苦于以下问题:Java Content.setActions方法的具体用法?Java Content.setActions怎么用?Java Content.setActions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ui.content.Content
的用法示例。
在下文中一共展示了Content.setActions方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createContent
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
@Override
@NotNull
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;
}
示例2: addAdditionalConsoleEditorActions
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
public static void addAdditionalConsoleEditorActions(final ConsoleView console, final Content consoleContent) {
final DefaultActionGroup consoleActions = new DefaultActionGroup();
for (AnAction action : console.createConsoleActions()) {
consoleActions.add(action);
}
consoleContent.setActions(consoleActions, ActionPlaces.RUNNER_TOOLBAR, console.getComponent());
}
示例3: createVariablesContent
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
private Content createVariablesContent(@NotNull XDebugSessionImpl session) {
final XVariablesView variablesView = new XVariablesView(session);
myViews.add(variablesView);
Content result = myUi.createContent(DebuggerContentInfo.VARIABLES_CONTENT, variablesView.getPanel(),
XDebuggerBundle.message("debugger.session.tab.variables.title"),
AllIcons.Debugger.Value, null);
result.setCloseable(false);
ActionGroup group = getCustomizedActionGroup(XDebuggerActions.VARIABLES_TREE_TOOLBAR_GROUP);
result.setActions(group, ActionPlaces.DEBUGGER_TOOLBAR, variablesView.getTree());
return result;
}
示例4: addAdditionalConsoleEditorActions
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
public static void addAdditionalConsoleEditorActions(final ExecutionConsole console, final Content consoleContent) {
final DefaultActionGroup consoleActions = new DefaultActionGroup();
if (console instanceof ConsoleView) {
for (AnAction action : ((ConsoleView)console).createConsoleActions()) {
consoleActions.add(action);
}
}
consoleContent.setActions(consoleActions, ActionPlaces.UNKNOWN, console.getComponent());
}