Commit Graph

260 Commits

Author SHA1 Message Date
Christian Kamm
f366754462 Move shared code to a new QmlJSTools plugin.
Reviewed-by: Thomas Hartmann
2010-11-11 11:49:10 +01:00
dt
4ac7253205 Merge remote branch 'origin/2.1'
Conflicts:
	share/qtcreator/static.pro
	src/plugins/cppeditor/cppeditor.cpp
	src/plugins/qmljseditor/qmljseditor.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemodeploystepwidget.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemodeploystepwidget.ui
	src/plugins/qt4projectmanager/qtoutputformatter.cpp
	src/plugins/texteditor/generichighlighter/highlightersettings.cpp
2010-11-10 17:02:40 +01:00
Leandro Melo
fb46c31934 Plain text editor: Make sure user setting about folding markers is used
It was being reset based on the highlighter definitions.

Consider some refactoring with the related options as well to avoid
overriding user's settings.

Done-with: Thorbjorn Lindeijer
2010-11-10 16:05:10 +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
Leandro Melo
3a684586fa Editors: Refactor indenters out of the editors for better reusability.
Reviewed-by: ckamm
2010-11-05 14:28:38 +01:00
Friedemann Kleint
68d4d35cae Coreplugin: Header cleanup.
Clean icore.h.
2010-11-02 16:53:56 +01:00
Friedemann Kleint
77008bc45f Exported Header cleanup: QmlJSEditor
Move internal classes QmlJSEditorEditable/SemanticHighlighter
out of qmljseditor.h. Move QmlJSEditor from namespace
QmlJSEditor::Internal to QmlJSEditor.

Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2010-11-02 11:10:27 +01:00
Friedemann Kleint
6063fb84c2 Fix exported headers in Core and TextEditor.
- Unexport Core::Internal::MainWindow and remove its includes.
- Move RssFetcher from Core::Internal to Core.
- Unexport CopyTaskHandler.
- Move TextEditor's completion support and Refactor Overlay
  helper classes from TextEditor::Internal to TextEditor as they
  are exported.
- Move internal BaseTextBlockSelection into private header.
- Unexport TextEditorOverlay as they are not used.
2010-11-01 16:29:45 +01:00
Oswald Buddenhagen
a9ff4d3749 Merge remote branch 'origin/2.1'
Conflicts:
	doc/qtcreator.qdoc
2010-11-01 12:11:03 +01:00
Friedemann Kleint
722e48c2b3 TextEditor: Some exported header cleanup.
Remove internal markers from exported headers,
introduce private class for BaseTextDocument.

Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2010-10-29 15:20:10 +02:00
Christian Kamm
592396c254 QmlJS: Fix member completion at the end of a nested object definition.
The parser's error recovery generates three nested object definitions
for code like
Item { Item { font } }
where the innermost definition corresponds to 'font }' and has an empty
lbrace token.

If we create a Range for this recovered definition, code completion will
fail for 'font.'.

Task-number: QTCREATORBUG-2767
Reviewed-by: Roberto Raggi
2010-10-27 11:32:24 +02:00
Thomas Hartmann
0a043df690 QmlJsEditor: fixes warning
Reviewed-by: Lasse Holmstedt
2010-10-21 16:12:57 +02:00
Thomas Hartmann
408214486f QuickToolBar: reduce usage of lookup context
Getting the lookup context is expensive. So it is now done only
on user interaction.




Reviewed-by: Roberto Raggi
2010-10-21 15:42:26 +02:00
Thomas Hartmann
ff5eb00643 QuickToolBar: do not show QuickToolBar as tooltip anymore.
Most users perceived this as a bug and found it annoying in
practice. So this feature gets removed.

Reviewed-by: Roberto Raggi
2010-10-21 15:42:26 +02:00
Christian Kamm
5e4fe5260b QmlJS: Fix newly parsed document not being added to the snapshot copy.
This was the root cause of several issues with scoping and import
resolution. For instance, finding the components that instantiate a
component that's opened in the editor failed; leading to code
completion missing valid entries.

