Commit Graph

406 Commits

Author SHA1 Message Date
Leandro Melo
9946711166 QmlJS: Don't detect type from expression if the type is given explicitly.
To make sure
property color foo: "white"
is of type color, not string.

Done-with: ckamm
2010-07-27 13:43:51 +02:00
Leandro Melo
302e93d67f QmlJS: Set type correctly for color properties.
Done-with: ckamm
2010-07-27 13:43:50 +02:00
Olivier Goffart
713e4c2621 QmlJsDelta: give a valid label to the UiScriptBinding 2010-07-27 11:56:59 +02:00
Olivier Goffart
0ba5dc8d58 QmlJsDelta: Fix the fact that sometimes, when inserting items, the new item could match the next item 2010-07-26 13:09:56 +02:00
Kai Koehne
be777c647e QmlJS: Fix compilation warning 2010-07-23 07:46:05 +02:00
Olivier Goffart
f24216bdbb QmlJsDelta: moved to the QMLJS library
Also used 'int' instead of QDeclarativeDebugObjectReference for
the debug id in order not to use the private API from QMLJS
2010-07-21 14:27:38 +02:00
Kai Koehne
2e949c7015 QmlJS Rewriter: Remove empty grouped properties
Also remove grouped properties if the last member is removed via removeObjectMember
(removeBindingByName already takes care of this).
2010-07-21 14:14:10 +02:00
Kai Koehne
35e787e61c QmlJS Rewriter: Unify method names
changeProperty->changeBinding
removeProperty->removeBindingByName
2010-07-21 14:14:10 +02:00
Kai Koehne
74e8027a7b QmlJS Rewriter: Return ranges for addX methods
This way one can reindent afterwards.

Reviewed-by: Erik Verbruggen
2010-07-21 14:14:10 +02:00
Kai Koehne
715aafaba5 QmlJS Rewriter: Allow disambiguation of where ObjectMember should be added to
With 700975ade3 one could specify that a UiObjectMember should be inserted
after another one. But 0 'the default parameter' was ambiguous in that
either you want to have it inserted at the beginning of the member list,
or the heuristics should be applied.

Make this explicit by providing two methods.
2010-07-21 14:14:09 +02:00
Thomas Hartmann
4b863d554e QmlJS.propertyReader: check for bindings in gradients 2010-07-21 13:00:10 +02:00
Kai Koehne
7f01593b94 Compile fix 2010-07-20 15:26:57 +02:00
Kai Koehne
700975ade3 QmlJS: ALlow users of the Rewriter to specify where to insert stuff 2010-07-20 15:23:16 +02:00
Kai Koehne
3b48da9391 QmlJs: Fix corner case in Rewriter (whitespace handling)
Done by erikv
2010-07-20 15:06:28 +02:00
Kai Koehne
f0912bfe23 QmlJS: Make rewriter methods static
Done by erikv
2010-07-20 12:48:19 +02:00
Kai Koehne
7f5c790358 Compilation fix (MSVC) 2010-07-16 11:34:01 +02:00
Christian Kamm
8519ca11c3 QmlJS: Allow 'follow symbol' to jump to the target of a file import.
Task-number: QTCREATORBUG-1736
2010-07-16 11:17:10 +02:00
Christian Kamm
4ecf0349c5 QmlJS: Make 'follow symbol' work on JS functions.
Task-number: QTCREATORBUG-1757
2010-07-16 10:50:28 +02:00
Thomas Hartmann
c03f2b03b2 QmlJS::IContextPane adapting the interface
closing windows with escape is now stacked again
2010-07-15 16:45:34 +02:00
Thomas Hartmann
5b3bf7f486 QmlJS::PropertyReader: extends class
PropertyReader now is able to parse ObjectDefinitions
and it is also possible to parse gradients.

