@Override public int hashCode() { return pos.getCloneableEditorSupport().hashCode(); }
@Override public boolean equals(Object o) { if (o instanceof DocumentLine) { DocumentLine dl = (DocumentLine) o; if (dl.pos.getCloneableEditorSupport() == pos.getCloneableEditorSupport()) { return dl.getLineNumber() == getLineNumber(); } } return false; }
/** Let's the support determine the name */ public String getDisplayName() { CloneableEditorSupport support = pos.getCloneableEditorSupport(); return support.messageLine (this); }
public boolean equals (Object o) { if (o instanceof DocumentLine) { DocumentLine dl = (DocumentLine)o; if (dl.pos.getCloneableEditorSupport () == pos.getCloneableEditorSupport ()) { return dl.getLineNumber () == getLineNumber (); } } return false; }
@Override public String getDisplayName() { CloneableEditorSupport support = pos.getCloneableEditorSupport(); return support.messageLine(this); }
public boolean equals (Object o) { if (o instanceof DocumentLine) { DocumentLine dl = (DocumentLine)o; if (dl.pos.getCloneableEditorSupport () == pos.getCloneableEditorSupport ()) { return dl.getLineNumber () == getLineNumber (); } } return false; }
/** Init listeners */ void init () { listener = new LR (); pos.getCloneableEditorSupport ().addChangeListener (org.openide.util.WeakListeners.change (listener, pos.getCloneableEditorSupport ())); }
/** Init listeners */ void init() { listener = new LR(); pos.getCloneableEditorSupport().addChangeListener( org.openide.util.WeakListeners.change(listener, pos.getCloneableEditorSupport()) ); }
/** Init listeners */ void init () { listener = new LR (); pos.getCloneableEditorSupport ().addChangeListener (org.openide.util.WeakListeners.change (listener, pos.getCloneableEditorSupport ())); }
/** Register line. */ Object readResolve() throws ObjectStreamException { // return Set.registerLine (this); //Set.registerPendingLine(this); return this.pos.getCloneableEditorSupport().getLineSet().registerLine(this); }
/** Register line. */ Object readResolve() throws ObjectStreamException { // return Set.registerLine (this); //Set.registerPendingLine(this); return this.pos.getCloneableEditorSupport().getLineSet().registerLine(this); }
/** Register line. */ Object readResolve() throws ObjectStreamException { // return Set.registerLine (this); //Set.registerPendingLine(this); return this.pos.getCloneableEditorSupport().getLineSet().registerLine(this); }
/** Finds the text contained in this range. * @return the text * @exception IOException if any I/O problem occurred during document loading (if that was necessary) * @exception BadLocationException if the positions are out of the bounds of the document */ public String getText() throws BadLocationException, IOException { StyledDocument doc = begin.getCloneableEditorSupport().openDocument(); int p1 = begin.getOffset(); int p2 = end.getOffset(); return doc.getText(p1, p2 - p1); }
/** Shows the line. * @param kind one of SHOW_XXX constants. * @column the column of this line which should be selected */ public void show (int kind, int column) { CloneableEditorSupport support = pos.getCloneableEditorSupport(); if (kind == SHOW_TRY_SHOW && !support.isDocumentLoaded ()) return; CloneableEditorSupport.Pane editor = support.openAt(pos, column); if (kind == SHOW_GOTO) { editor.getComponent ().requestActive(); } }
/** Finds the text contained in this range. * @return the text * @exception IOException if any I/O problem occurred during document loading (if that was necessary) * @exception BadLocationException if the positions are out of the bounds of the document */ public String getText() throws BadLocationException, IOException { StyledDocument doc = begin.getCloneableEditorSupport().openDocument(); int p1 = begin.getOffset(); int p2 = end.getOffset(); return doc.getText(p1, p2 - p1); }
/** Shows the line. * @param kind one of SHOW_XXX constants. * @column the column of this line which should be selected */ public void show (int kind, int column) { CloneableEditorSupport support = pos.getCloneableEditorSupport(); if (kind == SHOW_TRY_SHOW && !support.isDocumentLoaded ()) return; CloneableEditorSupport.Pane editor = support.openAt(pos, column); if (kind == SHOW_GOTO) { editor.getComponent ().requestActive(); } }
/** Finds the text contained in this range. * @return the text * @exception IOException if any I/O problem occurred during document loading (if that was necessary) * @exception BadLocationException if the positions are out of the bounds of the document */ public String getText() throws BadLocationException, IOException { StyledDocument doc = begin.getCloneableEditorSupport().openDocument(); int p1 = begin.getOffset(); int p2 = end.getOffset(); return doc.getText(p1, p2 - p1); }
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); } }
/** 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; }
@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; }