/** Adds the position to this manager. */ Kind addPosition(final PositionRef pos) { Kind kind; /* pre-33165 synchronized(this) { head.next = new ChainItem(pos, queue, head.next); kind = (doc == null ? pos.kind : pos.kind.toMemory(pos.insertAfter)); } */ kind = (Kind)new DocumentRenderer(this, DocumentRenderer.ADD_POSITION, pos).renderToObject(); checkQueue(); return kind; }
/** Adds the position to this manager. */ Kind addPosition(final PositionRef pos) { Kind kind; /* pre-33165 synchronized(this) { head.next = new ChainItem(pos, queue, head.next); kind = (doc == null ? pos.kind : pos.kind.toMemory(pos.insertAfter)); } */ kind = (Kind)new DocumentRenderer(this, DocumentRenderer.ADD_POSITION, pos).renderToObject(); checkQueue(); return kind; }
/** Converts the kind to representation in memory */ public PositionKind toMemory (boolean insertAfter) { /* pre-33165 // try to find the right position Position p; try { p = NbDocument.createPosition (doc, NbDocument.findLineOffset (doc, line) + column, insertAfter ? Position.Bias.Forward : Position.Bias.Backward); } catch (BadLocationException e) { p = doc.getEndPosition (); } */ Position p = (Position)new DocumentRenderer(mgr, DocumentRenderer.LINE_KIND_TO_MEMORY, this, line, column, insertAfter).renderToObject(); return new PositionKind (p, mgr); }
/** Converts the kind to representation in memory */ public PositionKind toMemory (boolean insertAfter) { /* pre-33165 // try to find the right position Position p; try { p = NbDocument.createPosition (doc, getOffset (), insertAfter ? Position.Bias.Forward : Position.Bias.Backward); } catch (BadLocationException e) { p = doc.getEndPosition (); } return new PositionKind (p); */ return (PositionKind)new DocumentRenderer(mgr, DocumentRenderer.KIND_TO_MEMORY, this, insertAfter).renderToObject(); }
/** Converts the kind to representation in memory */ public PositionKind toMemory (boolean insertAfter) { /* pre-33165 // try to find the right position Position p; try { p = NbDocument.createPosition (doc, getOffset (), insertAfter ? Position.Bias.Forward : Position.Bias.Backward); } catch (BadLocationException e) { p = doc.getEndPosition (); } return new PositionKind (p); */ return (PositionKind)new DocumentRenderer(mgr, DocumentRenderer.KIND_TO_MEMORY, this, insertAfter).renderToObject(); }
/** Adds the position to this manager. */ Kind addPosition(final PositionRef pos) { Kind kind; /* pre-33165 synchronized(this) { head.next = new ChainItem(pos, queue, head.next); kind = (doc == null ? pos.kind : pos.kind.toMemory(pos.insertAfter)); } */ kind = (Kind) new DocumentRenderer(this, DocumentRenderer.ADD_POSITION, pos).renderToObject(); checkQueue(); return kind; }
/** Converts the kind to representation in memory */ public PositionKind toMemory (boolean insertAfter) { /* pre-33165 // try to find the right position Position p; try { p = NbDocument.createPosition (doc, NbDocument.findLineOffset (doc, line) + column, insertAfter ? Position.Bias.Forward : Position.Bias.Backward); } catch (BadLocationException e) { p = doc.getEndPosition (); } */ Position p = (Position)new DocumentRenderer(mgr, DocumentRenderer.LINE_KIND_TO_MEMORY, this, line, column, insertAfter).renderToObject(); return new PositionKind (p, mgr); }
/** Converts the kind to representation in memory */ public PositionKind toMemory(boolean insertAfter) { /* pre-33165 // try to find the right position Position p; try { p = NbDocument.createPosition (doc, getOffset (), insertAfter ? Position.Bias.Forward : Position.Bias.Backward); } catch (BadLocationException e) { p = doc.getEndPosition (); } return new PositionKind (p); */ return (PositionKind) new DocumentRenderer(mgr, DocumentRenderer.KIND_TO_MEMORY, this, insertAfter).renderToObject(); }
/** Get the line number */ public int getLine() throws IOException { // pre-33165 return NbDocument.findLineNumber(getCloneableEditorSupport().openDocument(), offset); mgr.getCloneableEditorSupport().openDocument(); // make sure document is fully read return new DocumentRenderer(mgr, DocumentRenderer.OFFSET_KIND_GET_LINE, this, offset).renderToIntIOE(); }
/** Get the column number */ public int getColumn() { // pre-33165 return NbDocument.findLineColumn(doc, getOffset()); return new DocumentRenderer(mgr, DocumentRenderer.POSITION_KIND_GET_COLUMN, this).renderToInt(); }
/** Get the line number */ public int getLine() { // pre-33165 return NbDocument.findLineNumber(doc, getOffset()); return new DocumentRenderer(mgr, DocumentRenderer.POSITION_KIND_GET_LINE, this).renderToInt(); }
/** Get the column number */ public int getColumn() { // pre-33165 return NbDocument.findLineColumn(doc, getOffset()); return new DocumentRenderer(mgr, DocumentRenderer.POSITION_KIND_GET_COLUMN, this).renderToInt(); }
/** Get the line number */ public int getLine() { // pre-33165 return NbDocument.findLineNumber(doc, getOffset()); return new DocumentRenderer(mgr, DocumentRenderer.POSITION_KIND_GET_LINE, this).renderToInt(); }
/** Get the column number */ public int getColumn() throws IOException { // pre-33165 return NbDocument.findLineColumn (getCloneableEditorSupport().openDocument(), offset); mgr.getCloneableEditorSupport().openDocument(); // make sure document fully read return new DocumentRenderer(mgr, DocumentRenderer.OFFSET_KIND_GET_COLUMN, this, offset).renderToIntIOE(); }
/** Get the line number */ public int getLine() throws IOException { // pre-33165 return NbDocument.findLineNumber(getCloneableEditorSupport().openDocument(), offset); mgr.getCloneableEditorSupport().openDocument(); // make sure document is fully read return new DocumentRenderer(mgr, DocumentRenderer.OFFSET_KIND_GET_LINE, this, offset).renderToIntIOE(); }
/** Get the column number */ public int getColumn() { // pre-33165 return NbDocument.findLineColumn(doc, getOffset()); return new DocumentRenderer(mgr, DocumentRenderer.POSITION_KIND_GET_COLUMN, this).renderToInt(); }
/** Get the line number */ public int getLine() throws IOException { // pre-33165 return NbDocument.findLineNumber(getCloneableEditorSupport().openDocument(), offset); mgr.getCloneableEditorSupport().openDocument(); // make sure document is fully read return new DocumentRenderer(mgr, DocumentRenderer.OFFSET_KIND_GET_LINE, this, offset).renderToIntIOE(); }
/** Get the line number */ public int getLine() { // pre-33165 return NbDocument.findLineNumber(doc, getOffset()); return new DocumentRenderer(mgr, DocumentRenderer.POSITION_KIND_GET_LINE, this).renderToInt(); }
/** Get the column number */ public int getColumn() throws IOException { // pre-33165 return NbDocument.findLineColumn (getCloneableEditorSupport().openDocument(), offset); mgr.getCloneableEditorSupport().openDocument(); // make sure document fully read return new DocumentRenderer(mgr, DocumentRenderer.OFFSET_KIND_GET_COLUMN, this, offset).renderToIntIOE(); }
/** Get the column number */ public int getColumn() throws IOException { // pre-33165 return NbDocument.findLineColumn (getCloneableEditorSupport().openDocument(), offset); mgr.getCloneableEditorSupport().openDocument(); // make sure document fully read return new DocumentRenderer(mgr, DocumentRenderer.OFFSET_KIND_GET_COLUMN, this, offset).renderToIntIOE(); }