Christian Kamm
7a8c07a1f8
QmlJS: The Script type is no longer implicitly available.
2010-08-25 14:55:16 +02:00
Christian Kamm
36e8b65d59
QmlJS: Fix running qmldump on plugins that require a specific uri.
...
The builtin QML plugins require to be imported with the full uri, i.e.
import Qt.labs.particles 1.0
so setting the import path to imports/Qt/labs and doing
import particles 1.0
is not supposed to work. (see QTBUG-11139)
This change adjusts qmldump to take an import path *and* the import uri,
so it will be able to dump the type information for these plugins.
Reviewed-by: Erik Verbruggen
2010-08-25 14:19:44 +02:00
Christian Kamm
6ee1027eaa
Add missing license headers.
2010-07-09 15:47:25 +02:00
con
ede2a7c975
Merge remote branch 'origin/2.0'
...
Conflicts:
doc/qtcreator.qdoc
share/qtcreator/gdbmacros/dumper.py
src/libs/qmljs/qmljs-lib.pri
src/plugins/debugger/breakhandler.cpp
src/plugins/projectexplorer/projectexplorer.h
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.h
2010-06-30 14:25:09 +02:00
Christian Kamm
4271d2a21f
QmlJS: Make the qml instantiating component chain more useful.
...
By actually storing the documents instead of only the root and id
environments.
2010-06-25 17:10:14 +02:00
Christian Kamm
123607ad70
QmlJS: Make variables in imported JS documents show up in completion.
...
Filtering them out has long since become unnecessary. It was used back
when JS files were sourced from Script elements - there they'd only
make the functions available. Now functions and variables are imported.
Task-number: QTCREATORBUG-1735
Reviewed-by: Erik Verbruggen
2010-06-25 13:34:45 +02:00
Christian Kamm
e307bc2506
QmlJS: Store plugin metatypes in LibraryInfo. Rework type loading.
2010-06-09 14:36:54 +02:00
Christian Kamm
f9d7872761
QmlJS: Use ComponentVersion everywhere.
2010-06-09 14:36:53 +02:00
Christian Kamm
822520c304
QmlJS: Get at types defined in plugins by running qmldump on them.
...
Task-number: QTCREATORBUG-1021
Reviewed-by: Roberto Raggi
2010-06-09 14:36:53 +02:00
Christian Kamm
0d5d6344bd
QmlJS: Collect import version numbers in Bind.
2010-06-09 14:36:53 +02:00
Christian Kamm
70291f457a
QmlJS: Add null checks when accessing Bind::rootObjectValue.
...
If a document wasn't parsed correctly the binder won't be run - and
rootObjectValue will be null.
Task-number: QTCREATORBUG-1449
2010-05-20 14:02:25 +02:00
Christian Kamm
50cc55af80
QmlJS: Change to a nicer way of marking strings for translation.
...
Reviewed-by: ossi
2010-05-19 13:32:11 +02:00
Christian Kamm
9af4f2c64f
QmlJS: Remove unused function environment from binder.
...
This used to contain all functions declared in Script blocks. With them
gone, there's no reason to keep it.
2010-04-28 10:01:36 +02:00
Christian Kamm
71b9057b0b
QmlJS: The qml document's path is no longer an implicit import path.
2010-04-26 10:43:59 +02:00
Christian Kamm
3096b2a06f
QmlJS: Set importing scopes for scripts correctly.
...
They had not yet been updated to the new way of importing javascript.
Reviewed-by: Erik Verbruggen
2010-04-22 16:36:43 +02:00
Christian Kamm
3286f48504
QmlJS: Remove Link::scopeChainAt, initialize scope chain in constructor.
...
Use ScopeBuilder.push(...) for the same functionality.
Reviewed-by: Erik Verbruggen
2010-04-22 16:36:43 +02:00
Christian Kamm
db2f91ef8f
QmlJS: Don't produce Qml type errors if plugins are imported.
...
Task-number: QTCREATORBUG-1021
Reviewed-by: Erik Verbruggen
2010-04-07 11:09:27 +02:00
Christian Kamm
49416fe888
QmlJS: Add a path->document list hash to Snapshot.
...
Also change the filename->document map to a hash.
Reviewed-by: Roberto Raggi
2010-04-01 11:28:56 +02:00
Kai Koehne
5ed718a002
Fix imported qml component names under Windows
...
Reviewed-by: ckamm
2010-03-31 15:50:02 +02:00
Christian Kamm
285e2ffbb2
QmlJS: Only collect linker errors for the current file being checked.
...
Avoids bug where import errors would show up in all files.
Reviewed-by: Roberto Raggi
2010-03-29 11:33:25 +02:00
Christian Kamm
c1c155f5bb
Fix code model for nested Qml packages like Qt.labs.particles.
...
Task-number: QTCREATORBUG-926
Reviewed-by: Erik Verbruggen
2010-03-25 15:31:24 +01:00
Christian Kamm
dab558d4fe
Add errors for incorrect imports in Qml.
...
Task-number: QTCREATORBUG-874
Reviewed-by: Erik Verbruggen
2010-03-25 14:55:44 +01:00
Christian Kamm
6eadfa3ac0
Read qmldir files in a thread and cache them in Snapshot.
...
Reviewed-by: Erik Verbruggen
2010-03-18 16:47:21 +01:00
Christian Kamm
4261aca7b0
Make the Qml code model read qmldir files for import resolving.
...
However, it still re-reads for each use of Link. Needs to be optimized.
Reviewed-by: Roberto Raggi
2010-03-18 16:47:16 +01:00
Christian Kamm
9ea01cf5fb
Improve Qml code model import handling.
...
* Fill the snapshot with files that could be imported.
* Implement package imports.
* The qmldir file is not parsed yet.
Reviewed-by: Erik Verbruggen
2010-03-18 11:25:37 +01:00
Christian Kamm
4722c6cf84
Fix the scope chain not being set up correctly for the outermost scope.
...
This bug manifested itself as not getting a tooltip and correct context
help for the type of the root object in a Qml file.
2010-03-10 14:52:34 +01:00
Christian Kamm
08b9323f0c
Fix completion and checking for Script elements. Update Qml type xml.
...
* The "Script" type is now implicitly available without imports.
* No errors for bindings inside a Connections element.
Reviewed-by: Roberto Raggi
2010-03-03 11:38:17 +01:00
Erik Verbruggen
13d7612f09
Removed private header dependencies and introduced loading QML types from XML file.
2010-03-01 13:13:02 +01:00
Erik Verbruggen
912a1b95a9
Fixed crash when putting a second root item into a QML file.
2010-02-25 12:57:17 +01:00
Christian Kamm
fcb6c4984e
Fix a memory leak with the QmlJS scope chain.
2010-02-22 11:21:25 +01:00
Christian Kamm
e9039db984
Move the scope building logic into QmlJS::ScopeBuilder.
2010-02-22 10:22:23 +01:00
Christian Kamm
08cfc8f28c
Pass in the whole AST path for scope creation.
...
Just the declaring member isn't enough.
2010-02-22 10:22:23 +01:00
Christian Kamm
c289897351
Make QmlJS scope building more flexible.
...
Instead of only maintaining a flat list of scopes, actually store the
global, component chain, root object, scope object, function, id and js
scopes separately.
2010-02-22 10:22:23 +01:00
Christian Kamm
da3679066e
Add QmlJS semantic checker.
...
* 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.
2010-02-16 10:38:56 +01:00
hjk
a029a6c68a
compile fix with namespaces
2010-02-12 11:00:12 +01:00
Christian Kamm
42959f8fef
Remove the lookup into including Qml files in the root scope of a JS file.
2010-02-12 10:05:13 +01:00
Christian Kamm
2b1adbf610
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.
2010-02-11 19:08:33 +01:00
Roberto Raggi
bdf8c94809
Get rid off the friend QmlJS::Link declaration.
2010-02-10 17:06:32 +01:00
Roberto Raggi
56df4e29ce
Fixed possible crash when trying to link invalid documents.
2010-02-10 16:24:22 +01:00
Roberto Raggi
0567adbc32
Removed useless qDebug.
2010-02-09 12:16:19 +01:00
Roberto Raggi
3d44c5621d
Improved completion of JavaScript expressions.
2010-02-09 11:37:58 +01:00
Christian Kamm
25e04d8ef1
Make QmlJS::Link private. Use Context::build to set up a context.
2010-02-04 10:34:49 +01:00
Christian Kamm
e984691fe6
Fix prototype reference resolution for Qml objects.
2010-02-04 10:34:49 +01:00
Roberto Raggi
fcf81b22ed
Get rid of BindPtr.
...
There is no reason to store the Bind object in a QSharedPointer because the `binder' has the same
lifetime of its document.
2010-02-03 15:59:15 +01:00
Roberto Raggi
976d74ca73
Add support for lazy prototypes.
...
Done-with: ckamm
2010-02-03 15:42:32 +01:00
Roberto Raggi
1f0b717ad2
Completion for global variables in JS.
...
* Support for lookup JS vs Qml
* Bind global variables.
Done-with: ckamm
2010-02-03 14:34:06 +01:00
Christian Kamm
49c43aaab1
Get rid of Environment, introduce external ScopeChain in Link.
...
Done-with: Roberto
2010-02-03 10:59:52 +01:00
Roberto Raggi
ba18e70034
Introduced QML/JS references.
...
Done with ckamm
2010-02-03 10:24:25 +01:00
Roberto Raggi
95849cb0bd
Store bindings and definitions in one single table.
2010-02-03 09:34:28 +01:00
Roberto Raggi
14ffb1e465
Some refactoring needed to create ranges for JavaScript functions.
2010-02-02 16:36:14 +01:00