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

Java DefaultActionGroup类代码示例

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

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



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

示例1: JsonExampleExtension

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的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: HostedExtension

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的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


示例3: HelpExtension

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的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


示例4: updateActions

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的package包/类
protected ActionGroup updateActions() {
  final ActionGroup mainActionGroup = (ActionGroup) actionManager.getAction(getGroupMenu());
  if (mainActionGroup == null) {
    return new DefaultActionGroup(actionManager);
  }

  final Action[] children = mainActionGroup.getChildren(null);
  for (final Action action : children) {
    final Presentation presentation = presentationFactory.getPresentation(action);
    // pass into action properties
    presentation.putClientProperty(CURRENT_FILE_PROP, editorTab.getFile());
    presentation.putClientProperty(CURRENT_TAB_PROP, editorTab);
    presentation.putClientProperty(CURRENT_PANE_PROP, editorPartStack);
  }
  return super.updateActions();
}
 
开发者ID:eclipse,项目名称:che,代码行数:17,代码来源:EditorTabContextMenu.java


示例5: FactoryExtension

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的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


示例6: getExcludedActionIds

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的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


示例7: getActionGroupForCommand

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的package包/类
/**
 * Returns the action group which is appropriate for placing the action for executing the given
 * command. If appropriate action group doesn't exist it will be created and added to the right
 * place.
 */
private DefaultActionGroup getActionGroupForCommand(CommandImpl command) {
  String goalId = command.getGoal();
  if (isNullOrEmpty(goalId)) {
    goalId = goalRegistry.getDefaultGoal().getId();
  }

  DefaultActionGroup commandGoalPopUpGroup = goalPopUpGroups.get(goalId);

  if (commandGoalPopUpGroup == null) {
    commandGoalPopUpGroup = goalPopUpGroupFactory.create(goalId);
    actionManager.registerAction(GOAL_ACTION_GROUP_ID_PREFIX + goalId, commandGoalPopUpGroup);
    goalPopUpGroups.put(goalId, commandGoalPopUpGroup);

    commandsActionGroup.add(commandGoalPopUpGroup);
  }

  return commandGoalPopUpGroup;
}
 
开发者ID:eclipse,项目名称:che,代码行数:24,代码来源:ExecuteCommandActionManager.java


示例8: removeAction

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的package包/类
/**
 * Removes action for executing the given command and removes the appropriate action group in case
 * it's empty.
 */
