Java 类com.intellij.util.xml.ui.DomCollectionControl 实例源码

项目:tools-idea    文件:AddDomElementAction.java   
public void update(AnActionEvent e) {
  if (!isEnabled(e)) {
    e.getPresentation().setEnabled(false);
    return;
  }

  final AnAction[] actions = getChildren(e);
  for (final AnAction action : actions) {
    e.getPresentation().setEnabled(true);
    action.update(e);
    if (e.getPresentation().isEnabled()) {
      break;
    }
  }
  if (actions.length == 1) {
    e.getPresentation().setText(actions[0].getTemplatePresentation().getText());
  } else {
    final String actionText = getActionText(e);
    if (!actionText.endsWith("...")) {
      e.getPresentation().setText(actionText + (actions.length > 1 ? "..." : ""));
    }
  }
  e.getPresentation().setIcon(DomCollectionControl.ADD_ICON);

  super.update(e);
}
项目:consulo-xml    文件:AddDomElementAction.java   
public void update(AnActionEvent e) {
  if (!isEnabled(e)) {
    e.getPresentation().setEnabled(false);
    return;
  }

  final AnAction[] actions = getChildren(e);
  for (final AnAction action : actions) {
    e.getPresentation().setEnabled(true);
    action.update(e);
    if (e.getPresentation().isEnabled()) {
      break;
    }
  }
  if (actions.length == 1) {
    e.getPresentation().setText(actions[0].getTemplatePresentation().getText());
  } else {
    final String actionText = getActionText(e);
    if (!actionText.endsWith("...")) {
      e.getPresentation().setText(actionText + (actions.length > 1 ? "..." : ""));
    }
  }
  e.getPresentation().setIcon(DomCollectionControl.ADD_ICON);

  super.update(e);
}
项目:intellij-ce-playground    文件:AddDomElementAction.java   
@Override
public void update(AnActionEvent e) {
  if (!isEnabled(e)) {
    e.getPresentation().setEnabled(false);
    return;
  }

  final AnAction[] actions = getChildren(e);
  for (final AnAction action : actions) {
    e.getPresentation().setEnabled(true);
    action.update(e);
    if (e.getPresentation().isEnabled()) {
      break;
    }
  }
  if (actions.length == 1) {
    e.getPresentation().setText(actions[0].getTemplatePresentation().getText());
  } else {
    final String actionText = getActionText(e);
    if (!actionText.endsWith("...")) {
      e.getPresentation().setText(actionText + (actions.length > 1 ? "..." : ""));
    }
  }
  e.getPresentation().setIcon(DomCollectionControl.ADD_ICON);

  super.update(e);
}
项目:intellij-ce-playground    文件:AddDomElementAction.java   
public AddDomElementAction() {
  super(ApplicationBundle.message("action.add"), null, DomCollectionControl.ADD_ICON);
}
项目:intellij-ce-playground    文件:AddDomElementAction.java   
protected ShowPopupAction(ActionGroup group) {
  super(ApplicationBundle.message("action.add"), null, DomCollectionControl.ADD_ICON);
  myGroup = group;
  setShortcutSet(CommonActionsPanel.getCommonShortcut(CommonActionsPanel.Buttons.ADD));
}
项目:tools-idea    文件:AddDomElementAction.java   
public AddDomElementAction() {
  super(ApplicationBundle.message("action.add"), null, DomCollectionControl.ADD_ICON);
}
项目:tools-idea    文件:AddDomElementAction.java   
protected ShowPopupAction(ActionGroup group) {
  super(ApplicationBundle.message("action.add"), null, DomCollectionControl.ADD_ICON);
  myGroup = group;
  setShortcutSet(CommonActionsPanel.getCommonShortcut(CommonActionsPanel.Buttons.ADD));
}
项目:consulo-xml    文件:AddDomElementAction.java   
public AddDomElementAction() {
  super(ApplicationBundle.message("action.add"), null, DomCollectionControl.ADD_ICON);
}
项目:consulo-xml    文件:AddDomElementAction.java   
protected ShowPopupAction(ActionGroup group) {
  super(ApplicationBundle.message("action.add"), null, DomCollectionControl.ADD_ICON);
  myGroup = group;
  setShortcutSet(CommonActionsPanel.getCommonShortcut(CommonActionsPanel.Buttons.ADD));
}