Christian Kamm
f87dc61986
QmlJS: Split Context and ScopeChain.
...
Context is created by Link and has information about imports
for all Documents in a Snapshot.
ScopeChain represents how lookup is done at a specific place in
a Document.
Change-Id: I874102d57bbaf1a497fa3f27633bed6ee75dcf10
Reviewed-on: http://codereview.qt.nokia.com/1694
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
2011-08-08 12:05:03 +02:00
Christian Kamm
36ed6bce1d
QmlJS: Move Context to its own file.
...
Change-Id: I91331b7039e27e2f57cc19b985c8ed86c955ec9e
Reviewed-on: http://codereview.qt.nokia.com/1042
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
2011-07-05 11:52:20 +02:00
Christian Kamm
55b11db1f7
QmlJS: Fix error location for prototype errors.
...
Change-Id: Iaeb96ff67cfc92bcddeb1b7075b7fdcbaed317c0
Reviewed-on: http://codereview.qt.nokia.com/691
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com >
2011-06-24 11:32:48 +02:00
Christian Kamm
33a130e222
QmlJS: Fix completion inside grouped propery bindings.
...
Task-number: QTCREATORBUG-3541
Change-Id: Ida8e59b65836c8515fbfbd2a9e4737d9ae04e76c
Reviewed-on: http://codereview.qt.nokia.com/639
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com >
2011-06-23 11:47:07 +02:00
Fawzi Mohamed
fe564852ad
Qmljs: added scope for blocks in UiScriptBindings and UiPublicMember
...
correctly insert the scope for code blocks in UiScriptBindings and
UiPublicMember, and improve find usages for types (correctly detecting
variables in the same scope)
Change-Id: Iaaf1a59f041f3831fbe04243b220fb85fde76479
Reviewed-on: http://codereview.qt.nokia.com/335
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com >
2011-06-07 13:04:21 +02:00
Christian Kamm
0bf18d008b
QmlJS: Find prototype resolution errors.
...
To avoid lots of follow-up errors where the root cause is a failed
prototype resolution or a prototype cycle.
Task-number: QTCREATORBUG-4952
Change-Id: Id474c8c6c152c993aca8c6c421b6d88eb1481676
Reviewed-on: http://codereview.qt.nokia.com/36
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com >
2011-05-20 13:33:18 +02:00
Christian Kamm
d72bddc7da
QmlJS: Update to new QmlJS parser.
...
UiPublicMember is now initialized with a statement.
2011-05-12 13:39:53 +02:00
Tobias Hunger
aa2acec14c
Fix/add copyright headers
...
Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
2011-05-06 15:17:05 +02:00
Christian Kamm
d05992d0fa
QmlJS: Stop doing significant work in constructors.
...
To avoid order-of-initialization problems.
Reviewed-by: Thomas Hartmann
2011-05-06 13:48:55 +02:00
Christian Kamm
02b7eacf4b
QmlJS: Fix type detection for alias properties.
...
Task-number: QTCREATORBUG-2306
2011-05-04 11:14:35 +02:00
Christian Kamm
ad43f5c48e
QmlJS: Don't warn about function exp statements.
...
Reviewed-by: Roberto Raggi
2011-04-21 09:43:51 +02:00
hjk
8397663964
Update license.
2011-04-13 11:49:28 +02:00
Thomas Hartmann
1178d623d5
QmlJs::Check: using the Option enum to ignore type errors
...
Unifying the api and exposing the options.
2011-03-01 17:21:03 +01:00
Thomas Hartmann
d6e08c3542
QmlJs::Check: turning "file or directory does not exist" into a warning
...
Missing files should be a warning.
2011-03-01 17:21:02 +01:00
Christian Kamm
1d4cd9b7f2
QmlJS: Remove the strict separation of types and attached types.
...
The problem was that several lookup calls suddenly failed because
the actual QML types were no longer in the default scope chain. However,
the QML documentation says the type names are in the scope.
Also, 'MyComponent.' in a JS-expression context only showed the attached
properties of MyComponent and missed the enums.
With this change completion now may offers too many options, but that's
better than missing some.
This reverts parts of 490f2797f6
Reviewed-by: Leandro Melo
2011-02-21 15:05:04 +01:00
Christian Kamm
490f2797f6
QmlJS: Completion for attached properties.
2011-02-10 17:04:22 +01:00
Christian Kamm
c99d2ca206
QmlJS: Fix local-file url property check.
2011-02-09 10:42:49 +01:00
con
d1023c7614
It's 2011 now.
...
Reviewed-by: hjk
2011-01-12 09:46:24 +01:00
con
b1bcf081d8
Merge branch '2.1'
...
Conflicts:
src/plugins/coreplugin/basemode.cpp
src/plugins/coreplugin/basemode.h
src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp
src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h
src/plugins/debugger/cdb/cdbsymbolpathlisteditor.cpp
src/plugins/debugger/debuggeragents.cpp
src/plugins/debugger/debuggeruiswitcher.cpp
src/plugins/debugger/debuggeruiswitcher.h
src/plugins/projectexplorer/buildconfigdialog.cpp
src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp
src/plugins/qmldesigner/components/propertyeditor/colorwidget.h
src/plugins/qmldesigner/designercore/include/enumeratormetainfo.h
src/plugins/qmldesigner/designercore/include/modelutilities.h
src/plugins/qmldesigner/designercore/include/nodeinstance.h
src/plugins/qmldesigner/designercore/include/propertymetainfo.h
src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.h
src/plugins/qmldesigner/designercore/instances/graphicsviewnodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.h
src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/qmlviewnodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.cpp
src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.h
src/plugins/qmldesigner/designercore/metainfo/enumeratormetainfo.cpp
src/plugins/qmldesigner/designercore/metainfo/propertymetainfo.cpp
src/plugins/qmldesigner/designercore/model/modelutilities.cpp
src/plugins/snippets/inputwidget.cpp
src/plugins/snippets/snippetscompletion.cpp
src/plugins/snippets/snippetscompletion.h
src/plugins/snippets/snippetspec.cpp
src/plugins/snippets/snippetsplugin.cpp
src/plugins/snippets/snippetswindow.cpp
src/plugins/snippets/snippetswindow.h
src/plugins/texteditor/snippetsparser.cpp
src/tools/qml/qmldom/main.cpp
tests/manual/trk/runner.cpp
tests/manual/trk/trkolddevice.cpp
tests/manual/trk/trkolddevice.h
tests/manual/trk/trkserver.cpp
2010-12-17 17:00:53 +01:00
con
04e32b0049
License headers.
2010-12-17 16:03:42 +01:00
Thomas Hartmann
8e5eaf821f
QMlJSCheck: Components have their own scope for ids
...
Each Components starts a new scope for ids. Using a stack to check
this properly.
2010-12-13 17:51:37 +01:00
Thomas Hartmann
4d66396c36
QmlJsCheck: check for Behaivours and exclude them from duplicate check
2010-12-13 15:08:32 +01:00
Thomas Hartmann
0eb18f850e
QmlJSCheck: adding more checks
...
We are checking for duplicate ids and duplicate property definitions now.
2010-12-07 17:33:51 +01:00
Christian Kamm
8b339f921f
JS checks: Check code block script bindings for common errors.
...
Reviewed-by: Erik Verbruggen
2010-12-06 10:58:58 +01:00
Christian Kamm
23d7752815
JS checks: Allow blocks after for(var ...).
...
Also
* check the condition of the 'for(var' statement for assignment
* allow comma expressions in 'for(var'
Reviewed-by: Erik Verbruggen
2010-12-06 10:58:58 +01:00
Christian Kamm
847e5dfb61
QmlJS: Don't warn about expression statements in script bindings.
...
Reviewed-by: Roberto Raggi
2010-11-29 12:21:02 +01:00
Christian Kamm
5355c8ef4c
QmlJS: Don't warn for "string == ''" and "boolean == true".
...
Reviewed-by: Roberto Raggi
2010-11-29 11:52:30 +01:00
Christian Kamm
042ee8de01
QmlJS: Don't warn on 'numbervalue == 0'.
...
Reviewed-by: Roberto Raggi
2010-11-29 11:20:45 +01:00
Christian Kamm
055aa15fcc
QmlJS: Remove overzealous 'undefined' check for enums.
...
The "value might be 'undefined'" warning triggered whenever the static
expression evaluator failed to produce a value. At the moment, it does
so for almost all non-trivial expressions.
The warning is now disabled.
Task-number: QTCREATORBUG-3208
2010-11-29 09:01:40 +01:00
Christian Kamm
f40b3c22f4
QmlJS: Add JSLint-style warnings for common JS traps.
...
Task-number: QTCREATORBUG-3071
Reviewed-by: Erik Verbruggen
2010-11-25 15:06:45 +01:00
Christian Kamm
124358d258
QmlJS: Enhance check pass to do lookup... and disable it.
...
It still generates too many false-negatives for now. Will be enabled
once the remaining lookup failures have been fixed.
Reviewed-by: Erik Verbruggen
2010-11-25 15:06:45 +01:00
Christian Kamm
b548ab16c8
QmlJS: Mark invalid urls and files in url properties as an error.
...
Reviewed-by: Erik Verbruggen
2010-11-25 15:06:44 +01:00
Christian Kamm
3f505e9982
QmlJS: Add initial 'Find Usages' support.
2010-09-24 14:11:06 +02:00
Christian Kamm
c7b3e3c81c
QmlJS: Speed up Link significantly, provide more info on imports.
...
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.
2010-09-16 15:51:21 +02:00
Christian Kamm
f3f3b96c85
QmlJS: Improve performance by avoiding two links in SemanticHighlighter.
...
Reviewed-by: Roberto Raggi
2010-08-31 10:39:07 +02:00
Christian Kamm
32bb7bffc0
QmlJS: Add missing null checks before using scopeChain().qmlTypes.
2010-08-30 13:35:35 +02:00
Christian Kamm
87e04df257
QmlJS: Refactor LookupContext creation for speed.
...
* If possible, create LookupContexts through SemanticInfo; it caches the
linked Context and will be faster.
* Contexts now own their Engine.
Reviewed-by: Lasse Holmstedt
2010-08-26 11:34:29 +02:00
Leandro Melo
e8ac7ead06
Make QML color validation code reusable.
...
Reviewed-by: ckamm
2010-08-02 14:56:55 +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
fadfe9c64e
QmlJS: Generalize EasingCurve name check to all enums.
...
Reviewed-by: Erik Verbruggen
2010-05-19 12:24:32 +02:00
Christian Kamm
b7b50edad5
QmlJS: Allow numbers to be assigned to easing.type.
...
Task-number: QTCREATORBUG-1439
2010-05-19 11:21:01 +02:00
Christian Kamm
bbf5bf611c
QmlJS: Change way to translate strings to nicer one.
...
Done-with: Erik Verbruggen
2010-04-28 10:32:45 +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
Erik Verbruggen
491bf79d5f
Changed QML reading in QML designer to use the interpreter for property types.
2010-04-06 11:46:36 +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
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
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
hjk
9595504bda
Long live the king!
2010-03-05 11:28:13 +01:00
Erik Verbruggen
9539a8dcb0
Changed error to warning when using a string literal for an ID.
2010-03-04 16:41:08 +01:00