update welcome menu for 2020.3.1
Signed-off-by: pengzhile <pengzhile@gmail.com>
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
package io.zhile.research.intellij.ier.action;
|
||||
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.openapi.actionSystem.ActionManager;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.DefaultActionGroup;
|
||||
import com.intellij.openapi.project.DumbAware;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.wm.ToolWindow;
|
||||
@@ -29,6 +31,11 @@ public class ResetAction extends AnAction implements DumbAware {
|
||||
|
||||
public ResetAction() {
|
||||
super(Constants.ACTION_NAME, "Reset my IDE eval information", AllIcons.General.Reset);
|
||||
|
||||
AnAction optionsGroup = ActionManager.getInstance().getAction("WelcomeScreen.Options");
|
||||
if ((optionsGroup instanceof DefaultActionGroup)) {
|
||||
((DefaultActionGroup) optionsGroup).add(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,6 +3,8 @@ package io.zhile.research.intellij.ier.listener;
|
||||
import com.intellij.ide.plugins.DynamicPluginListener;
|
||||
import com.intellij.ide.plugins.IdeaPluginDescriptor;
|
||||
import com.intellij.openapi.actionSystem.ActionManager;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.DefaultActionGroup;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import io.zhile.research.intellij.ier.helper.Constants;
|
||||
import io.zhile.research.intellij.ier.helper.NotificationHelper;
|
||||
@@ -27,6 +29,11 @@ public class PluginListener implements DynamicPluginListener {
|
||||
return;
|
||||
}
|
||||
|
||||
AnAction optionsGroup = ActionManager.getInstance().getAction("WelcomeScreen.Options");
|
||||
if ((optionsGroup instanceof DefaultActionGroup)) {
|
||||
((DefaultActionGroup) optionsGroup).remove(ActionManager.getInstance().getAction(Constants.RESET_ACTION_ID));
|
||||
}
|
||||
|
||||
Disposer.dispose(AppActivationListener.getInstance());
|
||||
Disposer.dispose(AppEventListener.getInstance());
|
||||
MainToolWindowFactory.unregisterAll();
|
||||
|
||||
Reference in New Issue
Block a user