Java Code Examples for com.intellij.openapi.editor.Document#removeDocumentListener()
The following examples show how to use
com.intellij.openapi.editor.Document#removeDocumentListener() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ListenerDiffViewerBase.java From consulo with Apache License 2.0 | 5 votes |
@Override protected void onDispose() { if (myFileListener != null) VirtualFileManager.getInstance().removeVirtualFileListener(myFileListener); for (Document document : getDocuments()) { document.removeDocumentListener(myDocumentListener); } super.onDispose(); }
Example 2
Source File: QuickDocOnMouseOverManager.java From consulo with Apache License 2.0 | 5 votes |
private void unRegisterListeners(@Nonnull Editor editor) { editor.removeEditorMouseListener(myMouseListener); editor.removeEditorMouseMotionListener(myMouseListener); editor.getScrollingModel().removeVisibleAreaListener(myVisibleAreaListener); editor.getCaretModel().removeCaretListener(myCaretListener); Document document = editor.getDocument(); if (myMonitoredDocuments.remove(document) != null) { document.removeDocumentListener(myDocumentListener); } }
Example 3
Source File: DiffRangeMarker.java From consulo with Apache License 2.0 | 4 votes |
private void onClientRemoved(@Nonnull Document document, @Nonnull DiffRangeMarker marker, @Nonnull RangeInvalidListener listener) { if (myDiffRangeMarkers.remove(marker) == listener && myDiffRangeMarkers.isEmpty()) { document.putUserData(KEY, null); document.removeDocumentListener(this); } }
Example 4
Source File: RangeMarkerTree.java From consulo with Apache License 2.0 | 4 votes |
void dispose(@Nonnull Document document) { document.removeDocumentListener(this); }
Example 5
Source File: CppSupportLoader.java From CppTools with Apache License 2.0 | 4 votes |
private void removeDocumentListener(Document document) { if (isAcceptableDocument(document) && document.getUserData(ourListenerKey) != null) { document.removeDocumentListener(myDocumentListener); document.putUserData(ourListenerKey, null); } }