mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
Updated grouping_action document and associated images. A few tweaks to source files for doc purposes.
This commit is contained in:
parent
57637b6edb
commit
442df758f6
@ -90,7 +90,7 @@
|
||||
</group>
|
||||
<!-- CustomDefaultActionGroup demonstrates declaring an action group based on a ActionGroup class supplied by this plugin.
|
||||
This group is to be inserted atop the Editor Popup Menu. It declares one action in the group. -->
|
||||
<group id="org.jetbrains.tutorials.actions.CustomDefaultActionGroup" class="org.jetbrains.tutorials.actions.CustomDefaultActionGroup" popup="true"
|
||||
<group id="org.jetbrains.tutorials.actions.ExampleCustomDefaultActionGroup" class="org.jetbrains.tutorials.actions.CustomDefaultActionGroup" popup="true"
|
||||
text="Example Custom DefaultActionGroup" description="Custom DefaultActionGroup Demo">
|
||||
<add-to-group group-id="EditorPopupMenu" anchor="first"/>
|
||||
<action class="org.jetbrains.tutorials.actions.SimplePopDialogAction" id="org.jetbrains.tutorials.actions.CustomGroupedAction"
|
||||
|
@ -29,7 +29,7 @@ public class CustomDefaultActionGroup extends DefaultActionGroup {
|
||||
// Enable/disable depending on whether user is editing
|
||||
Editor editor = event.getData(CommonDataKeys.EDITOR);
|
||||
event.getPresentation().setEnabled(editor != null);
|
||||
// Always make visible, even when disabled. Helps to demonstrate the placement.
|
||||
// Always make visible.
|
||||
event.getPresentation().setVisible(true);
|
||||
// Take this opportunity to set an icon for the menu entry.
|
||||
event.getPresentation().setIcon(AllIcons.General.Error);
|
||||
|
@ -32,7 +32,7 @@ public class DynamicActionGroup extends ActionGroup {
|
||||
@Override
|
||||
public AnAction[] getChildren(AnActionEvent anActionEvent) {
|
||||
return new AnAction[]{ new SimplePopDialogAction("Action Added at Runtime",
|
||||
"Dynamic Group Action Demo",
|
||||
"Dynamic Action Demo",
|
||||
null)
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user