File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212import javax .swing .JMenu ;
1313import javax .swing .JMenuItem ;
1414import javax .swing .JTabbedPane ;
15+ import javax .swing .SwingUtilities ;
1516
1617import burp .api .montoya .MontoyaApi ;
1718import burp .api .montoya .ui .contextmenu .ContextMenuEvent ;
@@ -105,7 +106,11 @@ private void highlightExtensionName() {
105106
106107 @ Override
107108 public void run () {
108- resetHighlighting ();
109+ SwingUtilities .invokeLater (new Runnable () {
110+ public void run (){
111+ resetHighlighting ();
112+ }
113+ });
109114 }
110115
111116 };
Original file line number Diff line number Diff line change @@ -105,6 +105,8 @@ public class RecipePanel extends JPanel implements ChangeListener {
105105 private static ImageIcon plusIcon = new ImageIcon (Operation .class .getResource ("/plus.png" ));
106106 private static ImageIcon minusIcon = new ImageIcon (Operation .class .getResource ("/minus.png" ));
107107
108+ private static boolean filterDialogHotKeyRegistered = false ;
109+
108110 private JButton filters = new JButton ("Filter" );
109111
110112 private JButton addLaneButton = new JButton ();
@@ -249,10 +251,13 @@ public void actionPerformed(ActionEvent e) {
249251 }
250252 });
251253
252- HotKey hotKey = HotKey .hotKey ("Open Filter Dialog" , "Ctrl+Shift+F" );
253- HotKeyHandler handler = event -> filters .doClick ();
254- BurpUtils .getInstance ().getApi ().userInterface ().registerHotKeyHandler (hotKey , handler );
255- filters .setToolTipText ("Hotkey from within a message editor: Ctrl + Shift + F" );
254+ if (!RecipePanel .filterDialogHotKeyRegistered ){
255+ HotKey hotKey = HotKey .hotKey ("Open Filter Dialog" , "Ctrl+Shift+F" );
256+ HotKeyHandler handler = event -> filters .doClick ();
257+ BurpUtils .getInstance ().getApi ().userInterface ().registerHotKeyHandler (hotKey , handler );
258+ filters .setToolTipText ("Hotkey from within a message editor: Ctrl + Shift + F" );
259+ RecipePanel .filterDialogHotKeyRegistered = true ;
260+ }
256261
257262 bakeButton .setEnabled (!autoBake );
258263 controlsPanel .add (bakeButton );
You can’t perform that action at this time.
0 commit comments