void StateMachine::updateActionsAvailability()
{
    using namespace ProjectExplorer;
    ProjectExplorerPlugin *projectExplorerPlugin = ProjectExplorerPlugin::instance();
    Project *project = projectExplorerPlugin->startupProject();
    const bool isProjectCanRun = projectExplorerPlugin->canRun(project, NormalRunMode);

    currentState->updateActionsAvailability(isProjectCanRun);
}
Exemplo n.º 2
0
void QmlProfilerTool::startTool(StartMode mode)
{
    Q_UNUSED(mode);

    using namespace ProjectExplorer;

    // Make sure mode is shown.
    AnalyzerManager::showMode();

    ProjectExplorerPlugin *pe = ProjectExplorerPlugin::instance();
    // ### not sure if we're supposed to check if the RunConFiguration isEnabled
    Project *pro = pe->startupProject();
    pe->runProject(pro, id());
}
void CleanExecutor::execute()
{
    using namespace ProjectExplorer;

    ProjectExplorerPlugin *projectExplorerPlugin = ProjectExplorerPlugin::instance();
    Project *project = projectExplorerPlugin->startupProject();

    ProjectNode *rootProjectNode = project->rootProjectNode();
    const QString &activeRunConfigurationDir = getRunConfigurationPath(rootProjectNode, project->activeTarget()->activeRunConfiguration());

    const QString &buildDir = activeRunConfigurationDir.mid(0, activeRunConfigurationDir.lastIndexOf('/'));
    const QString &objectFilesDir = getObjectFilesDir(buildDir);

    const QString program = "lcov";
    const QStringList arguments = {
        "-z",
        "-d",
        objectFilesDir
    };

    process->start(program, arguments);
}