MCPcopy Create free account
hub / github.com/SpartanJ/eepp / ~FormatterPlugin

Method ~FormatterPlugin

src/tools/ecode/plugins/formatter/formatterplugin.cpp:38–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38FormatterPlugin::~FormatterPlugin() {
39 waitUntilLoaded();
40 mShuttingDown = true;
41 unsubscribeFileSystemListener();
42
43 if ( mWorkersCount != 0 ) {
44 std::unique_lock<std::mutex> lock( mWorkMutex );
45 mWorkerCondition.wait( lock, [this]() { return mWorkersCount <= 0; } );
46 }
47
48 for ( auto& editor : mEditors ) {
49 for ( auto& kb : mKeyBindings ) {
50 editor.first->getKeyBindings().removeCommandKeybind( kb.first );
51 if ( editor.first->hasDocument() )
52 editor.first->getDocument().removeCommand( kb.first );
53 }
54 for ( auto listener : editor.second )
55 editor.first->removeEventListener( listener );
56 editor.first->unregisterPlugin( this );
57 }
58}
59
60void FormatterPlugin::onRegister( UICodeEditor* editor ) {
61 std::vector<Uint32> listeners;

Callers

nothing calls this directly

Calls 7

removeCommandKeybindMethod · 0.80
removeCommandMethod · 0.80
getDocumentMethod · 0.80
unregisterPluginMethod · 0.80
waitMethod · 0.45
hasDocumentMethod · 0.45
removeEventListenerMethod · 0.45

Tested by

no test coverage detected