Example #1
0
 public static void selectToMarker(String s) {
   if (s == null) return;
   s = s.trim();
   if (s.length() == 0) return;
   final Editor editor = Editor.currentEditor();
   Marker m = null;
   try {
     final int index = Integer.parseInt(s);
     final Marker[] bookmarks = Editor.getBookmarks();
     if (index >= 0 && index < bookmarks.length) m = bookmarks[index];
   } catch (NumberFormatException e) {
   }
   if (m == null) {
     MessageDialog.showMessageDialog(editor, "No such marker", "Select To Marker");
     return;
   }
   m.selectToMarker(editor);
 }
Example #2
0
 public void run() {
   Editor editor = Editor.currentEditor();
   if (v != null && v.size() > 0) {
     Editor other = editor.getOtherEditor();
     if (other != null && editor.getBuffer().isSecondary()) editor = other;
     if (!editor.getBuffer().isPrimary()) Debug.bug();
     Buffer toBeActivated = editor.openFiles(v);
     if (toBeActivated != null) {
       editor.makeNext(toBeActivated);
       editor.switchToBuffer(toBeActivated);
       if (!Editor.getEditorList().contains(editor)) Debug.bug();
       editor.updateDisplay();
     }
   }
   editor.getFrame().toFront();
   editor.requestFocus();
   Editor.restoreFocus();
 }
Example #3
0
 public static void selectToMarker() {
   selectToMarker(
       InputDialog.showInputDialog(Editor.currentEditor(), "Marker:", "Select To Marker"));
 }