File tree 2 files changed +185
-114
lines changed
2 files changed +185
-114
lines changed Original file line number Diff line number Diff line change @@ -1120,7 +1120,11 @@ protected JMenu buildEditMenu() {
1120
1120
undoItem .addActionListener (undoAction = new UndoAction ());
1121
1121
menu .add (undoItem );
1122
1122
1123
- redoItem = newJMenuItem (_ ("Redo" ), 'Y' );
1123
+ if (!Base .isMacOS ()) {
1124
+ redoItem = newJMenuItem (_ ("Redo" ), 'Y' );
1125
+ } else {
1126
+ redoItem = newJMenuItemShift (_ ("Redo" ), 'Z' );
1127
+ }
1124
1128
redoItem .addActionListener (redoAction = new RedoAction ());
1125
1129
menu .add (redoItem );
1126
1130
@@ -1232,10 +1236,29 @@ public void actionPerformed(ActionEvent e) {
1232
1236
item .addActionListener (new ActionListener () {
1233
1237
public void actionPerformed (ActionEvent e ) {
1234
1238
if (find != null ) {
1235
- //find.find(true);
1236
- //FindReplace find = new FindReplace(Editor.this); //.show();
1237
- find .find (true );
1239
+ find .findNext ();
1240
+ }
1241
+ }
1242
+ });
1243
+ menu .add (item );
1244
+
1245
+ item = newJMenuItemShift (_ ("Find Previous" ), 'G' );
1246
+ item .addActionListener (new ActionListener () {
1247
+ public void actionPerformed (ActionEvent e ) {
1248
+ if (find != null ) {
1249
+ find .findPrevious ();
1250
+ }
1251
+ }
1252
+ });
1253
+ menu .add (item );
1254
+
1255
+ item = newJMenuItem (_ ("Use Selection For Find" ), 'E' );
1256
+ item .addActionListener (new ActionListener () {
1257
+ public void actionPerformed (ActionEvent e ) {
1258
+ if (find == null ) {
1259
+ find = new FindReplace (Editor .this );
1238
1260
}
1261
+ find .setFindText ( getSelectedText () );
1239
1262
}
1240
1263
});
1241
1264
menu .add (item );
You can’t perform that action at this time.
0 commit comments