File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
app/src/cc/arduino/view/findreplace Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 3737import java .awt .*;
3838import java .awt .event .WindowAdapter ;
3939import java .awt .event .WindowEvent ;
40+ import javax .swing .JPopupMenu ;
41+ import javax .swing .Action ;
42+ import javax .swing .text .DefaultEditorKit ;
4043import java .util .HashMap ;
4144import java .util .Map ;
4245
@@ -194,6 +197,22 @@ private void initComponents() {
194197
195198 searchAllFilesBox .setText (tr ("Search all Sketch Tabs" ));
196199
200+ JPopupMenu menu = new JPopupMenu ();
201+ Action cut = new DefaultEditorKit .CutAction ();
202+ cut .putValue (Action .NAME , tr ("Cut" ));
203+ menu .add ( cut );
204+
205+ Action copy = new DefaultEditorKit .CopyAction ();
206+ copy .putValue (Action .NAME , tr ("Copy" ));
207+ menu .add ( copy );
208+
209+ Action paste = new DefaultEditorKit .PasteAction ();
210+ paste .putValue (Action .NAME , tr ("Paste" ));
211+ menu .add ( paste );
212+
213+ findField .setComponentPopupMenu ( menu );
214+ replaceField .setComponentPopupMenu ( menu );
215+
197216 findButton .setText (tr ("Find" ));
198217 findButton .addActionListener (new java .awt .event .ActionListener () {
199218 public void actionPerformed (java .awt .event .ActionEvent evt ) {
You can’t perform that action at this time.
0 commit comments