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


Java ActionsTreeUtil.createGroup方法代码示例

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


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

示例1: readExternal

import com.intellij.openapi.keymap.impl.ui.ActionsTreeUtil; //导入方法依赖的package包/类
@Override
public void readExternal(Element element) throws InvalidDataException {
  myGroupPath = new ArrayList<String>();
  for (Object o : element.getChildren(PATH)) {
    myGroupPath.add(((Element)o).getAttributeValue(VALUE));
  }
  final String attributeValue = element.getAttributeValue(VALUE);
  if (element.getAttributeValue(IS_ACTION) != null) {
    myComponent = attributeValue;
  }
  else if (element.getAttributeValue(SEPARATOR) != null) {
    myComponent = Separator.getInstance();
  }
  else if (element.getAttributeValue(IS_GROUP) != null) {
    final AnAction action = ActionManager.getInstance().getAction(attributeValue);
    myComponent = action instanceof ActionGroup
                  ? ActionsTreeUtil.createGroup((ActionGroup)action, true, null)
                  : new Group(attributeValue, attributeValue, null);
  }
  myActionType = Integer.parseInt(element.getAttributeValue(ACTION_TYPE));
  myAbsolutePosition = Integer.parseInt(element.getAttributeValue(POSITION));
  DefaultJDOMExternalizer.readExternal(this, element);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:ActionUrl.java

示例2: readExternal

import com.intellij.openapi.keymap.impl.ui.ActionsTreeUtil; //导入方法依赖的package包/类
public void readExternal(Element element) throws InvalidDataException {
  myGroupPath = new ArrayList<String>();
  for (Object o : element.getChildren(PATH)) {
    myGroupPath.add(((Element)o).getAttributeValue(VALUE));
  }
  final String attributeValue = element.getAttributeValue(VALUE);
  if (element.getAttributeValue(IS_ACTION) != null) {
    myComponent = attributeValue;
  }
  else if (element.getAttributeValue(SEPARATOR) != null) {
    myComponent = Separator.getInstance();
  }
  else if (element.getAttributeValue(IS_GROUP) != null) {
    final AnAction action = ActionManager.getInstance().getAction(attributeValue);
    myComponent = action instanceof ActionGroup
                  ? ActionsTreeUtil.createGroup((ActionGroup)action, true, null)
                  : new Group(attributeValue, attributeValue, null);
  }
  myActionType = Integer.parseInt(element.getAttributeValue(ACTION_TYPE));
  myAbsolutePosition = Integer.parseInt(element.getAttributeValue(POSITION));
  DefaultJDOMExternalizer.readExternal(this, element);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:23,代码来源:ActionUrl.java

示例3: readExternal

import com.intellij.openapi.keymap.impl.ui.ActionsTreeUtil; //导入方法依赖的package包/类
public void readExternal(Element element) throws InvalidDataException {
  myGroupPath = new ArrayList<String>();
  for (Object o : element.getChildren(PATH)) {
    myGroupPath.add(((Element)o).getAttributeValue(VALUE));
  }
  final String attributeValue = element.getAttributeValue(VALUE);
  if (element.getAttributeValue(IS_ACTION) != null) {
    myComponent = attributeValue;
  }
  else if (element.getAttributeValue(SEPARATOR) != null) {
    myComponent = AnSeparator.getInstance();
  }
  else if (element.getAttributeValue(IS_GROUP) != null) {
    final AnAction action = ActionManager.getInstance().getAction(attributeValue);
    myComponent = action instanceof ActionGroup
                  ? ActionsTreeUtil.createGroup((ActionGroup)action, true, null)
                  : new Group(attributeValue, attributeValue, null);
  }
  myActionType = Integer.parseInt(element.getAttributeValue(ACTION_TYPE));
  myAbsolutePosition = Integer.parseInt(element.getAttributeValue(POSITION));
  DefaultJDOMExternalizer.readExternal(this, element);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:23,代码来源:ActionUrl.java

示例4: addAction

import com.intellij.openapi.keymap.impl.ui.ActionsTreeUtil; //导入方法依赖的package包/类
private static void addAction(KeymapGroup result, AnAction action, Condition<AnAction> filtered, boolean forceNonPopup) {
  if (action instanceof ActionGroup) {
    if (forceNonPopup) {
      AnAction[] actions = getActions((ActionGroup)action);
      for (AnAction childAction : actions) {
        addAction(result, childAction, filtered, true);
      }
    }
    else {
      Group subGroup = ActionsTreeUtil.createGroup((ActionGroup)action, false, filtered);
      if (subGroup.getSize() > 0) {
        result.addGroup(subGroup);
      }
    }
  }
  else if (action instanceof Separator) {
    if (result instanceof Group) {
      ((Group)result).addSeparator();
    }
  }
  else {
    if (filtered == null || filtered.value(action)) {
      String id = action instanceof ActionStub ? ((ActionStub)action).getId() : ActionManager.getInstance().getId(action);
      result.addActionId(id);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:28,代码来源:VcsKeymapExtension.java

示例5: createGroup

import com.intellij.openapi.keymap.impl.ui.ActionsTreeUtil; //导入方法依赖的package包/类
public KeymapGroup createGroup(final Condition<AnAction> filtered, final Project project) {
  KeymapGroup result = KeymapGroupFactory.getInstance().createGroup(KeyMapBundle.message("version.control.group.title"));
  ActionGroup versionControls = (ActionGroup)ActionManager.getInstance().getActionOrStub("VcsGroup");

  AnAction[] mainMenuTopGroups = versionControls instanceof DefaultActionGroup
                                 ? ((DefaultActionGroup)versionControls).getChildActionsOrStubs()
                                 : versionControls.getChildren(null);
  for (AnAction action : mainMenuTopGroups) {
    Group subGroup = ActionsTreeUtil.createGroup((ActionGroup)action, false, filtered);
    if (subGroup.getSize() > 0) {
      result.addGroup(subGroup);
    }
  }
  return result;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:16,代码来源:VcsKeymapExtension.java

示例6: addAction

import com.intellij.openapi.keymap.impl.ui.ActionsTreeUtil; //导入方法依赖的package包/类
private static void addAction(KeymapGroup result, AnAction action, Condition<AnAction> filtered, boolean forceNonPopup) {
  if (action instanceof ActionGroup) {
    if (forceNonPopup) {
      AnAction[] actions = getActions((ActionGroup)action);
      for (AnAction childAction : actions) {
        addAction(result, childAction, filtered, true);
      }
    }
    else {
      Group subGroup = ActionsTreeUtil.createGroup((ActionGroup)action, false, filtered);
      if (subGroup.getSize() > 0) {
        result.addGroup(subGroup);
      }
    }
  }
  else if (action instanceof AnSeparator) {
    if (result instanceof Group) {
      ((Group)result).addSeparator();
    }
  }
  else {
    if (filtered == null || filtered.value(action)) {
      String id = action instanceof ActionStub ? ((ActionStub)action).getId() : ActionManager.getInstance().getId(action);
      result.addActionId(id);
    }
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:28,代码来源:VcsKeymapExtension.java


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