Reviewed-by: Erik Verbruggen
Reviewed-by: Roberto Raggi
2010-10-19 11:57:42 +02:00
Christian Kamm
836366c187 QmlJS: Force a semantic check when library information changes.
Task-number: QTCREATORBUG-2640
Reviewed-by: Roberto Raggi
2010-10-15 10:09:40 +02:00
Thomas Hartmann
81c521eb01 QtQuickToolBar: enabling by hovering (ToolTip)
The Quick ToolBar now also gets enabled by hovering on
an item defintion.
It is shown 1 second after the tooltip.


Reviewed-by: Christian Kamm
2010-10-08 15:28:59 +02:00
Thomas Hartmann
864ebf5bcd QtQuickToolbar: disabling tooltip hoovering
This feature is not polished enough for the beta

Reviewed-by: dt
2010-10-06 15:04:52 +02:00
Christian Kamm
70c189e2bd QmlJS: Fix instances of using lookupContext() on invalid info.
Task-number: QTCREATORBUG-2594
Done-with: Thomas Hartmann
2010-10-04 14:36:09 +02:00
Thomas Hartmann
4c185a9ac4 QmlDesigner.model: rename id is now a proper refactoring operation
I an id is now changed in the navaigator or property editor,
we now use the qmljseditor to properly refactor.

Also I changed dynamic_cast to qobject_cast

Reviewed-by: Erik Verbruggen
2010-09-30 17:43:19 +02:00
Daniel Molkentin
5cf1aaf67d Fix compilation and initialization compile warnings.
Reviewed-by: Alessandro Portale
2010-09-29 19:35:25 +02:00
Thomas Hartmann
f5b4668fa5 QmlJsEditor: combine the Quick ToolBar with the toolTip
1000ms after a tooltip is shown we now also show the quick toolbar

Reviewed-by: Erik Verbruggen
2010-09-29 16:58:54 +02: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
97c07292aa Qml: Make import classification in Bind less verbose. 2010-09-16 15:51:21 +02:00
Erik Verbruggen
0c98d830b8 QML: brought context menu in sync with C++ editor. 2010-09-16 12:57:45 +02:00
dt
08ccda5862 EditorManager: Change openEditor/activateEditor to not do mode switching
Also introduce a indirection, modes have now types, edit and debug have
the same type, and editors do have a prefered type of modes instead of a
prefered mode.

That fixes the bug that if the prefered qml editing mode was set to
design, then in switching between qml editors would
- in Edit Mode: stay in edit mode
- in Debug Mode: switch to debug mode
2010-09-14 15:23:11 +02:00
Thomas Hartmann
edebca70ed QmlJSEditor: changing behaivour of text markers
The delay was increased to 500 ms and the marker only
appears now, if the cursor is directly on the type name.

This way the text marker creates less visual noise.
2010-09-08 16:36:19 +02:00
Roberto Raggi
7df679c019 Increased the interval to update QML/JS documents to 100ms. 2010-09-08 12:53:22 +02:00
Roberto Raggi
e33767205b Introduced SemanticInfo::isValid(). 2010-09-08 11:39:24 +02:00
Roberto Raggi
23a5f173b1 Check the traling text before inserting closing braces. 2010-09-03 14:54:52 +02:00
Kai Koehne
2bbc9643ff Fixes crash when opening a .qml file from command line
Hopefully fixes crash when opening a .qml file from the command line
(mac os x).
2010-09-03 14:37:52 +02:00
Thomas Hartmann
70e658680b QuickToolBar: bugfix
If we stay inside the node we keep the text marker
2010-09-01 11:55:04 +02:00
Thomas Hartmann
36a955fa1e QuickToolbar: unifies naming to Quick ToolBar and clarifies tooltips 2010-09-01 11:55:03 +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
f49a85953b QmlJS: Compute link in SemanticHightlighter thread instead of lazily.
It's used very often, so lazy computation (potentially in the gui
thread) was too expensive.

