void GoProject::refresh(RefreshOptions options)
{
    parseProject(options);

    if (options & Files)
        m_rootNode->refresh();

    QmlJS::ModelManagerInterface::ProjectInfo projectInfo =
            QmlJSTools::defaultProjectInfoForProject(this);
    projectInfo.importPaths = customImportPaths();

    m_modelManager->updateProjectInfo(projectInfo,this);
}
Ejemplo n.º 2
0
void QmlProject::refresh(RefreshOptions options)
{
    parseProject(options);

    if (options & Files)
        m_rootNode->refresh();

    QmlJS::ModelManagerInterface::ProjectInfo pinfo(this);
    pinfo.sourceFiles = files();
    pinfo.importPaths = customImportPaths();
    QtSupport::BaseQtVersion *version = 0;
    if (activeTarget()) {
        ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(activeTarget()->kit());
        version = QtSupport::QtKitInformation::qtVersion(activeTarget()->kit());
        QtSupport::QmlDumpTool::pathAndEnvironment(this, version, tc, false, &pinfo.qmlDumpPath, &pinfo.qmlDumpEnvironment);
    }
    if (version) {
        pinfo.tryQmlDump = true;
        pinfo.qtImportsPath = version->qmakeProperty("QT_INSTALL_IMPORTS");
        pinfo.qtQmlPath = version->qmakeProperty("QT_INSTALL_QML");
        pinfo.qtVersionString = version->qtVersionString();
    }
    m_modelManager->updateProjectInfo(pinfo);
}