| 21 | } |
| 22 | |
| 23 | @Override |
| 24 | public List<JMenuItem> createMenuItems(IContextMenuInvocation invocation) { |
| 25 | if (availableToolFlag.contains(invocation.getInvocationContext())) { |
| 26 | ArrayList<JMenuItem> menuItemList = new ArrayList<>(); |
| 27 | JMenuItem menuItem = new JMenuItem("Do API scan"); |
| 28 | menuItem.addActionListener(new ContextMenuActionListener(invocation)); |
| 29 | menuItemList.add(menuItem); |
| 30 | return menuItemList; |
| 31 | } else { |
| 32 | return null; |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | static class ContextMenuActionListener implements ActionListener { |
| 37 | IContextMenuInvocation invocation; |