Skip to content

Commit

Permalink
Merge pull request #255 from midays/add_focus_mta_plugin_action
Browse files Browse the repository at this point in the history
Added abbreviation to focus the MTA plugin tab
  • Loading branch information
dymurray authored Aug 20, 2024
2 parents fec468d + 2c109ce commit 54196b2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package org.jboss.tools.intellij.windup.abbreviations.actions;

import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.openapi.wm.ToolWindowManager;

public class FocusMTATabAction extends AnAction {
@Override
public void actionPerformed(AnActionEvent e) {
Project project = e.getProject();
if (project != null) {
ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow("Migration Toolkit for Applications");
if (toolWindow != null) {
toolWindow.activate(() -> {});
}
}
}
}
5 changes: 5 additions & 0 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,10 @@
icon="AllIcons.Actions.Refresh">
</action>
</group>
<group id="org.jboss.tools.intellij.windup.abbreviations" popup="false">
<action id="FocusMTATabAction" class="org.jboss.tools.intellij.windup.abbreviations.actions.FocusMTATabAction" text="Focus MTA Tab">
<keyboard-shortcut keymap="$default" first-keystroke="ctrl shift alt M"/>
</action>
</group>
</actions>
</idea-plugin>

0 comments on commit 54196b2

Please sign in to comment.