Search in sources :

Example 1 with JPackagePopupMenu

use of jadx.gui.ui.popupmenu.JPackagePopupMenu in project jadx by skylot.

the class MainWindow method treeRightClickAction.

private void treeRightClickAction(MouseEvent e) {
    JNode obj = getJNodeUnderMouse(e);
    if (obj instanceof JPackage) {
        JPackagePopupMenu menu = new JPackagePopupMenu(this, (JPackage) obj);
        menu.show(e.getComponent(), e.getX(), e.getY());
    } else if (obj instanceof JClass || obj instanceof JField || obj instanceof JMethod) {
        JMenuItem jmi = new JMenuItem(NLS.str("popup.rename"));
        jmi.addActionListener(action -> RenameDialog.rename(this, obj));
        JPopupMenu menu = new JPopupMenu();
        menu.add(jmi);
        menu.show(e.getComponent(), e.getX(), e.getY());
    }
}
Also used : DropTarget(java.awt.dnd.DropTarget) Arrays(java.util.Arrays) Link(jadx.gui.utils.Link) AbstractCodeArea(jadx.gui.ui.codearea.AbstractCodeArea) GraphicsEnvironment(java.awt.GraphicsEnvironment) JCheckBoxMenuItem(javax.swing.JCheckBoxMenuItem) JadxSettings(jadx.gui.settings.JadxSettings) SearchDialog(jadx.gui.ui.dialog.SearchDialog) EMPTY_RUNNABLE(io.reactivex.internal.functions.Functions.EMPTY_RUNNABLE) ExportTask(jadx.gui.jobs.ExportTask) SummaryNode(jadx.gui.ui.treenodes.SummaryNode) JFileChooser(javax.swing.JFileChooser) TimerTask(java.util.TimerTask) JFrame(javax.swing.JFrame) Path(java.nio.file.Path) FileUtils(jadx.core.utils.files.FileUtils) EnumSet(java.util.EnumSet) JToolBar(javax.swing.JToolBar) Release(jadx.gui.update.data.Release) FileUtils.fileNamesToPaths(jadx.gui.utils.FileUtils.fileNamesToPaths) ToolTipManager(javax.swing.ToolTipManager) TreePath(javax.swing.tree.TreePath) StringUtils(jadx.core.utils.StringUtils) Set(java.util.Set) ContentPanel(jadx.gui.ui.panel.ContentPanel) KeyEvent(java.awt.event.KeyEvent) WindowAdapter(java.awt.event.WindowAdapter) Component(java.awt.Component) Executors(java.util.concurrent.Executors) Box(javax.swing.Box) DefaultMutableTreeNode(javax.swing.tree.DefaultMutableTreeNode) AbstractAction(javax.swing.AbstractAction) AboutDialog(jadx.gui.ui.dialog.AboutDialog) JadxProject(jadx.gui.settings.JadxProject) JPanel(javax.swing.JPanel) WindowConstants(javax.swing.WindowConstants) AbstractCodeContentPanel(jadx.gui.ui.codearea.AbstractCodeContentPanel) ActionListener(java.awt.event.ActionListener) JSplitPane(javax.swing.JSplitPane) TreeExpansionEvent(javax.swing.event.TreeExpansionEvent) TaskStatus(jadx.gui.jobs.TaskStatus) DnDConstants(java.awt.dnd.DnDConstants) Action(javax.swing.Action) KeyAdapter(java.awt.event.KeyAdapter) ArrayList(java.util.ArrayList) JumpPosition(jadx.gui.utils.JumpPosition) ImageIcon(javax.swing.ImageIcon) CacheObject(jadx.gui.utils.CacheObject) QuarkDialog(jadx.gui.plugins.quark.QuarkDialog) DefaultTreeCellRenderer(javax.swing.tree.DefaultTreeCellRenderer) JMethod(jadx.gui.treemodel.JMethod) ResourceFile(jadx.api.ResourceFile) ProgressPanel(jadx.gui.ui.panel.ProgressPanel) Files(java.nio.file.Files) TreeSelectionModel(javax.swing.tree.TreeSelectionModel) MouseEvent(java.awt.event.MouseEvent) JScrollPane(javax.swing.JScrollPane) JadxSettingsWindow(jadx.gui.settings.JadxSettingsWindow) JadxUpdate(jadx.gui.update.JadxUpdate) MenuEvent(javax.swing.event.MenuEvent) JavaNode(jadx.api.JavaNode) FontUtils(jadx.gui.utils.FontUtils) Utils(jadx.core.utils.Utils) IndexTask(jadx.gui.jobs.IndexTask) JDebuggerPanel(jadx.gui.ui.panel.JDebuggerPanel) SystemInfo(jadx.gui.utils.SystemInfo) LogViewerDialog(jadx.gui.ui.dialog.LogViewerDialog) JDialog(javax.swing.JDialog) LafManager(jadx.gui.utils.LafManager) JToggleButton(javax.swing.JToggleButton) LoggerFactory(org.slf4j.LoggerFactory) Timer(java.util.Timer) IndexService(jadx.gui.jobs.IndexService) JField(jadx.gui.treemodel.JField) Locale(java.util.Locale) ApkSignature(jadx.gui.treemodel.ApkSignature) CommentsIndex(jadx.gui.utils.search.CommentsIndex) MouseAdapter(java.awt.event.MouseAdapter) IssuesPanel(jadx.gui.ui.panel.IssuesPanel) HeadlessException(java.awt.HeadlessException) BorderLayout(java.awt.BorderLayout) JLoadableNode(jadx.gui.treemodel.JLoadableNode) DefaultTreeModel(javax.swing.tree.DefaultTreeModel) JMenuBar(javax.swing.JMenuBar) Font(java.awt.Font) IUpdateCallback(jadx.gui.update.JadxUpdate.IUpdateCallback) JMenu(javax.swing.JMenu) LogCollector(jadx.gui.utils.logs.LogCollector) Collectors(java.util.stream.Collectors) WindowEvent(java.awt.event.WindowEvent) Theme(org.fife.ui.rsyntaxtextarea.Theme) MenuListener(javax.swing.event.MenuListener) Nullable(org.jetbrains.annotations.Nullable) RenameDialog(jadx.gui.ui.dialog.RenameDialog) Dimension(java.awt.Dimension) List(java.util.List) JadxArgs(jadx.api.JadxArgs) TextSearchIndex(jadx.gui.utils.search.TextSearchIndex) Toolkit(java.awt.Toolkit) Rectangle(java.awt.Rectangle) FileNameExtensionFilter(javax.swing.filechooser.FileNameExtensionFilter) TreeNode(javax.swing.tree.TreeNode) ADBDialog(jadx.gui.ui.dialog.ADBDialog) GraphicsDevice(java.awt.GraphicsDevice) NLS(jadx.gui.utils.NLS) HashSet(java.util.HashSet) JPackagePopupMenu(jadx.gui.ui.popupmenu.JPackagePopupMenu) AWTEvent(java.awt.AWTEvent) FocusAdapter(java.awt.event.FocusAdapter) SwingUtilities(javax.swing.SwingUtilities) KeyStroke.getKeyStroke(javax.swing.KeyStroke.getKeyStroke) JMenuItem(javax.swing.JMenuItem) UiUtils(jadx.gui.utils.UiUtils) DisplayMode(java.awt.DisplayMode) BreakpointManager(jadx.gui.device.debugger.BreakpointManager) JNode(jadx.gui.treemodel.JNode) JClass(jadx.gui.treemodel.JClass) TreeWillExpandListener(javax.swing.event.TreeWillExpandListener) EditorViewState(jadx.gui.ui.codearea.EditorViewState) ExecutorService(java.util.concurrent.ExecutorService) ProcessResult(jadx.gui.jobs.ProcessResult) JPackage(jadx.gui.treemodel.JPackage) Logger(org.slf4j.Logger) DecompileTask(jadx.gui.jobs.DecompileTask) JPopupMenu(javax.swing.JPopupMenu) FileInputStream(java.io.FileInputStream) JOptionPane(javax.swing.JOptionPane) JTree(javax.swing.JTree) ActionEvent(java.awt.event.ActionEvent) JadxWrapper(jadx.gui.JadxWrapper) BackgroundExecutor(jadx.gui.jobs.BackgroundExecutor) Level(ch.qos.logback.classic.Level) JResource(jadx.gui.treemodel.JResource) FocusEvent(java.awt.event.FocusEvent) JRoot(jadx.gui.treemodel.JRoot) Collections(java.util.Collections) FileUtils.toPaths(jadx.gui.utils.FileUtils.toPaths) InputStream(java.io.InputStream) JPackagePopupMenu(jadx.gui.ui.popupmenu.JPackagePopupMenu) JField(jadx.gui.treemodel.JField) JClass(jadx.gui.treemodel.JClass) JPackage(jadx.gui.treemodel.JPackage) JNode(jadx.gui.treemodel.JNode) JMethod(jadx.gui.treemodel.JMethod) JMenuItem(javax.swing.JMenuItem) JPopupMenu(javax.swing.JPopupMenu)

