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
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>
- 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.
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
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
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
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.
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
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.
* If possible, create LookupContexts through SemanticInfo; it caches the
linked Context and will be faster.
* Contexts now own their Engine.
Reviewed-by: Lasse Holmstedt
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 ...
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.