final Object readResolve() { return support.getPositionManager(); }
final Object readResolve () { return support.getPositionManager (); }
final Object readResolve () { return support.getPositionManager (); }
/** Create a position reference for the given offset. * The position moves as the document is modified and * reacts to closing and opening of the document. * * @param offset the offset to create position at * @param bias the Position.Bias for new creating position. * @return position reference for that offset */ public final PositionRef createPositionRef(int offset, Position.Bias bias) { return new PositionRef(getPositionManager(), offset, bias); }
/** Create a position reference for the given offset. * The position moves as the document is modified and * reacts to closing and opening of the document. * * @param offset the offset to create position at * @param bias the Position.Bias for new creating position. * @return position reference for that offset */ public final PositionRef createPositionRef (int offset, Position.Bias bias) { return new PositionRef (getPositionManager (), offset, bias); }
/** Create a position reference for the given offset. * The position moves as the document is modified and * reacts to closing and opening of the document. * * @param offset the offset to create position at * @param bias the Position.Bias for new creating position. * @return position reference for that offset */ public final PositionRef createPositionRef (int offset, Position.Bias bias) { return new PositionRef (getPositionManager (), offset, bias); }
/** Creates a Line for given offset. * @param offset the begining of line * @return line that should represent the given line */ public Line createLine(int offset) { PositionRef ref = new PositionRef(support.getPositionManager(), offset, Position.Bias.Forward); return new SupportLine(support.getLookup(), 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)); }
/** 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)); }
/** Creates a Line for given offset. * @param offset the begining of line * @return line that should represent the given line */ public Line createLine (int offset) { StyledDocument doc = support.getDocument(); if (doc == null) // do nothing - document was probably closed return null; PositionRef ref = new PositionRef( support.getPositionManager (), offset, Position.Bias.Forward ); return new SupportLine (support.getLookup (), ref, support); }
/** Creates a Line for given offset. * @param offset the begining of line * @return line that should represent the given line */ public Line createLine (int offset) { StyledDocument doc = support.getDocument(); if (doc == null) // do nothing - document was probably closed return null; PositionRef ref = new PositionRef( support.getPositionManager (), offset, Position.Bias.Forward ); return new SupportLine (support.getLookup (), ref, support); }
@Override public Line.Part createPart(int column, int length) { DocumentLine.Part part = new DocumentLine.Part( this, new PositionRef( pos.getCloneableEditorSupport().getPositionManager(), pos.getOffset() + column, Position.Bias.Forward ), length ); addLinePart(part); return part; }
/** This method will be used for annotation of part of the text on the line.*/ public Line.Part createPart( int column, int length ) { DocumentLine.Part part = new DocumentLine.Part(this, new PositionRef( pos.getCloneableEditorSupport().getPositionManager (), pos.getOffset() + column, Position.Bias.Forward), length); addLinePart(part); return part; }
/** This method will be used for annotation of part of the text on the line.*/ public Line.Part createPart( int column, int length ) { DocumentLine.Part part = new DocumentLine.Part(this, new PositionRef( pos.getCloneableEditorSupport().getPositionManager (), pos.getOffset() + column, Position.Bias.Forward), length); addLinePart(part); return part; }
/** Initialization of the document. */ public void run() { // synchronized (getLock ()) { /* Remove existing listener before running the loading task * This should prevent firing of insertUpdate() during load (or reload) * which can prevent dedloks that sometimes occured during file reload. */ addRemoveDocListener(getDoc(), false); try { loadExc = null; LOCAL_LOAD_TASK.set(true); loadDocument(kit,getDoc()); } catch (IOException e) { loadExc = e; throw new DelegateIOExc(e); } finally { LOCAL_LOAD_TASK.set(null); } // opening the document, inform position manager getPositionManager().documentOpened(doc); // create new description of lines updateLineSet(true); setLastSaveTime(cesEnv().getTime().getTime()); // Start listening on changes in document addRemoveDocListener(getDoc(), true); }
getPositionManager ().documentOpened (doc);
getPositionManager ().documentOpened (doc);
pos = new PositionRef(support.getPositionManager(), lineStartOffset, Position.Bias.Forward);
support.getPositionManager(), lineStartOffset, Position.Bias.Forward );