bcv-vf/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcelist/contextmenu/impl/Open.java

49 lines
2 KiB
Java
Raw Normal View History

2021-07-27 07:26:38 +00:00
package the.bytecode.club.bytecodeviewer.gui.resourcelist.contextmenu.impl;
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
import the.bytecode.club.bytecodeviewer.gui.resourcelist.contextmenu.ContextMenuItem;
import the.bytecode.club.bytecodeviewer.gui.resourcelist.contextmenu.ContextMenuType;
import javax.swing.*;
import java.awt.event.ActionEvent;
/***************************************************************************
* Bytecode Viewer (BCV) - Java & Android Reverse Engineering Suite *
* Copyright (C) 2014 Kalen 'Konloch' Kinloch - http://bytecodeviewer.com *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
/**
* @author Konloch
* @since 7/26/2021
*/
2021-07-27 07:26:38 +00:00
public class Open extends ContextMenuItem
{
2021-07-27 07:26:38 +00:00
public Open()
{
2021-07-27 07:26:38 +00:00
super(ContextMenuType.RESOURCE, ((tree, selPath, menu) ->
{
menu.add(new AbstractAction("Open")
{
@Override
public void actionPerformed(ActionEvent e)
{
BytecodeViewer.viewer.resourcePane.openPath(selPath);
}
});
}));
}
}