本文整理汇总了Java中com.intellij.openapi.actionSystem.ActionGroup.getChildren方法的典型用法代码示例。如果您正苦于以下问题:Java ActionGroup.getChildren方法的具体用法?Java ActionGroup.getChildren怎么用?Java ActionGroup.getChildren使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.actionSystem.ActionGroup
的用法示例。
在下文中一共展示了ActionGroup.getChildren方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getChildrenCountRecursive
import com.intellij.openapi.actionSystem.ActionGroup; //导入方法依赖的package包/类
private static int getChildrenCountRecursive(ActionGroup group) {
AnAction[] children;
if (group instanceof DefaultActionGroup) {
children = ((DefaultActionGroup) group).getChildActionsOrStubs();
}
else {
children = group.getChildren(null);
}
int count = 0;
for (AnAction child : children) {
if (child instanceof ActionGroup) {
count += getChildrenCountRecursive((ActionGroup) child);
}
else {
count++;
}
}
return count;
}
示例2: ActionPanel
import com.intellij.openapi.actionSystem.ActionGroup; //导入方法依赖的package包/类
public ActionPanel(JBTabsImpl tabs, TabInfo tabInfo, Pass<MouseEvent> pass) {
myTabs = tabs;
ActionGroup group = tabInfo.getTabLabelActions() != null ? tabInfo.getTabLabelActions() : new DefaultActionGroup();
AnAction[] children = group.getChildren(null);
final NonOpaquePanel wrapper = new NonOpaquePanel(new BorderLayout());
wrapper.add(Box.createHorizontalStrut(2), BorderLayout.WEST);
NonOpaquePanel inner = new NonOpaquePanel();
inner.setLayout(new BoxLayout(inner, BoxLayout.X_AXIS));
wrapper.add(inner, BorderLayout.CENTER);
for (AnAction each : children) {
ActionButton eachButton = new ActionButton(myTabs, tabInfo, each, tabInfo.getTabActionPlace(), pass, tabs.getTabActionsMouseDeadzone()) {
@Override
protected void repaintComponent(final Component c) {
TabLabel tabLabel = (TabLabel) SwingUtilities.getAncestorOfClass(TabLabel.class, c);
if (tabLabel != null) {
Point point = SwingUtilities.convertPoint(c, new Point(0, 0), tabLabel);
Dimension d = c.getSize();
tabLabel.repaint(point.x, point.y, d.width, d.height);
} else {
super.repaintComponent(c);
}
}
};
myButtons.add(eachButton);
InplaceButton component = eachButton.getComponent();
inner.add(component);
}
add(wrapper);
}
示例3: addToolbarActions
import com.intellij.openapi.actionSystem.ActionGroup; //导入方法依赖的package包/类
public void addToolbarActions(final DialogWrapper dialogWrapper) {
final ActionGroup group = (ActionGroup) ActionManager.getInstance().getAction("AlienCommitChangesDialog.AdditionalActions");
final AnAction[] children = group.getChildren(null);
if (children != null) {
for (AnAction anAction : children) {
super.addToolbarAction(anAction);
}
}
}
示例4: getLayoutActionsList
import com.intellij.openapi.actionSystem.ActionGroup; //导入方法依赖的package包/类
@NotNull
@Override
public AnAction[] getLayoutActionsList() {
final ActionGroup group = (ActionGroup)getLayoutActions();
return group.getChildren(null);
}
示例5: getSettingsActionsList
import com.intellij.openapi.actionSystem.ActionGroup; //导入方法依赖的package包/类
@NotNull
@Override
public AnAction[] getSettingsActionsList() {
final ActionGroup group = (ActionGroup)getSettingsActions();
return group.getChildren(null);
}