Reviewed-by: Kai Koehne
2010-08-30 13:49:23 +02:00
Christian Kamm
654d94a8c1 QmlJS: Fix uses of ids not being updated correctly.
updateUses() has to be called for cursor position changes.

Done-with: Kai Koehne
2010-08-30 12:11:22 +02:00
Lasse Holmstedt
1f1dcfdec1 QML Observer: Fixed updating of selected items 2010-08-27 13:12:05 +02:00
Lasse Holmstedt
2fe7317981 Fixed typo 2010-08-27 13:12:05 +02:00
Kai Koehne
12feb86975 Don't update uses highlight in when updating outline
updateUses() is already called after each text change.
2010-08-26 13:44:37 +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
Kai Koehne
6cf563bb25 QmlOutline: Cut down update times considerably
Cut down update times of Outline by a magnitude by only emitting
itemChanged signal if absolutely needed. This doesn't include the change
of the icon, because QIcon is missing a comparison operator ...
2010-08-25 13:28:04 +02:00
Lasse Holmstedt
fe55ba5cd2 QML Inspector: Don't update debug id's when not debugging
Creating LookupContext seems to be expensive, so don't update anything
unless debug mode is already running.
2010-08-24 17:46:22 +02:00
Kai Koehne
cfa1bed0cb QmlOutline: Increase delay before doing an update to 500ms
Use same delay as in cppeditor. Hopefully prevents the Outline to be
updated while typing.
2010-08-24 14:35:04 +02:00
Kai Koehne
ef1e52dfd1 Merge branch '2.0' of scm.dev.nokia.troll.no:creator/mainline
Conflicts:
	doc/qtcreator.qdoc
	doc/qtcreator.qdocconf
	share/qtcreator/gdbmacros/dumper.py
	share/qtcreator/gdbmacros/gdbmacros.py
	src/plugins/debugger/debuggermanager.cpp
	src/plugins/debugger/gdb/attachgdbadapter.cpp
	src/plugins/debugger/gdb/gdbengine.cpp
	src/plugins/debugger/watchhandler.cpp
	src/plugins/mercurial/mercurialjobrunner.h
	src/plugins/qmljseditor/qmljseditor.cpp
	src/plugins/qmljseditor/qmljseditor.pro
	src/plugins/qmljseditor/qmljseditorplugin.cpp
	src/plugins/qmljseditor/qmljseditorplugin.h
	src/plugins/qmljseditor/qmljspreviewrunner.cpp
	src/plugins/qmljseditor/qmljspreviewrunner.h
	src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec
	src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
	src/plugins/qt4projectmanager/qt-maemo/qemuruntimemanager.cpp
	src/plugins/qt4projectmanager/qt4projectmanager.pro
	src/plugins/qt4projectmanager/qtversionmanager.h
	src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp
	src/plugins/qt4projectmanager/wizards/targetsetuppage.h
2010-08-23 16:00:24 +02:00
Kai Koehne
420a2b4e6e QmlEditor: Remove QtQuick->Preview from tools menu
This only works when a qmlviewer is in the PATH, which is non obvious.
Removing the feature therefore completely.
2010-08-19 17:15:40 +02:00
Thomas Hartmann
cb7b38790f QmlJSEditor: QuickToolBar stays visible on wheelEvent
The mouse wheel should not hide the QuickToolBar
2010-08-17 15:41:35 +02:00
Thomas Hartmann
d7956ad2e0 QmlJSEditor: bugfix
We have to check for  m_oldCursorPosition != -1
to avoid calling apply() in the case of a TextMarker
update. Otherwise the QuickToolBar misbehaves.

I also removed the comment.
2010-08-13 17:22:23 +02:00
Thomas Hartmann
abdda35966 QmlJSEditor: refines textmarker logic
The textmarker is now updated when the document
gets updated and the textmarker is shown again,
if the user closes the QuickToolBar.
2010-08-13 17:22:20 +02:00
Christian Kamm
538f611503 Indenters: Move style setup into the QtStyleCodeFormatter constructors.
This makes sure styles are consistent for the editor and the quick fix
engine.
2010-08-12 14:21:35 +02:00