| 245 | } |
| 246 | |
| 247 | LSPClientPlugin::~LSPClientPlugin() { |
| 248 | waitUntilLoaded(); |
| 249 | mShuttingDown = true; |
| 250 | mManager->unsubscribeMessages( this ); |
| 251 | unsubscribeFileSystemListener(); |
| 252 | { |
| 253 | Lock l( mDocMutex ); |
| 254 | for ( const auto& editor : mEditors ) { |
| 255 | UICodeEditor* codeEditor = editor.first; |
| 256 | for ( auto& kb : mKeyBindings ) { |
| 257 | codeEditor->getKeyBindings().removeCommandKeybind( kb.first ); |
| 258 | if ( codeEditor->hasDocument() ) |
| 259 | codeEditor->getDocument().removeCommand( kb.first ); |
| 260 | } |
| 261 | for ( auto listener : editor.second ) |
| 262 | codeEditor->removeEventListener( listener ); |
| 263 | if ( mBreadcrumb ) |
| 264 | codeEditor->unregisterTopSpace( this ); |
| 265 | codeEditor->unregisterPlugin( this ); |
| 266 | if ( mManager->getSplitter()->editorExists( codeEditor ) ) |
| 267 | codeEditor->removeActionsByTag( getMouseMoveHash( codeEditor ) ); |
| 268 | } |
| 269 | if ( nullptr == mManager->getSplitter() ) |
| 270 | return; |
| 271 | } |
| 272 | } |
| 273 | |
| 274 | void LSPClientPlugin::update( UICodeEditor* ) { |
| 275 | mClientManager.updateDirty(); |
nothing calls this directly
no test coverage detected