当前位置: 首页>>代码示例>>Java>>正文


Java PresentationFactory.getPresentation方法代码示例

本文整理汇总了Java中com.intellij.openapi.actionSystem.impl.PresentationFactory.getPresentation方法的典型用法代码示例。如果您正苦于以下问题:Java PresentationFactory.getPresentation方法的具体用法?Java PresentationFactory.getPresentation怎么用?Java PresentationFactory.getPresentation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.actionSystem.impl.PresentationFactory的用法示例。


在下文中一共展示了PresentationFactory.getPresentation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: appendActionsFromGroup

import com.intellij.openapi.actionSystem.impl.PresentationFactory; //导入方法依赖的package包/类
private void appendActionsFromGroup(final ActionGroup group) {
  final AnAction[] actions = group.getChildren(null);
  PresentationFactory factory = new PresentationFactory();
  for (final AnAction action : actions) {
    if (action instanceof ActionGroup) {
      final ActionGroup childGroup = (ActionGroup)action;
      appendActionsFromGroup(childGroup);
    }
    else {
      Presentation presentation = factory.getPresentation(action);
      action.update(new AnActionEvent(null, DataManager.getInstance().getDataContext(myMainPanel),
                                      ActionPlaces.WELCOME_SCREEN, presentation, ActionManager.getInstance(), 0));
      if (presentation.isVisible()) {
        appendButtonForAction(action);
      }
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:DefaultWelcomeScreen.java

示例2: fillActions

import com.intellij.openapi.actionSystem.impl.PresentationFactory; //导入方法依赖的package包/类
private void fillActions(JPanel root, final ActionGroup group, boolean quickStart) {
  final AnAction[] actions = group.getChildren(null);
  PresentationFactory factory = new PresentationFactory();
  for (final AnAction action : actions) {
    if (action instanceof ActionGroup) {
      final ActionGroup childGroup = (ActionGroup)action;
      fillActions(root, childGroup, quickStart);
    }
    else {
      Presentation presentation = factory.getPresentation(action);
      action.update(new AnActionEvent(null, DataManager.getInstance().getDataContext(root),
                                      ActionPlaces.WELCOME_SCREEN, presentation, ActionManager.getInstance(), 0));
      if (presentation.isVisible()) {
        if (quickStart) {
          myQuickStartButtons.add(new DarculaQuickStartButton(action));
        } else {
          myHelpButtons.add(new DarculaHelpButton(action));
        }
      }
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:23,代码来源:DarculaWelcomeScreenForm.java

示例3: createButton

import com.intellij.openapi.actionSystem.impl.PresentationFactory; //导入方法依赖的package包/类
@NotNull
private static ActionButton createButton(@NotNull final AnAction action) {
  PresentationFactory presentationFactory = new PresentationFactory();
  Icon icon = AllIcons.Actions.AllLeft;
  Dimension size = new Dimension(icon.getIconWidth(), icon.getIconHeight());
  return new ActionButton(action, presentationFactory.getPresentation(action), MOVE_PANEL_PLACE, size);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:JBMovePanel.java

示例4: createButton

import com.intellij.openapi.actionSystem.impl.PresentationFactory; //导入方法依赖的package包/类
@Nonnull
private static ActionButton createButton(@Nonnull final AnAction action) {
  PresentationFactory presentationFactory = new PresentationFactory();
  Icon icon = AllIcons.Actions.AllLeft;
  Dimension size = new Dimension(icon.getIconWidth(), icon.getIconHeight());
  return new ActionButton(action, presentationFactory.getPresentation(action), MOVE_PANEL_PLACE, size);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:8,代码来源:JBMovePanel.java


注:本文中的com.intellij.openapi.actionSystem.impl.PresentationFactory.getPresentation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。