Commit Graph

122 Commits

Author SHA1 Message Date
Eike Ziller
c99464dd9b TextEditors: Remove unnecessary duplicated caching
Change-Id: I3800360e3b9bd6874d6852dabcfc7a9a066e52c2
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-24 08:00:28 +01:00
Eike Ziller
3fa6b6737c TextEditors: Move font settings to document
Change-Id: I325764cbaa9684fa2758b0ea6c6ea58de142cb73
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-24 08:00:07 +01:00
Eike Ziller
4eff289e03 TextEditors: Remove widget's setTabSettings method
Change-Id: If212b45e2d526534b7853f3fa23b170f61e1976e
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-01-21 11:22:16 +01:00
Eike Ziller
2251958375 TextEditors: Avoid changing document after construction.
Also when duplicating editors, we don't want to change the document
after construction. Actually at some places (e.g. CppEditorSupport
creation) we don't handle document changes correctly, and we are only
lucky that things still (more or less?) work. Get rid of
BaseTextEditorWidget::duplicateFrom and use copy-constructor style instead.

Change-Id: I7f688b7fcc51d1bb5e222bb333f0d28479b597a6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-01-10 14:38:36 +01:00
Eike Ziller
236ea9efb9 Merge remote-tracking branch 'origin/3.0'
Conflicts:
	share/qtcreator/debugger/dumper.cpp
	share/qtcreator/debugger/dumper_p.h
	share/qtcreator/debugger/test/main.cpp
	src/plugins/debugger/gdb/classicgdbengine.cpp
	src/plugins/debugger/gdb/pythongdbengine.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.h
	src/plugins/debugger/lldblib/guest/main.cpp
	src/plugins/debugger/lldblib/ipcengineguest.cpp
	src/plugins/debugger/lldblib/ipcengineguest.h
	src/plugins/debugger/lldblib/ipcenginehost.cpp
	src/plugins/debugger/lldblib/ipcenginehost.h
	src/plugins/debugger/lldblib/lldbenginehost.cpp
	src/plugins/debugger/lldblib/lldboptionspage.cpp
	src/plugins/qbsprojectmanager/qbsstep.cpp
	src/plugins/qbsprojectmanager/qbsstep.h
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h
	src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp
	src/plugins/qnx/blackberrycheckdevmodestep.cpp
	src/plugins/qtsupport/debugginghelper.cpp

Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
2014-01-08 11:01:06 +01:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
Eike Ziller
8178f709c2 QmlJsEditor: remove empty function
Change-Id: Ifc694394ebde336de0b7d1492dedf840c9e9a8dd
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-12-18 11:37:37 +01:00
Nikolai Kosjar
11aeaea86f CppEditor: "Follow Symbol Under Cursor" for virtual functions
F2 on a virtual function call presents a list of overrides in derived
classes. The function declaration of the static type is shown
immediately at the top.

Task-number: QTCREATORBUG-9611

Change-Id: I80ce906fa06272dc9fbd1662cd17500b8c77067f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-10-01 14:23:00 +02:00
hjk
67c3fed2c0 QmlJSEditor: Rename QmlJSEditorEditable into QmlJSEditor
Change-Id: I710817ffd7bdf87aa6c0fed0f1f3cd4ea842fd01
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-06-07 16:20:38 +02:00
Fawzi Mohamed
1a201626ea qmljseditor: Improve speed of QML/JS Editor for large files
avoid using extra selections for warnings folding them into the
normal semantic update.

Extra selections impose a relatively large overhead (and need expensive
text cursor operations).
Unlike C++ Qml warnings are continuosly recomputed in the current file
of the editor, but not listed in the issue panel, unless one
explicitly triggers the qml checks.

Using the normal sematic update for warnings avoids QTextCursor
operations, and uses batched applies.

Unfortunately getting the tooltips from the additional formats instead
of using the extra selections requires private API, so Ranges are also
stored separately.

Change-log: [Qml/JS Support] Improved speed of QML/JS Editor for large files with lots of warnings.

Change-Id: I1f996231ef35d7cd77a79af58dbae2098fbbc83e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-02-18 00:19:50 +01:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Eike Ziller
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +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
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
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
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
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
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
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
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
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
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
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
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
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
Tobias Hunger
aa2acec14c Fix/add copyright headers
Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
2011-05-06 15:17:05 +02:00
hjk
8397663964 Update license. 2011-04-13 11:49:28 +02: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
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
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
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
5927137d13 Export QmlJSEditorEditable.
Rubber-stamped-by: Friedemann Kleint
2010-11-25 15:16:31 +01:00
Leandro Melo
36fa1de4c6 Editors: Refactor auto-complete code out of the editors for better reusability.
Reviewed-by: Thorbjorn Lindeijer
2010-11-09 11:01:47 +01:00