private void removeAction(CommandImpl command) {
  Action commandAction = commandActions.remove(command.getName());

  if (commandAction != null) {
    removeAction(commandAction);

    // remove action from it's action group
    String goalId = command.getGoal();
    if (isNullOrEmpty(goalId)) {
      goalId = goalRegistry.getDefaultGoal().getId();
    }

    // remove action group if it's empty
    DefaultActionGroup goalPopUpGroup = goalPopUpGroups.remove(goalId);

    if (goalPopUpGroup != null) {
      goalPopUpGroup.remove(commandAction);

      if (goalPopUpGroup.getChildrenCount() == 0) {
        removeAction(goalPopUpGroup);
      }
    }
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:29,代码来源:ExecuteCommandActionManager.java


示例9: prepareActions

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的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


示例10: ContributionExtension

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的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


示例11: PythonExtension

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的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


示例12: HelpAboutExtension

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的package包/类
@Inject
public HelpAboutExtension(
    ActionManager actionManager,
    final ShowAboutAction showAboutAction,
    final RedirectToSupportAction redirectToSupportAction) {

  // Compose Help menu
  DefaultActionGroup helpGroup =
      (DefaultActionGroup) actionManager.getAction(IdeActions.GROUP_HELP);
  actionManager.registerAction("showAbout", showAboutAction);
  actionManager.registerAction("redirectToSupport", redirectToSupportAction);

  helpGroup.addSeparator();
  helpGroup.add(redirectToSupportAction);
  helpGroup.add(showAboutAction);
}
 
开发者ID:eclipse,项目名称:che,代码行数:17,代码来源:HelpAboutExtension.java


示例13: CoreExtension

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的package包/类
@Inject
  public CoreExtension(ActionManager actionManager, AboutDialogBoxAction aboutAction,
                       OpenDashboardAction openDashboardAction) {

      DefaultActionGroup wso2CloudStudioActionGroup =
              new DefaultActionGroup(CoreExtConstants.WSO2_ACTION_GROUP_NAME, true, actionManager);
      actionManager
              .registerAction(CoreExtConstants.WSO2_ACTION_GROUP_ID, wso2CloudStudioActionGroup);
      DefaultActionGroup mainMenu =
              (DefaultActionGroup) actionManager.getAction(IdeActions.GROUP_MAIN_MENU);
      mainMenu.add(wso2CloudStudioActionGroup);

      DefaultActionGroup wso2ActionGroup = (DefaultActionGroup) actionManager
              .getAction(CoreExtConstants.WSO2_ACTION_GROUP_ID);

      actionManager.registerAction(CoreExtConstants.WSO2_ABOUT_ACTION_ID, aboutAction);
      wso2ActionGroup.add(aboutAction);

      //TODO Add open dashboard action when some actions added to dashboard
      /*actionManager.registerAction(CoreExtConstants.WSO2_OPEN_DASHBOARD_ACTION_ID,
                                   openDashboardAction);
wso2ActionGroup.add(openDashboardAction);*/

  }
 
开发者ID:wso2,项目名称:cloud-dev-studio,代码行数:25,代码来源:CoreExtension.java


示例14: SqlEditorExtension

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的package包/类
@Inject
public SqlEditorExtension(final WorkspaceAgent workspaceAgent,
                          final ActionManager actionManager,
                          final SqlEditorResources sqlEditorResources,
                          final FileTypeRegistry fileTypeRegistry,
                          final EditorRegistry editorRegistry,
                          final SqlLauncherEditorProvider sqlEditorProvider,
                          final NewSqlFileAction newSqlFileAction,
                          final IconRegistry iconRegistry,
                          @Named("SQLFileType") final FileType sqlFile) {

    Log.debug(SqlEditorExtension.class, "Initialization of SQL editor extension.");

    fileTypeRegistry.registerFileType(sqlFile);
    editorRegistry.register(sqlFile, sqlEditorProvider);

    // add action for creating new SQL file in "File-New" submenu
    DefaultActionGroup newGroup = (DefaultActionGroup)actionManager.getAction(GROUP_FILE_NEW);
    newGroup.addSeparator();
    actionManager.registerAction("newSqlFileAction", newSqlFileAction);
    newGroup.add(newSqlFileAction);

    // register the sql file icon
    iconRegistry.registerIcon(new Icon("default.sqlfile.icon", "org/eclipse/che/ide/ext/datasource/client/sqleditor/sql-icon.png"));
}
 
开发者ID:codenvy-legacy,项目名称:plugin-datasource,代码行数:26,代码来源:SqlEditorExtension.java


示例15: prepareActions

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的package包/类
@Inject
private void prepareActions(NewXFileAction newXFileAction, ActionManager actionManager) {

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

  actionManager.registerAction("newFileActon", newXFileAction);
  newFileGroup.add(newXFileAction, Constraints.FIRST);
}
 
开发者ID:eclipse,项目名称:che-archetypes,代码行数:9,代码来源:SampleWizardExtension.java


示例16: configureActions

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的package包/类
@Inject
private void configureActions(
    final ActionManager actionManager, final HelloWorldAction helloWorldAction) {

  DefaultActionGroup mainContextMenuGroup =
      (DefaultActionGroup) actionManager.getAction("resourceOperation");
  DefaultActionGroup jsGroup =
      new DefaultActionGroup("JavaScript View Example", true, actionManager);
  mainContextMenuGroup.add(jsGroup);

  actionManager.registerAction(helloWorldAction.ACTION_ID, helloWorldAction);
  jsGroup.addAction(helloWorldAction);
}
 
开发者ID:eclipse,项目名称:che-archetypes,代码行数:14,代码来源:HelloWorldViewExampleExtension.java


示例17: prepareActions

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的package包/类
@Inject
private void prepareActions(SampleAction sampleAction, ActionManager actionManager) {

  DefaultActionGroup mainMenu = (DefaultActionGroup) actionManager.getAction(GROUP_MAIN_MENU);

  DefaultActionGroup sampleGroup =
      new DefaultActionGroup(SAMPLE_GROUP_MAIN_MENU, true, actionManager);
  actionManager.registerAction("sampleGroup", sampleGroup);
  mainMenu.add(sampleGroup, new Constraints(AFTER, GROUP_HELP));

  actionManager.registerAction("sayHello", sampleAction);
  sampleGroup.add(sampleAction, Constraints.FIRST);
}
 
开发者ID:eclipse,项目名称:che-archetypes,代码行数:14,代码来源:SampleMenuExtension.java


示例18: ServerServiceExtension

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的package包/类
/**
 * Constructor.
 *
 * @param actionManager the {@link ActionManager} that is used to register our actions
 * @param myAction the action that calls the example server service
 */
@Inject
public ServerServiceExtension(ActionManager actionManager, MyAction myAction) {

  actionManager.registerAction("myAction", myAction);

  DefaultActionGroup mainContextMenuGroup =
      (DefaultActionGroup) actionManager.getAction(IdeActions.GROUP_MAIN_CONTEXT_MENU);
  mainContextMenuGroup.add(myAction);
}
 
开发者ID:eclipse,项目名称:che-archetypes,代码行数:16,代码来源:ServerServiceExtension.java


示例19: process

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的package包/类
public void process() {
  Workspace workspace = appContext.getWorkspace();
  if (workspace == null || !workspace.isTemporary()) {
    return;
  }

  actionManager.registerAction("temporaryWorkspaceIndicator", temporaryWorkspaceIndicator);

  DefaultActionGroup mainToolbarGroup =
      (DefaultActionGroup) actionManager.getAction(IdeActions.GROUP_LEFT_STATUS_PANEL);
  mainToolbarGroup.add(temporaryWorkspaceIndicator, Constraints.FIRST);
  mainToolbarGroup.addSeparator();
}
 
开发者ID:codenvy,项目名称:codenvy,代码行数:14,代码来源:TemporaryWorkspaceInformer.java


示例20: ProfileExtension

import org.eclipse.che.ide.api.action.DefaultActionGroup; //导入依赖的package包/类
/** Create extension. */
@Inject
public ProfileExtension(
    ActionManager actionManager,
    RedirectToDashboardAccountAction redirectToDashboardAccountAction,
    ProfileLocalizationConstant localizationConstant) {

  actionManager.registerAction(
      localizationConstant.redirectToDashboardAccountAction(), redirectToDashboardAccountAction);
  Constraints constraint = new Constraints(Anchor.FIRST, null);
  DefaultActionGroup profileActionGroup =
      (DefaultActionGroup) actionManager.getAction(IdeActions.GROUP_PROFILE);
  profileActionGroup.add(redirectToDashboardAccountAction, constraint);
}
 
开发者ID:codenvy,项目名称:codenvy,代码行数:15,代码来源:ProfileExtension.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java AbstractRegisteredService类代码示例发布时间:2022-05-23
下一篇:
Java TextureCubeMap类代码示例发布时间: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