retInt = NbDocument.findLineNumber(mgr.getCloneableEditorSupport().openDocument(), argInt); retInt = NbDocument.findLineColumn(mgr.getCloneableEditorSupport().openDocument(), argInt);
retInt = NbDocument.findLineNumber(mgr.getCloneableEditorSupport().openDocument(), argInt); break; } retInt = NbDocument.findLineColumn (mgr.getCloneableEditorSupport().openDocument(), argInt); break; }
retInt = NbDocument.findLineNumber(mgr.getCloneableEditorSupport().openDocument(), argInt); break; } retInt = NbDocument.findLineColumn (mgr.getCloneableEditorSupport().openDocument(), argInt); break; }
StyledDocument doc = mgr.getCloneableEditorSupport().getDocument(); if (doc == null) { doc = mgr.getCloneableEditorSupport().openDocument();
/** Offset */ public int getOffset() { /* pre-33165 try { StyledDocument doc = getCloneableEditorSupport().getDocument(); if (doc == null) { doc = getCloneableEditorSupport().openDocument(); } return NbDocument.findLineOffset (doc, line) + column; } catch (IOException e) { // what to do? hopefully unlikelly return 0; } */ try { StyledDocument doc = mgr.getCloneableEditorSupport().getDocument(); if (doc == null) { doc = mgr.getCloneableEditorSupport().openDocument(); } int retOffset = new DocumentRenderer( mgr, DocumentRenderer.LINE_KIND_GET_OFFSET, this, line, column, doc ).renderToInt(); return retOffset; } catch (IOException e) { // what to do? hopefully unlikelly return 0; } }
StyledDocument doc = mgr.getCloneableEditorSupport().getDocument(); if (doc == null) { doc = mgr.getCloneableEditorSupport().openDocument();
/** @return the position as swing.text.Position object. * @exception IOException when an exception occured during reading the file. */ public Position getPosition() throws IOException { // Hold the document reference to prevent document to be closed StyledDocument doc = manager.getCloneableEditorSupport().getDocument(); if (doc == null) { doc = manager.getCloneableEditorSupport().openDocument(); } synchronized (manager.getLock()) { // Fix for IZ#67761 - ClassCastException: org.openide.text.PositionRef$Manager$OffsetKind Manager.PositionKind p = kind.toMemory( insertAfter ); return p.pos; } }
/** 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(); }
/** @return the appropriate manager for this position ref. */ public CloneableEditorSupport getCloneableEditorSupport () { return manager.getCloneableEditorSupport (); }
/** @return the position as swing.text.Position object. * @exception IOException when an exception occured during reading the file. */ public Position getPosition() throws IOException { if(manager.getCloneableEditorSupport().getDocument() == null) { manager.getCloneableEditorSupport ().openDocument (); } synchronized(manager.getLock()) { Manager.PositionKind p = (Manager.PositionKind)kind; return p.pos; } }
/** @return the position as swing.text.Position object. * @exception IOException when an exception occured during reading the file. */ public Position getPosition() throws IOException { if(manager.getCloneableEditorSupport().getDocument() == null) { manager.getCloneableEditorSupport ().openDocument (); } synchronized(manager.getLock()) { Manager.PositionKind p = (Manager.PositionKind)kind; return p.pos; } }
/** @return the appropriate manager for this position ref. */ public CloneableEditorSupport getCloneableEditorSupport () { return manager.getCloneableEditorSupport (); }
/** 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() 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(); }
/** 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(); }
/** @return the appropriate manager for this position ref. */ public CloneableEditorSupport getCloneableEditorSupport() { return manager.getCloneableEditorSupport(); }