Link now caches imports. That means importing the same library (say, Qt)
from more than one file no longer creates an importing namespace for
each one. Instead, a single one is created for the instance of Link.
To make this work, the type environment in ScopeChain has been given its
own type: Interpreter::TypeEnvironment. That has the added benefit of
being able to carry meta-information about imports. You can use
TypeEnvironment::importInfo(qmlComponentName) to get information about
the import node that caused the import of the component.
When adding a new file, refreshing semantic errors in the open editor should
have worked. It now also works for removing existing files.
Done-with: Christian Kamm
Previously, fresh versions of a Document would be added to the
_documentsByPath QMultiHash without removing the old version first.
This means Link could pick up old versions of a Document.
Task-number: QTCREATORBUG-1418
Using canonical paths breaks with symlinked components. Also the editor
filename isn't canonical, so comparing them breaks.
This reverts commit efcdadd2bb.
* Add SemanticHighlighter to QmlJSTextEditor to update the semantic info
in a background thread.
* Add QmlJS::Check to run semantic checks on qml and js documents.
* Add a check for incorrect property names.
* Fix hoverhandler to show tool tips from extra selections over help
tooltips.
Ideally most of our visitors won't need to make the QML vs JS
distinction. For these cases it'll be handy to be able to access the AST
no matter whether it's a Program or UiProgram.