• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ActionManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.che.ide.api.action.ActionManager的典型用法代码示例。如果您正苦于以下问题:Java ActionManager类的具体用法?Java ActionManager怎么用?Java ActionManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ActionManager类属于org.eclipse.che.ide.api.action包,在下文中一共展示了ActionManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: JsonExampleExtension

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
/**
 * Constructor.
 *
 * @param actionManager the {@link ActionManager} that is used to register our actions
 * @param helloWorldAction action to be registered
 * @param countLinesAction action to be registered
 * @param jsonExampleResources the resources that contains our icon
 * @param iconRegistry the {@link IconRegistry} that is used to register our icon
 */
@Inject
public JsonExampleExtension(
    ActionManager actionManager,
    HelloWorldAction helloWorldAction,
    CountLinesAction countLinesAction,
    JsonExampleResources jsonExampleResources,
    IconRegistry iconRegistry) {

  DefaultActionGroup mainContextMenuGroup =
      (DefaultActionGroup) actionManager.getAction("resourceOperation");
  DefaultActionGroup jsonGroup = new DefaultActionGroup("JSON Example", true, actionManager);
  mainContextMenuGroup.add(jsonGroup);

  actionManager.registerAction("jsonExample", jsonGroup);
  jsonGroup.add(countLinesAction);

  actionManager.registerAction("helloWorldAction", helloWorldAction);
  jsonGroup.add(helloWorldAction);

  iconRegistry.registerIcon(
      new Icon(JSON_EXAMPLE_CATEGORY + ".samples.category.icon", jsonExampleResources.icon()));
}
 
开发者ID:eclipse,项目名称:che-archetypes,代码行数:32,代码来源:JsonExampleExtension.java


示例2: configureActions

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
@Inject
private void configureActions(
        final ActionManager actionManager,
        final ActiveTextEditorsAction activeTextEditorsAction,
        final MultipleMethodFileIdentifier multipleMethodFileIdentifier) {
	actionManager.registerAction(ActiveTextEditorsAction.ACTION_ID, activeTextEditorsAction);

       final List<String> contentTypes = makeList("application/javascript", "text/javascript");

       // Add JS highlight and completion
	multipleMethodFileIdentifier.registerNewExtension(TextEditorsPrefix.C8O_JSCRIPT_STEP_EDITOR, contentTypes);
	multipleMethodFileIdentifier.registerNewExtension(TextEditorsPrefix.C8O_JSCRIPT_TRANSACTION_EDITOR, contentTypes);

	// For the moment, add XMl highlight for xsl files
	multipleMethodFileIdentifier.registerNewExtension("xsl", makeList("application/xml"));
}
 
开发者ID:convertigo,项目名称:convertigo-che-assembly,代码行数:17,代码来源:TextEditorsViewExtension.java


示例3: HostedExtension

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
/** Create extension. */
@Inject
public HostedExtension(
    ActionManager actionManager,
    HostedResources resources,
    HostedLocalizationConstant localizationConstant,
    HttpSessionDestroyedInformer httpSessionDestroyedInformer,
    UnstagedChangesInformer unstagedChangesInformer,
    OpenDocsAction openDocsAction,
    TemporaryWorkspaceInformer temporaryWorkspaceInformer) {
  this.localizationConstant = localizationConstant;
  httpSessionDestroyedInformer.process();
  temporaryWorkspaceInformer.process();

  resources.hostedCSS().ensureInjected();

  actionManager.registerAction("warnOnClose", unstagedChangesInformer);

  DefaultActionGroup helpGroup =
      (DefaultActionGroup) actionManager.getAction(IdeActions.GROUP_HELP);

  actionManager.registerAction(localizationConstant.actionOpenDocsTitle(), openDocsAction);
  Constraints constraint = new Constraints(Anchor.BEFORE, "showAbout");
  helpGroup.add(openDocsAction, constraint);
}
 
开发者ID:codenvy,项目名称:codenvy,代码行数:26,代码来源:HostedExtension.java


