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
@@ -161,6 +164,22 @@ private void initComponents() {
161164
162165 searchAllFilesBox .setText (tr ("Search all Sketch Tabs" ));
163166
167+ JPopupMenu menu = new JPopupMenu ();
168+ Action cut = new DefaultEditorKit .CutAction ();
169+ cut .putValue (Action .NAME , tr ("Cut" ));
170+ menu .add ( cut );
171+
172+ Action copy = new DefaultEditorKit .CopyAction ();
173+ copy .putValue (Action .NAME , tr ("Copy" ));
174+ menu .add ( copy );
175+
176+ Action paste = new DefaultEditorKit .PasteAction ();
177+ paste .putValue (Action .NAME , tr ("Paste" ));
178+ menu .add ( paste );
179+
180+ findField .setComponentPopupMenu ( menu );
181+ replaceField .setComponentPopupMenu ( menu );
182+
164183 findButton .setText (tr ("Find" ));
165184 findButton .addActionListener (new java .awt .event .ActionListener () {
166185 public void actionPerformed (java .awt .event .ActionEvent evt ) {
You can’t perform that action at this time.
0 commit comments