I also added isBindingOrEnum()
2010-07-15 16:45:32 +02:00
Erik Verbruggen
65d061218f Added ast-to-.dot "dump" utility for QML ASTs. 2010-07-15 09:55:28 +02:00
Kai Koehne
e99a380aef QmlJS: Add missing file 2010-07-14 14:15:18 +02:00
Kai Koehne
f00225a0f5 QmlOutline: Also show custom properties
Also show properties defined in the component, e.g. by 'property x',
in the outline.
2010-07-14 13:34:19 +02:00
Kai Koehne
ce32f25ba3 QmlOutline: Show icons for known types 2010-07-14 11:40:11 +02:00
Thomas Hartmann
db8122ee30 remove qDebug 2010-07-14 10:42:23 +02:00
Thomas Hartmann
45624603b5 qmljspropertyreader: chops ';' 2010-07-09 18:09:01 +02:00
Thomas Hartmann
cb296f49b0 qmljsrewriter: fix rewriting issue
We have to keep the line ending in case the removed
property is not the only thning in that line
2010-07-09 18:08:00 +02:00
Thomas Hartmann
97eb3e1304 qmljsrewriter: fixes removing of properties 2010-07-09 16:10:12 +02:00
Thomas Hartmann
74610a9137 QmlDesigner: change interface for context pane 2010-07-09 16:10:09 +02:00
Christian Kamm
6ee1027eaa Add missing license headers. 2010-07-09 15:47:25 +02:00
Roberto Raggi
d70fe1eb61 Introduced QmlJS::LookupContext. 2010-07-08 14:50:25 +02:00
Christian Kamm
a2ae7eae4c Qml scanner: Don't emit token for empty line in multi-line comment.
Done-with: Thomas Hartmann
2010-07-08 14:32:02 +02:00
Christian Kamm
db9b630b48 Qml scanner: Fix begin location of comment tokens in multiline comments.
Done-with: Thomas Hartmann
Reviewed-by: Roberto Raggi
2010-07-08 14:20:30 +02:00
Kai Koehne
1541dec6f3 Add Icons provider to QmlJS library
Add an Icons class to QmlJS along the Icons class in the C++ support.
This will be used in the QmlJS Outline.
2010-07-08 14:02:51 +02:00
Roberto Raggi
ef5aaa0368 Renamed QmlJS::Document::documentRevision(). 2010-07-07 17:52:46 +02:00
Thomas Hartmann
fb1ae30293 qmljsrewriter: adapt rewriter to ChangeSet api changes 2010-07-07 13:09:55 +02:00
con
1a2a4f6387 Merge remote branch 'origin/2.0'
Conflicts:
	share/qtcreator/gdbmacros/dumper.py
	src/libs/qmljs/qmljs-lib.pri
	src/plugins/fakevim/fakevimhandler.cpp
2010-07-06 15:34:50 +02:00
Thomas Hartmann
9d70d66878 Adding interface for context widget to qmljs lib 2010-07-06 11:22:51 +02:00
con
9265494289 Merge remote branch 'origin/2.0'
Conflicts:
	src/libs/qmljs/qmljs-lib.pri
	src/plugins/debugger/gdb/gdbengine.cpp
	src/plugins/debugger/gdb/gdbengine.h
	src/plugins/qmldesigner/components/itemlibrary/itemlibrary.cpp
2010-07-01 11:41:36 +02:00
Thomas Hartmann
40ce22896f Created a utility property reading class 2010-06-30 17:51:21 +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
Erik Verbruggen
21b211fed0 Created a utility rewriting class from existing visitors. 2010-06-30 13:42:35 +02:00
Christian Kamm
38e8c0dfd0 QmlJS: Set the return value of the JS type constructors.
Task-number: QTCREATORBUG-1737
Reviewed-by: Erik Verbruggen
2010-06-28 09:49:45 +02:00
Christian Kamm
c4a979a99f QmlJS: Fix completion for slots.
When reading the xml file describing the Qml types, we incorrectly
classified all functions as methods. They should be slots, since
otherwise qmldump couldn't have dumped them in the first place.

Task-number: QTCREATORBUG-1755
Reviewed-by: Erik Verbruggen
2010-06-28 09:45:37 +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
a34676238f QmlJS: Remove unused Bind::currentObjectValue.
The function was not used and made no sense.
2010-06-22 13:36:54 +02:00
Christian Kamm
16b4e4e91f QmlJS: Fix import path handling in the model manager.
Previously, the model manager always had exactly one import path - but
you can open more than one Qml project at once. Now, we store the union
of all import paths in the model manager.

Reviewed-by: Roberto Raggi
2010-06-22 13:25:22 +02:00
Christian Kamm
24d0f694d1 QmlJS: Remove unused functions from Snapshot.
Reviewed-by: Erik Verbruggen
2010-06-21 13:03:30 +02:00
con
458a25efa9 Merge remote branch 'origin/2.0'
Conflicts:
	doc/qt-html-templates.qdocconf
	src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp
	src/plugins/qmljseditor/qmljscodecompletion.cpp
2010-06-18 16:54:37 +02:00