示例4: HelpExtension

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
/** Create extension. */
@Inject
public HelpExtension(
    ActionManager actionManager,
    RedirectToEngineerChatChannelAction redirectToEngineerChatChannelAction,
    CreateSupportTicketAction createSupportTicketAction,
    HelpLocalizationConstant localizationConstant,
    DtoUnmarshallerFactory dtoUnmarshallerFactory,
    HelpResources resources) {
  this.resources = resources;
  this.actionManager = actionManager;
  this.createSupportTicketAction = createSupportTicketAction;
  this.redirectToEngineerChatChannelAction = redirectToEngineerChatChannelAction;
  this.dtoUnmarshallerFactory = dtoUnmarshallerFactory;
  this.localizationConstant = localizationConstant;
  helpGroup = (DefaultActionGroup) actionManager.getAction(IdeActions.GROUP_HELP);

  init();
}
 
开发者ID:codenvy,项目名称:codenvy,代码行数:20,代码来源:HelpExtension.java


示例5: EmptyEditorsPanel

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
public EmptyEditorsPanel(
    ActionManager actionManager,
    Provider<PerspectiveManager> perspectiveManagerProvider,
    KeyBindingAgent keyBindingAgent,
    AppContext appContext,
    CoreLocalizationConstant localizationConstant,
    NewFileAction newFileAction,
    CreateProjectAction createProjectAction,
    ImportProjectAction importProjectAction) {
  this.actionManager = actionManager;
  this.perspectiveManagerProvider = perspectiveManagerProvider;
  this.keyBindingAgent = keyBindingAgent;
  this.appContext = appContext;
  this.localizationConstant = localizationConstant;

  noFiles.put("Create File...", newFileAction);
  noFiles.put("Create Project...", createProjectAction);

  noProjects.put("Import Project...", importProjectAction);
  noProjects.put("Create Project...", createProjectAction);

  presentationFactory = new PresentationFactory();

  initWidget(uiBinder.createAndBindUi(this));
}
 
开发者ID:eclipse,项目名称:che,代码行数:26,代码来源:EmptyEditorsPanel.java


示例6: EditorTabContextMenu

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
@Inject
public EditorTabContextMenu(
    @Assisted EditorTab editorTab,
    @Assisted EditorPartPresenter editorPart,
    @Assisted EditorPartStack editorPartStack,
    ActionManager actionManager,
    KeyBindingAgent keyBindingAgent,
    Provider<PerspectiveManager> managerProvider) {
  super(actionManager, keyBindingAgent, managerProvider);

  this.editorTab = editorTab;
  this.editorPart = editorPart;
  this.editorPartStack = editorPartStack;
  this.actionManager = actionManager;
}
 
开发者ID:eclipse,项目名称:che,代码行数:16,代码来源:EditorTabContextMenu.java


示例7: FactoryExtension

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
@Inject
public FactoryExtension(
    AcceptFactoryHandler acceptFactoryHandler,
    ActionManager actionManager,
    FactoryResources resources,
    CreateFactoryAction configureFactoryAction,
    ImportFromConfigAction importFromConfigAction,
    OpenWelcomePageAction openWelcomePageAction) {
  acceptFactoryHandler.process();

  resources.factoryCSS().ensureInjected();

  DefaultActionGroup projectGroup = (DefaultActionGroup) actionManager.getAction(GROUP_PROJECT);
  DefaultActionGroup workspaceGroup =
      (DefaultActionGroup) actionManager.getAction(GROUP_WORKSPACE);

  actionManager.registerAction("openWelcomePage", openWelcomePageAction);
  actionManager.registerAction("importProjectFromCodenvyConfigAction", importFromConfigAction);
  actionManager.registerAction("configureFactoryAction", configureFactoryAction);

  projectGroup.add(importFromConfigAction);
  workspaceGroup.add(configureFactoryAction);
}
 
开发者ID:eclipse,项目名称:che,代码行数:24,代码来源:FactoryExtension.java


