mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
Incorporated feedback from pull request.
This commit is contained in:
parent
9f9925a2ae
commit
8346970945
@ -98,7 +98,7 @@
|
||||
</group>
|
||||
<!-- DynamicActionGroup demonstrates declaring an action group without a static action declaration.
|
||||
An action is added to the group programmatically in the DynamicActionGroup implementation. The group is added
|
||||
at the top of the tools menu. -->
|
||||
last in the tools menu. -->
|
||||
<group id="org.jetbrains.tutorials.actions.DynamicActionGroup" class="org.jetbrains.tutorials.actions.DynamicActionGroup" popup="true"
|
||||
text="Dynamic ActionGroup" description="Dynamic ActionGroup Demo">
|
||||
<add-to-group group-id="ToolsMenu" anchor="last"/>
|
||||
|
@ -23,9 +23,6 @@ import javax.swing.*;
|
||||
*/
|
||||
public class SimplePopDialogAction extends AnAction {
|
||||
|
||||
// Capture the generic message icon for display in the dialog.
|
||||
private static final Icon ourIcon = Messages.getInformationIcon();
|
||||
|
||||
/**
|
||||
* This default constructor is used by the IntelliJ Platform framework to
|
||||
* instantiate this class based on plugin.xml declarations. Only needed in SimplePopDialogAction
|
||||
@ -51,7 +48,8 @@ public class SimplePopDialogAction extends AnAction {
|
||||
|
||||
/**
|
||||
* Gives the user feedback when the dynamic action menu is chosen.
|
||||
* Pops a simple message dialog.
|
||||
* Pops a simple message dialog. See the psi_demo plugin for an
|
||||
* example of how to use AnActionEvent to access Psi data.
|
||||
* @param anActionEvent Event received when the associated menu item is chosen.
|
||||
*/
|
||||
@Override
|
||||
@ -60,7 +58,7 @@ public class SimplePopDialogAction extends AnAction {
|
||||
Project currentProject = anActionEvent.getProject();
|
||||
String dlgTitle = anActionEvent.getPresentation().getDescription();
|
||||
String dlgMessage = anActionEvent.getPresentation().getText() + " Selected!";
|
||||
Messages.showMessageDialog(currentProject, dlgMessage, dlgTitle, ourIcon);
|
||||
Messages.showMessageDialog(currentProject, dlgMessage, dlgTitle, Messages.getInformationIcon());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user