@Override public void run() { l.show(openType, visibilityType, column); } });
/** Shows the line (at the first column). * @param openType one of {@link ShowOpenType#NONE}, {@link ShowOpenType#OPEN}, * {@link ShowOpenType#REUSE} or {@link ShowOpenType#REUSE_NEW} * @param visibilityType one of {@link ShowVisibilityType#NONE}, * {@link ShowVisibilityType#FRONT} or {@link ShowVisibilityType#FOCUS} * @see #show(ShowOpenType, ShowVisibilityType, int) * @since org.openide.text 6.21 */ public void show(ShowOpenType openType, ShowVisibilityType visibilityType) { show(openType, visibilityType, 0); }
/** Shows the line (at the first column). * @param kind one of {@link #SHOW_TRY_SHOW}, {@link #SHOW_SHOW}, or {@link #SHOW_GOTO} * @see #show(int, int) */ public void show(int kind) { show(kind, 0); }
@Override public void run() { currentLine.show(Line.ShowOpenType.OPEN, Line.ShowVisibilityType.FOCUS); } });
@Override public void run() { currentLine.show(Line.ShowOpenType.OPEN, Line.ShowVisibilityType.FOCUS, column); } });
/** Shows the line (at the first column). * @param kind one of {@link #SHOW_TRY_SHOW}, {@link #SHOW_SHOW}, or {@link #SHOW_GOTO} * @see #show(int, int) */ public void show(int kind) { show(kind, 0); }
/** Shows the line (at the first column). * @param kind one of {@link #SHOW_TRY_SHOW}, {@link #SHOW_SHOW}, {@link #SHOW_GOTO}, * {@link #SHOW_REUSE} or {@link #SHOW_REUSE_NEW} * @see #show(int, int) * @deprecated Deprecated since 6.21. Use {@link #show(ShowOpenType, ShowVisibilityType)} instead. */ @Deprecated public void show(int kind) { show(kind, 0); }
@Override public void performClickAction(Document doc, int offset, HyperlinkType type) { Line ln = getLine(doc, offset); if (ln != null) { ln.show(ShowOpenType.OPEN, ShowVisibilityType.FOCUS); } else { Toolkit.getDefaultToolkit().beep(); } }
FileObject fo = null; LineCookie lc = DataObject.find(fo).getLookup().lookup(LineCookie.class); int lineNumber=42; int colNumber=43; Line line = lc.getLineSet().getOriginal(lineNumber); line.show(Line.ShowOpenType.OPEN, Line.ShowVisibilityType.FRONT, colNumber);
private static void goToSource(JSLineBreakpoint breakpoint ) { Line line = JSUtils.getLine(breakpoint); if (line != null) { line.show(Line.ShowOpenType.REUSE, Line.ShowVisibilityType.FOCUS); } }
public @Override void run() { lineCookie.getLineSet().getCurrent(line.get() - 1).show(ShowOpenType.OPEN, ShowVisibilityType.FOCUS); } });
static Line showSourceLine(String url, int lineNumber, Object timeStamp) { Line l = LineTranslations.getTranslations().getLine(url, lineNumber, timeStamp); // false = use original ln if (l == null) { ErrorManager.getDefault().log(ErrorManager.WARNING, "Show Source: Have no line for URL = " + url + ", line number = " + lineNumber); return null; } if ("true".equalsIgnoreCase(fronting) || Utilities.isWindows()) { l.show(Line.SHOW_REUSE); l.show(Line.SHOW_TOFRONT); //FIX 47825 } else { l.show(Line.SHOW_REUSE); } return l; }
/** Called when some sort of action is performed on a line. * @param ev the event describing the line */ public void outputLineAction(OutputEvent ev) { cookie.getLineSet().getCurrent(line).show(Line.SHOW_GOTO); }
private void doEDT() { if (lc != null) { // XXX opens +-1 line Line l = lc.getLineSet().getOriginal(lineNumber); l.show(Line.ShowOpenType.OPEN, Line.ShowVisibilityType.FOCUS); } }
/** * Support for bpt GoToSource action */ public void visitNextAnnotation() { DebuggerAnnotation annotation = getNextAnnotation(); if (annotation != null) { Line line = annotation.getLine(); if (line != null) { line.show(Line.ShowOpenType.OPEN, Line.ShowVisibilityType.FOCUS); } } }
@Override public void run() { javax.swing.JEditorPane[] panes = support.getOpenedPanes(); if (panes != null) { if (lineNumber >= 0 && lineNumber < support.getLineSet().getLines().size()) { support.getLineSet().getCurrent(lineNumber).show(Line.ShowOpenType.NONE, Line.ShowVisibilityType.FRONT); } org.netbeans.modules.mercurial.ui.annotate.AnnotateAction.showAnnotations(panes[0], originalFile, revision.getRevisionNumber()); } } });
public void open() { try { PositionRef pos = ed.getRange().getBegin(); int line = pos.getLine(); int column = pos.getColumn(); Line l = pos.getCloneableEditorSupport().getLineSet().getCurrent(line); l.show(Line.SHOW_GOTO, column); } catch (IOException ex) { Exceptions.printStackTrace(ex); } }
public void run () { int definitionOffset = definition.getOffset (); try { DataObject dobj = DataObject.find (fo); EditorCookie ec = dobj.getCookie (EditorCookie.class); StyledDocument doc2 = ec.openDocument (); LineCookie lc = dobj.getCookie (LineCookie.class); Line.Set lineSet = lc.getLineSet (); Line line = lineSet.getCurrent (NbDocument.findLineNumber (doc2, definitionOffset)); int column = NbDocument.findLineColumn (doc2, definitionOffset); line.show (ShowOpenType.OPEN, ShowVisibilityType.FOCUS, column); } catch (IOException ex) { ex.printStackTrace (); } } };
void show () { DataObject dataObject = NbEditorUtilities.getDataObject (document); LineCookie lineCookie = dataObject.getCookie (LineCookie.class); Line.Set lineSet = lineCookie.getLineSet (); Line line = lineSet.getCurrent (NbDocument.findLineNumber (document, item.getOffset ())); int column = NbDocument.findLineColumn (document, item.getOffset ()); line.show (ShowOpenType.OPEN, ShowVisibilityType.FOCUS, column); }
private static boolean openFileAtOffset(DataObject dataObject, int offset) throws IOException { EditorCookie ec = dataObject.getCookie(EditorCookie.class); LineCookie lc = dataObject.getCookie(LineCookie.class); if (ec != null && lc != null) { StyledDocument doc = ec.openDocument(); if (doc != null) { int lineNumber = NbDocument.findLineNumber(doc, offset); if (lineNumber != -1) { Line line = lc.getLineSet().getCurrent(lineNumber); if (line != null) { int lineOffset = NbDocument.findLineOffset(doc, lineNumber); int column = offset - lineOffset; line.show(ShowOpenType.OPEN, ShowVisibilityType.FOCUS, column); return true; } } } } return false; }