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
@@ -161,6 +164,22 @@ private void initComponents() {
161
164
162
165
searchAllFilesBox .setText (tr ("Search all Sketch Tabs" ));
163
166
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
+
164
183
findButton .setText (tr ("Find" ));
165
184
findButton .addActionListener (new java .awt .event .ActionListener () {
166
185
public void actionPerformed (java .awt .event .ActionEvent evt ) {
You can’t perform that action at this time.
0 commit comments