private StyledDocument openDocumentCheckIOE() throws IOException { StyledDocument locDoc = openDocumentImpl(); IOException ioe = getListener().checkLoadException(); if (ioe != null) { throw ioe; } return locDoc; }
private StyledDocument openDocumentCheckIOE() throws IOException { StyledDocument doc = openDocumentImpl(); IOException ioe = getListener().checkLoadException(); if (ioe != null) { throw ioe; } return doc; }
private StyledDocument openDocumentCheckIOE() throws IOException { StyledDocument doc = openDocumentImpl(); IOException ioe = getListener().checkLoadException(); if (ioe != null) { throw ioe; } return doc; }
/** Overrides superclass method, first processes document preparation. * @see #prepareDocument */ public void open() { try { if (getListener ().loadExc instanceof UserQuestionException) { getListener ().loadExc = null; prepareTask = null; documentStatus = DOCUMENT_NO; } openDocument(); super.open(); } catch (final UserQuestionException e) { if (SwingUtilities.isEventDispatchThread ()) { askUserAndDoOpen (e); } else { SwingUtilities.invokeLater (new Runnable () { public void run () { askUserAndDoOpen (e); } }); } } catch (IOException e) { ErrorManager.getDefault().notify( ErrorManager.INFORMATIONAL, e); } }
/** Overrides superclass method, first processes document preparation. * @see #prepareDocument */ public void open() { try { if (getListener ().loadExc instanceof UserQuestionException) { getListener ().loadExc = null; prepareTask = null; documentStatus = DOCUMENT_NO; } openDocument(); super.open(); } catch (final UserQuestionException e) { if (SwingUtilities.isEventDispatchThread ()) { askUserAndDoOpen (e); } else { SwingUtilities.invokeLater (new Runnable () { public void run () { askUserAndDoOpen (e); } }); } } catch (IOException e) { ErrorManager.getDefault().notify( ErrorManager.INFORMATIONAL, e); } }
/** Resets listening on <code>UndoRedo</code>, * and in case next undo edit comes, schedules processesing of it. * Used to revert modification e.g. of document of [read-only] env. */ private void revertUpcomingUndo() { Listener l = getListener(); l.setUndoTask(createUndoTask()); UndoRedo ur = getUndoRedo(); ur.removeChangeListener(l); ur.addChangeListener(l); }
/** Resets listening on <code>UndoRedo</code>, * and in case next undo edit comes, schedules processesing of it. * Used to revert modification e.g. of document of [read-only] env. */ private void revertUpcomingUndo() { Listener l = getListener(); l.setUndoTask(createUndoTask()); UndoRedo ur = getUndoRedo(); ur.removeChangeListener(l); ur.addChangeListener(l); }
if (getListener().loadExc instanceof UserQuestionException) { getListener().loadExc = null; documentStatus = DOCUMENT_NO;
d.putProperty("modificationListener", getListener()); // NOI18N } else { d.putProperty("modificationListener", null); // NOI18N d.putProperty(DocumentFilter.class, docFilter); d.addDocumentListener(getListener()); d.removeDocumentListener(getListener());
env.removePropertyChangeListener(getListener()); env.addPropertyChangeListener(getListener());
env.removePropertyChangeListener(getListener()); env.addPropertyChangeListener(getListener());
/** Is called under getLock () to close the document. */ private void doCloseDocument () { prepareTask = null; // notifies the support that env ().removePropertyChangeListener(getListener()); notifyUnmodified (); if (doc != null) { doc.removeUndoableEditListener (getUndoRedo ()); doc.removeDocumentListener(getListener()); } if (positionManager != null) { positionManager.documentClosed (); documentStatus = DOCUMENT_NO; fireDocumentChange(doc, true); } documentStatus = DOCUMENT_NO; doc = null; kit = null; getUndoRedo().discardAllEdits(); updateLineSet (true); }
/** Is called under getLock () to close the document. */ private void doCloseDocument () { prepareTask = null; // notifies the support that env ().removePropertyChangeListener(getListener()); notifyUnmodified (); if (doc != null) { doc.removeUndoableEditListener (getUndoRedo ()); doc.removeDocumentListener(getListener()); } if (positionManager != null) { positionManager.documentClosed (); documentStatus = DOCUMENT_NO; fireDocumentChange(doc, true); } documentStatus = DOCUMENT_NO; doc = null; kit = null; getUndoRedo().discardAllEdits(); updateLineSet (true); }
/** Is called under getLock () to close the document. */ private boolean doCloseDocument() { boolean fireEvent = false; // notifies the support that cesEnv().removePropertyChangeListener(getListener()); try { LOCAL_CLOSE_DOCUMENT.set(Boolean.TRUE); callNotifyUnmodified(); } finally { LOCAL_CLOSE_DOCUMENT.set(Boolean.FALSE); } StyledDocument d = getDoc(); if (d != null) { d.removeUndoableEditListener(getUndoRedo()); addRemoveDocListener(d, false); } if (positionManager != null) { positionManager.documentClosed(); } documentStatus = DOCUMENT_NO; fireEvent = true; setDoc(null, false); kit = null; getUndoRedo().discardAllEdits(); updateLineSet(true); return fireEvent; }
getListener ().loadExc = null; prepareTask = null; documentStatus = DOCUMENT_NO;
getListener ().loadExc = null; prepareTask = null; documentStatus = DOCUMENT_NO;
env.removePropertyChangeListener(getListener()); env.addPropertyChangeListener(getListener());