Improve building of the Qml/JS scope chain.

* For JS files: Add each Qml component that sources the file in a Script
  tag to the scope chain.
* For Qml components: Add each component that instantiates the component
  to the scope chain.
* Generate the full list of documents required for completion in a
  given file. Previously, files that included the file were missing.
This commit is contained in:
Christian Kamm
2010-02-11 18:58:17 +01:00
parent 62dd493865
commit 2b1adbf610
4 changed files with 134 additions and 41 deletions

View File

@@ -28,6 +28,9 @@ public:
private:
Interpreter::Engine *engine();
void pushScopeChainForComponent(Document::Ptr doc, QStringList *linkedDocs,
Interpreter::ObjectValue *scopeObject = 0);
static QList<Document::Ptr> reachableDocuments(Document::Ptr startDoc, const Snapshot &snapshot);
static AST::UiQualifiedId *qualifiedTypeNameId(AST::Node *node);