Aggregations

Level (ch.qos.logback.classic.Level)1 EMPTY_RUNNABLE (io.reactivex.internal.functions.Functions.EMPTY_RUNNABLE)1 JadxArgs (jadx.api.JadxArgs)1 JavaNode (jadx.api.JavaNode)1 ResourceFile (jadx.api.ResourceFile)1 StringUtils (jadx.core.utils.StringUtils)1 Utils (jadx.core.utils.Utils)1 FileUtils (jadx.core.utils.files.FileUtils)1 JadxWrapper (jadx.gui.JadxWrapper)1 BreakpointManager (jadx.gui.device.debugger.BreakpointManager)1 BackgroundExecutor (jadx.gui.jobs.BackgroundExecutor)1 DecompileTask (jadx.gui.jobs.DecompileTask)1 ExportTask (jadx.gui.jobs.ExportTask)1 IndexService (jadx.gui.jobs.IndexService)1 IndexTask (jadx.gui.jobs.IndexTask)1 ProcessResult (jadx.gui.jobs.ProcessResult)1 TaskStatus (jadx.gui.jobs.TaskStatus)1 QuarkDialog (jadx.gui.plugins.quark.QuarkDialog)1 JadxProject (jadx.gui.settings.JadxProject)1 JadxSettings (jadx.gui.settings.JadxSettings)1