/** Updates the line set. * @param clear clear any cached set? * @return the set */ Line.Set updateLineSet (boolean clear) { synchronized(getLock()) { if(lineSet != null && !clear) { return lineSet; } Line.Set oldSet = lineSet; if (doc == null || documentStatus == DOCUMENT_RELOADING) { lineSet = new EditorSupportLineSet.Closed(CloneableEditorSupport.this); } else { lineSet = new EditorSupportLineSet(CloneableEditorSupport.this, doc); } return lineSet; } }
/** Find line object in the line set corresponding to original line number. * That is, finds the line in the current document which originally had the indicated line number. * If there have been modifications of that line, find one as close as possible. * * @param line number of the line * @return line object * @exception IndexOutOfBoundsException if <code>line</code> is an invalid index for the original set of lines */ public Line getOriginal (int line) throws IndexOutOfBoundsException { if (delegate != null) { return delegate.getOriginal (line); } return getCurrent (line); }
/** Find line object in the line set corresponding to current line number. * * @param line number of the line * @return line object * @exception IndexOutOfBoundsException if <code>line</code> is an invalid index for the original set of lines */ public Line getCurrent (int line) throws IndexOutOfBoundsException { PositionRef ref = new PositionRef (support.getPositionManager (), line, 0, Position.Bias.Forward); // obj can be null, sorry... org.openide.util.Lookup obj = support.getLookup (); return this.registerLine(new SupportLine(obj, ref, support)); }
/** Updates the line set. * @param clear clear any cached set? * @return the set */ Line.Set updateLineSet(boolean clear) { synchronized (getLock()) { if ((lineSet != null) && !clear) { return lineSet; } Line.Set oldSet = lineSet; if ((getDoc() == null) || (documentStatus == DOCUMENT_RELOADING)) { lineSet = new EditorSupportLineSet.Closed(CloneableEditorSupport.this); } else { lineSet = new EditorSupportLineSet(CloneableEditorSupport.this,getDoc()); } return lineSet; } }
/** Updates the line set. * @param clear clear any cached set? * @return the set */ Line.Set updateLineSet (boolean clear) { synchronized(getLock()) { if(lineSet != null && !clear) { return lineSet; } Line.Set oldSet = lineSet; if (doc == null || documentStatus == DOCUMENT_RELOADING) { lineSet = new EditorSupportLineSet.Closed(CloneableEditorSupport.this); } else { lineSet = new EditorSupportLineSet(CloneableEditorSupport.this, doc); } return lineSet; } }
/** Find line object in the line set corresponding to original line number. * That is, finds the line in the current document which originally had the indicated line number. * If there have been modifications of that line, find one as close as possible. * * @param line number of the line * @return line object * @exception IndexOutOfBoundsException if <code>line</code> is an invalid index for the original set of lines */ public Line getOriginal (int line) throws IndexOutOfBoundsException { if (delegate != null) { return delegate.getOriginal (line); } return getCurrent (line); }
/** Find line object in the line set corresponding to original line number. * That is, finds the line in the current document which originally had the indicated line number. * If there have been modifications of that line, find one as close as possible. * * @param line number of the line * @return line object * @exception IndexOutOfBoundsException if <code>line</code> is an invalid index for the original set of lines */ public Line getOriginal(int line) throws IndexOutOfBoundsException { if (delegate != null) { return delegate.getOriginal(line); } return getCurrent(line); }
/** Find line object in the line set corresponding to current line number. * * @param line number of the line * @return line object * @exception IndexOutOfBoundsException if <code>line</code> is an invalid index for the original set of lines */ public Line getCurrent(int line) throws IndexOutOfBoundsException { PositionRef ref = new PositionRef(support.getPositionManager(), line, 0, Position.Bias.Forward); // obj can be null, sorry... org.openide.util.Lookup obj = support.getLookup(); return this.registerLine(new SupportLine(obj, ref, support)); }
/** Find line object in the line set corresponding to current line number. * * @param line number of the line * @return line object * @exception IndexOutOfBoundsException if <code>line</code> is an invalid index for the original set of lines */ public Line getCurrent (int line) throws IndexOutOfBoundsException { PositionRef ref = new PositionRef (support.getPositionManager (), line, 0, Position.Bias.Forward); // obj can be null, sorry... org.openide.util.Lookup obj = support.getLookup (); return this.registerLine(new SupportLine(obj, ref, support)); }