示例8: HotKeysDialogPresenter

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
@Inject
public HotKeysDialogPresenter(
    HotKeysDialogView view,
    KeyBindingAgent keyBindingAgent,
    ActionManager actionManager,
    EditorAgent editorAgent,
    Resources resources) {
  this.view = view;
  this.keyBindingAgent = keyBindingAgent;
  this.actionManager = actionManager;
  this.editorAgent = editorAgent;
  this.resources = resources;

  categories = new HashMap<>();
  view.setDelegate(this);
}
 
开发者ID:eclipse,项目名称:che,代码行数:17,代码来源:HotKeysDialogPresenter.java


示例9: getExcludedActionIds

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
private List<String> getExcludedActionIds(ActionManager actionManager) {
  List<String> ids = new ArrayList<>();

  DefaultActionGroup editGroup =
      (DefaultActionGroup) actionManager.getAction(IdeActions.GROUP_RECENT_FILES);
  Action[] children = editGroup.getChildActionsOrStubs();
  for (Action child : children) {
    if (child instanceof Separator) {
      continue;
    }

    ids.add(actionManager.getId(child));
  }

  return unmodifiableList(ids);
}
 
开发者ID:eclipse,项目名称:che,代码行数:17,代码来源:FindActionPresenter.java


示例10: MenuBarItem

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
public MenuBarItem(
    ActionGroup group,
    ActionManager actionManager,
    Provider<PerspectiveManager> managerProvider,
    PresentationFactory presentationFactory,
    Element element,
    ActionSelectedHandler handler,
    KeyBindingAgent keyBindingAgent,
    MenuResources.Css css) {
  this.group = group;
  this.actionManager = actionManager;
  this.managerProvider = managerProvider;
  this.presentationFactory = presentationFactory;
  this.element = element;
  this.actionSelectedHandler = handler;
  this.keyBindingAgent = keyBindingAgent;
  this.css = css;
  Presentation presentation = presentationFactory.getPresentation(group);
  title = presentation.getText();
  element.setInnerText(presentation.getText());
  setEnabled(Utils.hasVisibleChildren(group, presentationFactory, actionManager));
}
 
开发者ID:eclipse,项目名称:che,代码行数:23,代码来源:MenuBarItem.java


示例11: StatusPanelGroupViewImpl

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
/** Create new {@link MainMenuViewImpl} */
@Inject
public StatusPanelGroupViewImpl(MenuResources resources, ActionManager actionManager) {
  this.resources = resources;
  this.actionManager = actionManager;

  initWidget(rootPanel);

  rootPanel.setStyleName(resources.menuCss().menuBar());
  rootPanel.addStyleName(resources.menuCss().statusPanel());

  leftPanel.addStyleName(resources.menuCss().leftPanel());
  leftPanel.getElement().getStyle().setPropertyPx("marginLeft", 1);
  rootPanel.add(leftPanel);

  centerPanel.setStyleName(resources.menuCss().leftPanel());
  rootPanel.add(centerPanel);

  rightPanel.addStyleName(resources.menuCss().rightPanel());
  rightPanel.getElement().getStyle().setPropertyPx("marginRight", 1);
  rootPanel.add(rightPanel);
}
 
开发者ID:eclipse,项目名称:che,代码行数:23,代码来源:StatusPanelGroupViewImpl.java


示例12: CommandProducerActionManager

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
@Inject
public CommandProducerActionManager(
    Set<CommandProducer> commandProducers,
    EventBus eventBus,
    ActionManager actionManager,
    CommandProducerActionFactory commandProducerActionFactory,
    Resources resources,
    ProducerMessages messages) {
  this.actionManager = actionManager;
  this.commandProducerActionFactory = commandProducerActionFactory;
  this.resources = resources;
  this.messages = messages;

  this.commandProducers = new HashSet<>();

  if (commandProducers != null) {
    this.commandProducers.addAll(commandProducers);
  }

  eventBus.addHandler(BasicIDEInitializedEvent.TYPE, e -> init());
}
 
