public LineDelegate(Line line) { this.line = line; lineChangesWeak = WeakListeners.propertyChange(lineChangeslistener, line); line.addPropertyChangeListener(lineChangesWeak); }
/** * Whenever the annotation is attached to the editor, listen for line edits so we can detach the * annotation. */ protected void notifyAttached(final Annotatable toAnno) { super.notifyAttached(toAnno); docline.addPropertyChangeListener(this); }
private void ourAttach(Line line, boolean isCurrent) { // isCurrent was added as a fix for 6570554. // When we follow-fork-both we get "visit"s from both engines's and // they both end up here. In general we only want the visits to have // visible side-effects for the current session. They will get // properly activated when we switch sessions. // // The parameter is passed and the test is made here rather than // the callsite in order to ensure tat all callsites are cognizant of // this flag. // // In order to be conservative pretty much all callsites pass a // hard-coded true to minimize regressions. if (!isCurrent) { return; } if (line != null) { attach(line); line.addPropertyChangeListener(this); } }
private void setLine(Line line) { dispose(); int oldLineNumber = getLineNumber(); this.line = line; lineChangesWeak = WeakListeners.propertyChange(lineChangeslistener, line); line.addPropertyChangeListener(lineChangesWeak); pchs.firePropertyChange(PROP_LINE_NUMBER, oldLineNumber, getLineNumber()); }
line = lc.getLineSet().getCurrent(lb.getLineNumber() - 1); if (!haveDocL) { line.addPropertyChangeListener(this); try { this.line = lc.getLineSet().getCurrent(lb.getLineNumber() - 1); line.addPropertyChangeListener(this); } catch (IndexOutOfBoundsException ioobex) {
public synchronized void attach() throws IOException { this.lc = dataObject.getCookie (LineCookie.class); if (lc == null) return ; lb.addPropertyChangeListener(this); try { this.line = lc.getLineSet().getCurrent(lb.getLineNumber() - 1); line.addPropertyChangeListener(this); } catch (IndexOutOfBoundsException ioobex) { // ignore document changes for BP with bad line number } }
newLine.addPropertyChangeListener(this); } catch (IndexOutOfBoundsException ioobex) { return ; LineCookie lc = dobj.getLookup().lookup (LineCookie.class); newLine = lc.getLineSet().getCurrent(lb.getLineNumber() - 1); newLine.addPropertyChangeListener(this); } catch (IndexOutOfBoundsException ioobex) { newLine = null; try { newLine = lc.getLineSet().getCurrent(lb.getLineNumber() - 1); newLine.addPropertyChangeListener(this); } catch (IndexOutOfBoundsException ioobex) {
newLine.addPropertyChangeListener(this); } catch (IndexOutOfBoundsException ioobex) { return ; LineCookie lc = dobj.getLookup().lookup (LineCookie.class); newLine = lc.getLineSet().getCurrent(lb.getLineNumber() - 1); newLine.addPropertyChangeListener(this); } catch (IndexOutOfBoundsException ioobex) { newLine = null; try { newLine = lc.getLineSet().getCurrent(lb.getLineNumber() - 1); newLine.addPropertyChangeListener(this); } catch (IndexOutOfBoundsException ioobex) {
lineNew.addPropertyChangeListener(this); StyledDocument document = NbDocument.getDocument(new Lookup.Provider() { @Override
lineNew.addPropertyChangeListener(this); StyledDocument document = NbDocument.getDocument(new Lookup.Provider() { @Override