File tree 1 file changed +19
-0
lines changed
app/src/cc/arduino/view/findreplace
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 37
37
import java .awt .*;
38
38
import java .awt .event .WindowAdapter ;
39
39
import java .awt .event .WindowEvent ;
40
+ import javax .swing .JPopupMenu ;
41
+ import javax .swing .Action ;
42
+ import javax .swing .text .DefaultEditorKit ;
40
43
import java .util .HashMap ;
41
44
import java .util .Map ;
42
45
@@ -194,6 +197,22 @@ private void initComponents() {
194
197
195
198
searchAllFilesBox .setText (tr ("Search all Sketch Tabs" ));
196
199
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
+
197
216
findButton .setText (tr ("Find" ));
198
217
findButton .addActionListener (new java .awt .event .ActionListener () {
199
218
public void actionPerformed (java .awt .event .ActionEvent evt ) {
You can’t perform that action at this time.
0 commit comments