MCPcopy Create free account
hub / github.com/KDE/kdevelop / updateActions

Method updateActions

plugins/compileanalyzercommon/compileanalyzer.cpp:123–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123void CompileAnalyzer::updateActions()
124{
125 m_checkFileAction->setEnabled(false);
126 m_checkProjectAction->setEnabled(false);
127
128 if (isRunning()) {
129 return;
130 }
131
132 IDocument* activeDocument = core()->documentController()->activeDocument();
133 if (!activeDocument) {
134 return;
135 }
136
137 auto currentProject = core()->projectController()->findProjectForUrl(activeDocument->url());
138 if (!currentProject) {
139 return;
140 }
141
142 if (!currentProject->buildSystemManager()) {
143 return;
144 }
145
146 if (isSupportedMimeType(activeDocument->mimeType())) {
147 m_checkFileAction->setEnabled(true);
148 }
149 m_checkProjectAction->setEnabled(true);
150}
151
152void CompileAnalyzer::handleProjectClosed(IProject* project)
153{

Callers

nothing calls this directly

Calls 9

activeDocumentMethod · 0.80
documentControllerMethod · 0.80
findProjectForUrlMethod · 0.80
projectControllerMethod · 0.80
buildSystemManagerMethod · 0.80
isSupportedMimeTypeFunction · 0.70
setEnabledMethod · 0.45
urlMethod · 0.45
mimeTypeMethod · 0.45

Tested by

no test coverage detected