Skip to content

Commit

Permalink
fix(gui): only show renaming option for JClass, JField and JMethod (PR
Browse files Browse the repository at this point in the history
  • Loading branch information
alissonlauffer committed Oct 29, 2020
1 parent e09e8e5 commit 7353790
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jadx-gui/src/main/java/jadx/gui/ui/MainWindow.java
Expand Up @@ -88,7 +88,9 @@
import jadx.gui.settings.JadxSettingsWindow;
import jadx.gui.treemodel.ApkSignature;
import jadx.gui.treemodel.JClass;
import jadx.gui.treemodel.JField;
import jadx.gui.treemodel.JLoadableNode;
import jadx.gui.treemodel.JMethod;
import jadx.gui.treemodel.JNode;
import jadx.gui.treemodel.JPackage;
import jadx.gui.treemodel.JResource;
Expand Down Expand Up @@ -614,7 +616,7 @@ private void treeRightClickAction(MouseEvent e) {
if (obj instanceof JPackage) {
JPackagePopupMenu menu = new JPackagePopupMenu(this, (JPackage) obj);
menu.show(e.getComponent(), e.getX(), e.getY());
} else if (obj != null) {
} else if (obj instanceof JClass || obj instanceof JField || obj instanceof JMethod) {
JPopupMenu menu = new JPopupMenu();
JMenuItem jmi = new JMenuItem(NLS.str("popup.rename"));
jmi.addActionListener(action -> rename(obj));
Expand Down

0 comments on commit 7353790

Please sign in to comment.