qmljs: add infrastructure handling qml dialects better

QmlBundles enables us to treat the different qml
dialects differently.

Add imports completion.

Change-log: [Qml/JS Support] Corrected handling of QtQuick2 only features.
Change-log: [Qml/JS Support] Added import completion in editor.
Task-number: QTCREATORBUG-8750
Task-number: QTCREATORBUG-8624
Task-number: QTCREATORBUG-8584
Task-number: QTCREATORBUG-8583
Task-number: QTCREATORBUG-8429

Change-Id: I1384b1b23136a85b4d077895ea86f92960da9e71
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Fawzi Mohamed
2012-12-06 17:20:58 +01:00
parent 6d3c271d53
commit 942326ae9b
34 changed files with 1184 additions and 122 deletions

View File

@@ -32,6 +32,7 @@
#include "qmljs_global.h"
#include "qmljsdocument.h"
#include "qmljsbundle.h"
#include <utils/environment.h>
@@ -73,6 +74,8 @@ public:
bool isNull() const
{ return project.isNull(); }
QStringList completeImportPaths();
public: // attributes
QPointer<ProjectExplorer::Project> project;
QStringList sourceFiles;
@@ -86,6 +89,8 @@ public:
QString qtImportsPath;
QString qtQmlPath;
QString qtVersionString;
QmlJS::QmlLanguageBundles activeBundle;
QmlJS::QmlLanguageBundles extendedBundle;
};
class WorkingCopy
@@ -141,8 +146,11 @@ public:
virtual ProjectInfo projectInfo(ProjectExplorer::Project *project) const = 0;
virtual void updateProjectInfo(const ProjectInfo &pinfo) = 0;
Q_SLOT virtual void removeProjectInfo(ProjectExplorer::Project *project) = 0;
virtual ProjectInfo projectInfoForPath(QString path) = 0;
virtual QStringList importPaths() const = 0;
virtual QmlJS::QmlLanguageBundles activeBundles() const = 0;
virtual QmlJS::QmlLanguageBundles extendedBundles() const = 0;
virtual void loadPluginTypes(const QString &libraryPath, const QString &importPath,
const QString &importUri, const QString &importVersion) = 0;