|
28 | 28 | import com.microsoft.azure.toolkit.lib.common.task.AzureTaskManager; |
29 | 29 | import com.microsoft.azuretools.azurecommons.helpers.Nullable; |
30 | 30 | import com.microsoft.azuretools.core.mvp.model.mysql.MySQLMvpModel; |
| 31 | +import com.microsoft.tooling.msservices.components.DefaultLoader; |
31 | 32 | import com.microsoft.tooling.msservices.serviceexplorer.*; |
32 | 33 | import com.microsoft.tooling.msservices.serviceexplorer.azure.AzureNodeActionPromptListener; |
33 | 34 | import lombok.Getter; |
@@ -73,7 +74,7 @@ protected void loadActions() { |
73 | 74 | addAction(new BasicActionListener(new StartAzureMySQLAction(), AzureActionEnum.START)); |
74 | 75 | addAction(new BasicActionListener(new StopAzureMySQLAction(), AzureActionEnum.STOP)); |
75 | 76 | addAction(new BasicActionListener(new RestartAzureMySQLAction(), AzureActionEnum.RESTART)); |
76 | | - addAction(new BasicActionListener(new DeleteAzureMySQLAction(), AzureActionEnum.DELETE)); |
| 77 | + addAction(AzureActionEnum.DELETE.getName(), new DeleteAzureMySQLAction()); |
77 | 78 | addAction(new BasicActionListener(new OpenInBrowserAction(), AzureActionEnum.OPEN_IN_PORTAL)); |
78 | 79 | initActions(); |
79 | 80 | } |
@@ -106,6 +107,21 @@ public DeleteAzureMySQLAction() { |
106 | 107 | String.format(ACTION_DOING + StringUtils.SPACE + MySQLModule.ACTION_PATTERN_SUFFIX, MySQLNode.this.name)); |
107 | 108 | } |
108 | 109 |
|
| 110 | + @Override |
| 111 | + public int getGroup() { |
| 112 | + return super.getGroup() + AzureActionEnum.DELETE.getGroup(); |
| 113 | + } |
| 114 | + |
| 115 | + @Override |
| 116 | + public int getPriority() { |
| 117 | + return super.getPriority() + AzureActionEnum.DELETE.getPriority(); |
| 118 | + } |
| 119 | + |
| 120 | + @Override |
| 121 | + public Icon getIcon() { |
| 122 | + return DefaultLoader.getUIHelper().loadIconByAction(AzureActionEnum.DELETE); |
| 123 | + } |
| 124 | + |
109 | 125 | @Override |
110 | 126 | protected void azureNodeAction(NodeActionEvent e) { |
111 | 127 | MySQLNode.this.serverState = SERVER_UPDATING; |
|
0 commit comments