Commit Graph

260 Commits

Author SHA1 Message Date
Christian Kamm
c8fc9b33ae QmlJS: Clean up idOfObject() and folding text code.
Change-Id: Id3e9d24689c67ce0e12b12b82636177a0344ede1
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-10-28 15:49:38 +02:00
Nicolas Arnaud-Cormos
635ca2a51a QmlEditor: show the id name when folding a block.
If the id of an element exists, it will be displayed instead of the normal "..."

Change-Id: I4e6633743b0e2ae014b7fbad3c752ef318c73659
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2011-10-22 21:11:32 +02:00
Christian Kamm
0ed824762c QmlJS checks: Suppression of static analysis messages.
* Use '// @disable M123' to suppress
* Add quick fix to add these comments

Change-Id: I499f5a6004148afbb346218c6fb01c9ca77b9f73
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-10-19 15:09:35 +02:00
Christian Kamm
4a487b1add QmlJS indenter: Move reusable code to qmljs lib.
Change-Id: I5ab50b586109a9736cda48245807571ce10dfb5b
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-10-19 08:33:21 +02:00
Christian Kamm
a7f78991c9 QmlJS: Move commonly used functions to qmlutils.h.
Change-Id: I22376d96fe575bc00a55094c06af80e32a5587e6
Reviewed-on: http://codereview.qt-project.org/6238
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
2011-10-10 09:36:12 +02:00
Christian Kamm
fdd0a15ef4 QmlJS: Separate metaObjectRevision from minor version number.
They need not to be identical. Additionally:
* Rename ImportInfo::name to path, because that's what it does.
* Add ImportInfo::name, for getting the uri with the names
  separated by dots.
* Allow for exportMetaObjectRevisions in qmltypes files.
* Allow for exports with an empty type name, as generated by
  qmlRegisterRevision. They are used for associating meta object
  revisions with non-exported types.
* Rewrite the Qt 4.7 import to QtQuick 1.0 at an early stage. In
  preparation for the Qt 5 type information update, where Qt 4.7
  is gone.

Change-Id: Ia287193623d9530a56b9eb8d2481d50aabd94c3e
Reviewed-on: http://codereview.qt-project.org/5309
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-09-26 12:04:16 +02:00
Christian Kamm
4b2f42cf87 QmlJS: Adjust existing code for updated QML parser.
Change-Id: I153723eeb9973be025daf47e317f7b9d076a3c72
Reviewed-on: http://codereview.qt-project.org/4733
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
2011-09-14 11:48:22 +02:00
Christian Kamm
5b88093b5d QmlJS semantic highlighter: Abort when file changes.
Fixes the warning in incrementalApplyExtraAdditionalFormats being
triggered when the document is reduced in size while a highlight is
running.

Change-Id: I60e0c8772d511f52ee433d27cc77ba726030b354
Reviewed-on: http://codereview.qt-project.org/4661
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-12 13:30:09 +02:00
hjk
488330255d core: rename uniqueidmanager.{cpp,h} as the class UniqueIdManager is gone
Change-Id: Iffe04bc3bb0103cbac605f0734bbfd66eb7fd854
Reviewed-on: http://codereview.qt.nokia.com/4215
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: hjk <qthjk@ovi.com>
2011-09-05 18:04:55 +02:00
Christian Kamm
c105ae47c1 QmlJS: Add semantic highlighting.
Change-Id: If9293244075cff1a52801b50cdbb77248ecd21ea
Reviewed-on: http://codereview.qt.nokia.com/3310
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-08-24 11:30:20 +02:00
Friedemann Kleint
2f92eae7bc Utils/Coreplugin: Clean headers.
Change-Id: I1e0d432127651622d40ff990e1866eac9fac46a0
Reviewed-on: http://codereview.qt.nokia.com/3091
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-08-17 12:58:38 +02:00
Christian Kamm
676036a1c8 QmlJS: Allow for more markers than just Qt Quick Toolbar.
Change-Id: Id132b2fd42034a354baa548760083ca47d62697b
Reviewed-on: http://codereview.qt.nokia.com/2904
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-08-15 12:54:38 +02:00
Christian Kamm
e768fbf5d1 QmlJS: Rename SemanticHighlighter -> SemanticInfoUpdater.
Since it doesn't do any highlighting...

Change-Id: I45d20735535fa1885153a725d0ca894326ce53db
Reviewed-on: http://codereview.qt.nokia.com/2862
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-08-12 08:28:36 +02:00
Christian Kamm
ab3c256338 QmlJS: String literals with file names link to files.
Task-number: QTCREATORBUG-5701
Change-Id: If8e0cf2ba685de6fb5d2d11cff05d0dd5893ff82
Reviewed-on: http://codereview.qt.nokia.com/2775
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-08-10 11:56:16 +02:00
Christian Kamm
c879b9aeed QmlJS: Make the astPath available.
Change-Id: Ice51730ee118723dbd755467dd221eb9940775fd
Reviewed-on: http://codereview.qt.nokia.com/2774
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-08-10 11:56:09 +02:00
Christian Kamm
0e54183d4d QmlJS: Remove Interpreter namespace.
The distinction between QmlJS and QmlJS::Interpreter has always been
weak and the extra namespace just added an unnecessary complication.

Change-Id: I4db8ef4bd91b5f6bf610a9d23fdbf55bd60250fc
Reviewed-on: http://codereview.qt.nokia.com/2743
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-08-08 13:21:28 +02:00
Christian Kamm
ff092f79b3 QmlJS: Remove LookupContext.
Use Context or ScopeChain instead.

Change-Id: I2489477eac08774ba41710ee81876aab11b5af24
Reviewed-on: http://codereview.qt.nokia.com/1699
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-08-08 12:28:55 +02:00
Christian Kamm
9dc9674c6b QmlJS: Share Context.
Previously Context was not entirely thread safe and had to be
copied locally. Now it is thread safe and its lifetime
managed by QSharedPointer.

The non-safe parts were moved into ScopeChain in a previous commit.

Change-Id: I851a93de85cbd6391dbea0fe33b011e2e093addb
Reviewed-on: http://codereview.qt.nokia.com/1695
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-08-08 12:05:19 +02:00
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
Oswald Buddenhagen
65c0eb5165 Merge branch '2.3'
Conflicts:
	src/plugins/debugger/qml/qmlengine.cpp

Change-Id: I46509f0c187b71bbaed7b2118a160914f8250ca4
2011-07-29 17:57:59 +02:00
Thomas Hartmann
422d825dc2 QmlJSEditor: only show context menu for Quick Toolbar if available
Task-number: QTCREATORBUG-4521
Change-Id: Iedd97549c6f724b58a0727694ea1b34a2c70d9e9
Reviewed-on: http://codereview.qt.nokia.com/2264
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
2011-07-27 11:27:18 +02:00
Christian Kamm
51d8f468e4 QmlJS: Remove old 'Rename id' action.
Replaced by superior 'Rename Symbol Under Cursor'.

Change-Id: I0d0367d1297fde37d501266ef7df515256c6abd7
Reviewed-on: http://codereview.qt.nokia.com/1428
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
2011-07-11 15:01:59 +02:00
Christian Kamm
35cb3793a1 QmlJS: Implement renaming of usages.
Task-number: QTCREATORBUG-3669
Change-Id: I2c600cae5ac445ca80eafe6557ba276c14a77a73
Reviewed-on: http://codereview.qt.nokia.com/1413
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-07-11 14:40:27 +02:00
Christian Kamm
7d67959366 QmlJS: Add UiScriptBinding range if it has a script block.
Makes completion in code bindings have the right scope.

Change-Id: Ib76840cf7be5ab0a3c573e9ad087359816a9ced6
Reviewed-on: http://codereview.qt.nokia.com/1046
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-07-05 11:59:23 +02:00
Christian Kamm
e2ea5a8421 QmlJS: Rename range-related functions.
astPath -> rangePath
To make it more explicit that it does not return the full ast path.

declaringMember -> rangeAt
Since things like function expressions and declarations and grouped
property bindings are also ranges and returned by this function.

Change-Id: I70cc99f21635b21dd6f3088a6e5782d84f6f108a
Reviewed-on: http://codereview.qt.nokia.com/1045
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-07-05 11:52:57 +02:00
Oswald Buddenhagen
1d78e594d8 Merge branch '2.2'
Conflicts:
	qtcreator.pri
	share/qtcreator/qml/qmlpuppet/instances/objectnodeinstance.cpp
	src/libs/qmljs/qmljsdocument.cpp
	src/libs/qmljs/qmljsinterpreter.cpp
	src/libs/qmljs/qmljsinterpreter.h
	src/libs/qmljs/qmljslink.cpp
	src/plugins/cppeditor/cppquickfixes.cpp
	src/plugins/qmldesigner/extrasplugin/extrasplugin.cpp
	src/plugins/qmldesigner/qmldesigner.pro
	src/plugins/qmldesigner/symbianplugin/symbian.metainfo
	src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h

Change-Id: Id5f754e2837a3bb3e0687ed09f1dda45fd0c5617
2011-06-23 19:47:50 +02:00
Christian Kamm
aee9a55a81 QmlJS: Fix missing rehighlight if other file changes.
When QML modules with many source files were loaded, the
rehighlight from the found library was done before the files
contained in the library were done parsing.

This way any updated document will eventually lead to the
current editor rehighlighting.

