private static void attachAllInFile(EditorCookie cook, CompileAnnotation annot) { Set<CompileAnnotation> newSet = null; synchronized (hyperlinks) { newSet = new HashSet<CompileAnnotation>(hyperlinks); } Iterator it = newSet.iterator(); while (it.hasNext()) { CompileAnnotation ann = (CompileAnnotation)it.next(); if (ann.getFile().equals(annot.getFile())) { if (ann.getLine() != -1) { Line l = cook.getLineSet().getOriginal(ann.getLine() - 1); if (! l.isDeleted()) { ann.attachAsNeeded(l); } } } } }
@Override public void run() { try { EditorCookie ed = dob.getLookup().lookup(EditorCookie.class); if (ed != null && /* not true e.g. for *_ja.properties */ file == dob.getPrimaryFile()) { if (lineNum == -1) { // OK, just open it. ed.open(); } else { ed.openDocument();//XXX getLineSet doesn't do it for you try { Line l = ed.getLineSet().getOriginal(lineNum - 1); if (!l.isDeleted()) { l.show(ShowOpenType.OPEN, ShowVisibilityType.FOCUS); } } catch (IndexOutOfBoundsException ioobe) { // Probably harmless. Bogus line number. ed.open(); } } } else { java.awt.Toolkit.getDefaultToolkit().beep(); } } catch (Exception ex2) { // XXX see above, should not be necessary to call openDocument // at all } } });
if (!l.isDeleted()) { if (columnNum != Integer.MIN_VALUE) { l.show(ShowOpenType.OPEN, ShowVisibilityType.FOCUS, columnNum);
try { Line l = ed.getLineSet().getOriginal(lineNum - 1); if (! l.isDeleted()) { l.show(Line.ShowOpenType.REUSE, Line.ShowVisibilityType.FOCUS);
if (!l.isDeleted()) { if (openTab) { l.show(Line.ShowOpenType.OPEN, Line.ShowVisibilityType.FOCUS);
if (!l.isDeleted()) { if (openTab) { l.show(Line.ShowOpenType.OPEN, Line.ShowVisibilityType.FOCUS);
try { Line l = ed.getLineSet().getOriginal(lineNum - 1); if (! l.isDeleted()) { l.show(Line.SHOW_GOTO);