开发者ID:eclipse,项目名称:che,代码行数:22,代码来源:CommandProducerActionManager.java


示例13: ExecuteCommandButton

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
ExecuteCommandButton(
    CommandGoal goal,
    SafeHtml icon,
    ExecuteCommandButtonItemsProvider itemsProvider,
    ToolbarMessages messages,
    ActionManager actionManager,
    KeyBindingAgent keyBindingAgent,
    @Nullable CharCodeWithModifiers keyBinding) {
  super(icon, itemsProvider);

  this.goal = goal;
  this.messages = messages;
  this.keyBinding = keyBinding;

  if (keyBinding != null) {
    actionManager.registerAction(ACTION_PREFIX + goal.getId(), new ExecuteDefaultCommandAction());
    keyBindingAgent.getGlobal().addKey(keyBinding, ACTION_PREFIX + goal.getId());
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:20,代码来源:ExecuteCommandButton.java


示例14: ExecuteCommandButtonFactory

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
@Inject
public ExecuteCommandButtonFactory(
    CommandResources resources,
    AppContext appContext,
    MenuItemsFactory menuItemsFactory,
    ToolbarMessages messages,
    RunGoal runGoal,
    DebugGoal debugGoal,
    ActionManager actionManager,
    KeyBindingAgent keyBindingAgent) {
  this.resources = resources;
  this.appContext = appContext;
  this.menuItemsFactory = menuItemsFactory;
  this.messages = messages;
  this.runGoal = runGoal;
  this.debugGoal = debugGoal;
  this.actionManager = actionManager;
  this.keyBindingAgent = keyBindingAgent;
}
 
开发者ID:eclipse,项目名称:che,代码行数:20,代码来源:ExecuteCommandButtonFactory.java


示例15: GoalPopUpGroup

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
@Inject
GoalPopUpGroup(
    @Assisted String goalId,
    ActionManager actionManager,
    CommandGoalRegistry goalRegistry,
    IconRegistry iconRegistry) {
  super(actionManager);

  this.iconRegistry = iconRegistry;
  commandGoal = goalRegistry.getGoalForId(goalId);

  setPopup(true);

  // set icon
  final SVGResource commandTypeIcon = getCommandGoalIcon();
  if (commandTypeIcon != null) {
    getTemplatePresentation().setImageElement(new SVGImage(commandTypeIcon).getElement());
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:20,代码来源:GoalPopUpGroup.java


示例16: AddTabMenu

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
@Inject
public AddTabMenu(
    ActionManager actionManager,
    KeyBindingAgent keyBindingAgent,
    Provider<PerspectiveManager> managerProvider,
    AppContext appContext,
    ProcessesPanelPresenter processesPanelPresenter,
    CoreLocalizationConstant coreLocalizationConstant,
    MachineResources machineResources,
    RuntimeInfoLocalization runtimeInfoLocalization,
    EventBus eventBus) {
  super(actionManager, keyBindingAgent, managerProvider);

  this.appContext = appContext;
  this.processesPanelPresenter = processesPanelPresenter;
  this.coreLocalizationConstant = coreLocalizationConstant;
  this.machineResources = machineResources;
  this.runtimeInfoLocalization = runtimeInfoLocalization;
  this.eventBus = eventBus;
}
 
开发者ID:eclipse,项目名称:che,代码行数:21,代码来源:AddTabMenu.java


示例17: PopupMenu

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
/**
 * Creates new popup.
 *
 * @param actionGroup action group
 * @param actionManager action manager
 * @param managerProvider manager provider
 * @param presentationFactory presentation factory
 * @param lockLayer lock layer, uses as root for attaching this popup menu
 * @param actionSelectedHandler handler for action selected event
 * @param keyBindingAgent agent for key binding
 * @param itemIdPrefix id prefix of the item
 */
public PopupMenu(
    ActionGroup actionGroup,
    ActionManager actionManager,
    Provider<PerspectiveManager> managerProvider,
    PresentationFactory presentationFactory,
    MenuLockLayer lockLayer,
    ActionSelectedHandler actionSelectedHandler,
    KeyBindingAgent keyBindingAgent,
    String itemIdPrefix) {
  this.actionManager = actionManager;
  this.managerProvider = managerProvider;

  initPopupMenu(
      actionGroup,
      presentationFactory,
      lockLayer,
      actionSelectedHandler,
      keyBindingAgent,
      itemIdPrefix);
  redraw();
}
 
开发者ID:eclipse,项目名称:che,代码行数:34,代码来源:PopupMenu.java


示例18: prepareActions

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
@Inject
private void prepareActions(
    CreateCSourceFileAction newCSourceFileAction,
    CreateCppSourceFileAction newCppSourceFileAction,
    CreateHeaderSourceFileAction newHeadSourceFileAction,
    ActionManager actionManager,
    CppResources resources,
    IconRegistry iconRegistry) {

  DefaultActionGroup newGroup = (DefaultActionGroup) actionManager.getAction(GROUP_FILE_NEW);

  actionManager.registerAction("newCFile", newCSourceFileAction);
  actionManager.registerAction("newCppFile", newCppSourceFileAction);
  actionManager.registerAction("newHFile", newHeadSourceFileAction);
  newGroup.add(newCSourceFileAction, Constraints.FIRST);
  newGroup.add(newHeadSourceFileAction, Constraints.FIRST);
  newGroup.add(newCppSourceFileAction, Constraints.FIRST);
  iconRegistry.registerIcon(
      new Icon(C_CATEGORY + ".samples.category.icon", resources.category()));
}
 
开发者ID:eclipse,项目名称:che,代码行数:21,代码来源:CppExtension.java


示例19: ContributionExtension

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
@Inject
@SuppressWarnings("unused")
public ContributionExtension(
    ContributeResources resources,
    ContributionMixinProvider contributionMixinProvider,
    KeyBindingAgent keyBinding,
    ActionManager actionManager,
    ContributePartDisplayingModeAction contributePartDisplayingModeAction) {
  resources.contributeCss().ensureInjected();

  actionManager.registerAction(
      CONTRIBUTE_PART_DISPLAYING_MODE, contributePartDisplayingModeAction);

  DefaultActionGroup toolWindowGroup =
      (DefaultActionGroup) actionManager.getAction(TOOL_WINDOWS_GROUP);
  toolWindowGroup.add(
      contributePartDisplayingModeAction, new Constraints(BEFORE, EDITOR_DISPLAYING_MODE));

  keyBinding
      .getGlobal()
      .addKey(
          new KeyBuilder().action().alt().charCode('6').build(), CONTRIBUTE_PART_DISPLAYING_MODE);
}
 
开发者ID:eclipse,项目名称:che,代码行数:24,代码来源:ContributionExtension.java


示例20: PythonExtension

import org.eclipse.che.ide.api.action.ActionManager; //导入依赖的package包/类
@Inject
public PythonExtension(
    FileTypeRegistry fileTypeRegistry,
    CreatePythonFileAction createPythonFileAction,
    ActionManager actionManager,
    PythonResources pythonResources,
    IconRegistry iconRegistry,
    @Named("PythonFileType") FileType pythonFile) {
  fileTypeRegistry.registerFileType(pythonFile);

  DefaultActionGroup newGroup = (DefaultActionGroup) actionManager.getAction(GROUP_FILE_NEW);
  actionManager.registerAction("pythonFile", createPythonFileAction);
  newGroup.add(createPythonFileAction, Constraints.FIRST);

  iconRegistry.registerIcon(
      new Icon(PYTHON_CATEGORY + ".samples.category.icon", pythonResources.category()));
}
 
开发者ID:eclipse,项目名称:che,代码行数:18,代码来源:PythonExtension.java



注:本文中的org.eclipse.che.ide.api.action.ActionManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Criterion类代码示例发布时间:2022-05-23
下一篇:
Java JsonPathExpectationsHelper类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap