Commit Graph

229 Commits

Author SHA1 Message Date
Simjees Abraham
22e31ceb5b Qml Editor: Modified the file structure outline.
The file structure outline now displays the id and the property
values.

Task-number: QTCREATORBUG-6209
Change-Id: I33efe20aab71647bc863cff5b5434c47e8d452a4
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
2012-06-04 13:06:32 +02:00
Eike Ziller
3934347fe9 ActionManager API cleanup.
d-pointer instead of inheritance
static methods

Change-Id: I7b2f0c8b05ad3951e1ff26a7d4e08e195d2dd258
Reviewed-by: hjk <qthjk@ovi.com>
2012-05-25 10:08:24 +02:00
Aurindam Jana
b9bc68c370 QmlInspector: Fetch objects for location
Since the object tree is fetched lazily, we might have
objects whose debugIds are not known. In such cases,
objects can be fetched by passing the location info.

Change-Id: I2001460cc14401e011efef9be9194c9f7868d617
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-05-13 18:24:27 +02:00
hjk
21bf0046c3 editormanager: simplify use of interface
Less code on the user side, same meaning.

Change-Id: I14e54a5d2ed8e024a51cce74eaf7c8419ad544be
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-05-11 13:51:14 +02:00
Eike Ziller
2ae6d86e07 Don't add singleton model manager to object pool.
Change-Id: Iffca99867b25500fc77bbcf1e17a50a7cc4cf832
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-05-04 13:38:11 +02:00
hjk
d006ca80a6 texteditor: use an enum instead of QString as color ids
Change-Id: I658412c18d5ccfe978ec444451c6417ffb18d71c
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-05-03 13:11:25 +02:00
Kai Koehne
aca66125de QmlJSInspector: Remove dependency to QmlJSEditor
Change-Id: I6f90bff623437b25887bdd288987c013a45029be
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2012-04-16 16:55:54 +02:00
Kai Koehne
04ef376637 QmlJS: Move SemanticInfo from qmljseditor to qmljstools
This will allow us to remove the qmljsinspector->qmljseditor
dependency.

Change-Id: I234cf8645edb614e8b1f559a0f9bb6d43e2254c3
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2012-04-16 16:55:47 +02:00
Konstantin Tokarev
7ae82b9f94 Added TextEditor commands FollowSymbol and JumpToFile.
Most of editors have "jump to file" or "follow symbol" actions. This
patch reduces amount of related boilerplate code.

New actions are made optional to prevent shortcut clash (both use F2).

Change-Id: I2af580ed9d6789df25f4487ba001f3b83887c504
Reviewed-by: hjk <qthjk@ovi.com>
2012-03-28 08:38:41 +02:00
Eike Ziller
d66acb51d0 Rename IFile->IDocument and FileManager->DocumentManager
And adapt the other API respectively.

Change-Id: I1e04e555409be09242db6890f9e013396f83aeed
Reviewed-by: Bill King <bill.king@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-20 13:32:49 +01:00
Erik Verbruggen
3fa55b7ab9 Removed module names from #include directives.
Getting the #include directives ready for Qt5. This includes the
new-project wizards.

Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 16:24:46 +01:00
hjk
2931a499e6 Long live the king!
Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-26 19:55:36 +01:00
hjk
4a21f0c3c8 Use new static ICore interface.
Change-Id: I9b690d9b150c8d162b15370f9f8986267c9128f1
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-24 18:48:47 +01:00
Christian Kamm
7b9a42da15 QmlJS: Fix semantic info update triggering updates.
When a part of the semantic info update (such as a Link) triggers
QmlTextEditorWidget::updateSemanticInfo (for instance by requesting
QML plugin dumps) that update request was ignored because the *old*
semanticInfo revision was compared to the editor revision.

Instead, compare the *future* semantic info revision to check whether
an update would be accepted.

Also, instead of using the same snapshot, get a new one from the model
manager. Otherwise updates to libraryInfos won't be considered.

Change-Id: I0df6197bebce580129292aab5ca8cf24512a0fe7
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-12-02 15:07:01 +01:00
Christian Kamm
56bf0e3023 QmlJS editor: Simplify document/semInfo updating significantly.
* Instead of having SemanticInfoUpdater reparse documents itself, it now
  relies on the ModelManager doing that.
* SemanticInfoUpdater now takes a doc and snapshot to generate the
  convenience Context / ScopeChain. Could be converted into a future
  to avoid having a (99% idle) thread per editor.
* Renamed several functions in QmlJSTextEditorWidget to better indicate
  their behavior.

Change-Id: I8af6ccab099130fa7fa227e44864561ca2c3f9e0
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-11-21 15:49:49 +01:00
Christian Kamm
a5b26a32b3 QmlJS: Add 'reformat' action which regenerates the whole file.
Change-Id: I0aed6c6e197e122200d720eb9291a083095a6299
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-11-15 11:31:40 +01:00
Eike Ziller
85cf2b661e Merge remote-tracking branch 'origin/2.4'
Conflicts:
	src/libs/qmljs/qmljsinterpreter.cpp
	src/libs/qmljs/qmljsinterpreter.h
	src/plugins/debugger/qml/scriptconsole.cpp
	src/plugins/git/gitplugin.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas_p.h

Change-Id: Iad59c8d87c72a21c79c047e374c0ab689998af39
2011-11-11 09:46:25 +01:00
hjk
82f5573626 more Id type fixes
Change-Id: I3720946ba5485696822976567d83b4d6cb1fb283

x

Change-Id: Iab58bc34bc56371405d132315573b484a533b77c
Reviewed-by: hjk <qthjk@ovi.com>
2011-11-10 15:57:09 +01:00
hjk
31600758de all: s/info@qt.nokia.com/qt-info@nokia.com/
Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-11-03 10:33:19 +01:00
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