Reviewed-by: Erik Verbruggen
Change-Id: I0f4d18390d3e0ee17cd255c68496f61479f82f05x
Reviewed-on: http://codereview.qt.nokia.com/382
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: hjk <qthjk@ovi.com>
2011-06-08 13:30:47 +02:00
Christian Kamm
779fafcbfe Make C++ code style configurable.
Change-Id: Iaf08edb2361146e6b5e1cbafdb716a23c938875b
Done-with: Jarek Kobus
Task-number: QTCREATORBUG-2670
Task-number: QTCREATORBUG-4310
Task-number: QTCREATORBUG-2763
Task-number: QTCREATORBUG-3623
Task-number: QTCREATORBUG-567
Reviewed-on: http://codereview.qt.nokia.com/74
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-05-24 12:45:07 +02:00
Leandro Melo
bec4f02495 New code assist API
This is a re-work of our completion engine. Primary goals are:

- Allow the computation to run in a separate thread so the GUI is not locked.
- Support a model-based approach. QStrings are still needed (filtering, etc), but
internal structures are free to use more efficient representations.
- Unifiy all kinds of *assist* into a more reusable and extensible framework.
- Remove unnecessary dependencies on the text editor so we have more generic
and easily "plugable" components (still things to be resolved).
2011-05-18 10:46:20 +02:00
Oswald Buddenhagen
9ac137fb06 add auto-saving of modified editors
Task-number: QTCREATORBUG-2847
2011-05-12 20:10:03 +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
Oswald Buddenhagen
fae7dc9584 add errorString output argument to IFile::reload() & IEditor::open()
add/unify read error handling in all affected classes
2011-04-18 14:10:13 +02:00
Oswald Buddenhagen
dc3c156cac Merge branch '2.2'
Conflicts:
	src/plugins/debugger/gdb/pythongdbengine.cpp
	src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp
	src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.h
	src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp
	src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.h
	src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurations.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
	src/plugins/qt4projectmanager/qt-maemo/qt4maemotargetfactory.cpp
	src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp
	src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp
	src/plugins/qt4projectmanager/qt4target.cpp
	src/plugins/qt4projectmanager/qt4target.h
	src/plugins/qt4projectmanager/qtoptionspage.h
	src/plugins/qt4projectmanager/qtversionmanager.cpp
	src/plugins/welcome/welcomemode.cpp
2011-04-14 12:39:31 +02:00
hjk
70d392d235 core: make context and widget IContext data members 2011-04-14 11:15:07 +02:00
hjk
8397663964 Update license. 2011-04-13 11:49:28 +02:00
Thomas Hartmann
2731f42e8d QmlJsEditor: hide context pane if last document is closed
Task-number: QTCREATORBUG-3702
Reviewed-by: Christian Kamm
2011-03-17 10:44:30 +01:00
Thorbjørn Lindeijer
70b70770a4 Fixed layout issues in some editor toolbars
Cleaned up some hacky code in the process.

Done-with: Tobias Hunger
2011-02-25 16:11:20 +01:00
hjk
f576ad9f2c texteditor: merge ITextEditable into ITextEditor
rename BastTextEditor->BaseTextEditorWidget, BaseTextEditorEditable->BaseTextEditor
rename BaseTextEditor{,Widget} subclasses
rename editableInterface->editorInterface
rename createEditableInterface->createEditor
minor cleanups after renamings
2011-02-22 11:23:53 +01:00
Christiaan Janssen
f5039a4a02 QmlJsInspector: implemented Property Inspector
Reviewed-by: Kai Koehne
2011-01-20 15:11:39 +01:00
Christian Kamm
ef5dc8c699 QmlJS: Avoid frequent libraryInfoUpdated emissions.
Also don't require a rehighlight of every open document when the
signal is emitted.

Reviewed-by: Roberto Raggi
2011-01-12 14:03:01 +01:00
con
d1023c7614 It's 2011 now.
Reviewed-by: hjk
2011-01-12 09:46:24 +01:00
mae
4226538ac3 Fix QML to UTF-8, unless changed in editor
Task-id: QTCREATORBUG-3424
2010-12-20 18:11:44 +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
Roberto Raggi
b4e421062f Removed stray tokens and fixed warnings/errors when compiling with pedantic C++ compilers. 2010-12-16 12:05:48 +01:00
Roberto Raggi
ea5d923fe0 Don't waste time rehighlighting all the files opened in Creator. 2010-12-14 15:06:01 +01:00
Leandro Melo
7528c6d617 Snippets: Feature enhancement start...
Provide an interface so users can create/edit/remove snippets.
2010-12-08 17:22:07 +01:00
Christian Kamm
5f196cf5b8 QmlJS: Make follow symbol work with member properties.
A full evaluate() call resolves the property and continues to the
underlying type. If we use Evaluate::reference() instead, we only the
first step is done and we can get at the source location if a
ASTPropertyReference is returned.

Reviewed-by: Erik Verbruggen
2010-11-16 15:30:54 +01:00
Christian Kamm
f7a077b1fa QmlJS: Avoid infinite loop with recursive prototypes. 2010-11-15 10:36:22 +01:00