| 121 | } |
| 122 | |
| 123 | void 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 | |
| 152 | void CompileAnalyzer::handleProjectClosed(IProject* project) |
| 153 | { |
nothing calls this directly
no test coverage detected