The newest kate definition files for cmake contain no mimetype for the
cmake definitions, which lead to us not finding the right definition.
Instead add a method to find the definition based on the name, which
is not as generic, but we know which one we want for cmake anyway.
Task-number: QTCREATORBUG-13588
Change-Id: Ib57fe531a225310c32ca1ef909a31bd7f52c612f
Reviewed-by: Guilhem Vallat <guilhem.vallat@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
... to the editor factories and pass it to the document, not the widget.
Saves some code, puts fewer objects into the object pool.
Change-Id: Iaaf250af74dc4e0c62700873accbb40ba88b7d9e
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
... and some of the related implementation details
Change-Id: I1f03aa5acf2d3fb2cfc2a6a7845f3d3578b0408d
Reviewed-by: David Schulz <david.schulz@digia.com>
First step of some more 'Base' removal in TextEditor.
s/Core::TextDocument/Core::BaseTextDocument/
s/TextEditor::BaseTextDocument/TextEditor::TextDocument/
Change-Id: I71ba325a2f0ad72ec9dae0d96846cbae72d326f7
Reviewed-by: hjk <hjk121@nokiamail.com>
opt-out now, for all editors created by BaseTextEditorFactories.
Change-Id: I01d0a9ff26320fcd0b84ff90ff22c747cf84b84c
Reviewed-by: hjk <hjk121@nokiamail.com>
Only used there, and avoids back-links to editors.
Change-Id: I81206057ce89d42aef7febb840cf9e44b869df0e
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This removes the ones that were not to be used anymore.
The fallback in the base class is left in for now.
Change-Id: I5e7ab16497a83eff9b11deb9e1feb390757eac0e
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Merge editor files, convert to new editor setup scheme,
fix names according to convention.
Change-Id: I2b3a72149be608df3813aaa00592c7c2facffc05
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
All editors did that manually, with varying approaches. Connect once
when the document is made known to the EditorWidget instead.
Change-Id: Ib0828b08158539859f6f89c8080435a027aa06ed
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
In most cases, the *Editor constructor does not need to
access the *EditorWidget.
Change-Id: I1f5c076a0f723d5d82b398e8c250c7bd1d47eb17
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Removed the cmakehighlighter class, and use the
TextEditor::createGenericSyntaxHighlighter with the correct mime type
instead, as it provides a more robust code highlighting.
Task-number: QTCREATORBUG-3272
Change-Id: I96f6fa0912441500d7aa6ab3735bcfd49d9efa57
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
There was document(), textDocument() and baseTextDocument().
Two should be enough...
Change-Id: Id9e41c8d857c5cb3269a9fce5ab594d34448c982
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
In case of the CppEditor a direct member is not possible due
to setup restrictions inside the CppEditor machinery. I'd expect
that to be fixable when the editor base system is in good shape.
Change-Id: I184e219ca2dff6f67c9b58c182212eb12972cc84
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
No need for most of the machinery.
Change-Id: I9078174582d83da94c6c7f20282fd3a5f1742911
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
That was the only user of that layer of abstraction.
Change-Id: I2bdc4abb8b2b33bfb70398dd11f7ecc4745ddc43
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
CMake 3 uses reStructuredText and Sphinx for documentation. Those
tools can generate Qt qch files, which makes it possible to load
the documentation in QtCreator and to enable context-sensitive
help when editing a cmake language file.
Add a simple parser to process commands. This may be extended in the
future to process variables and properties too.
Change-Id: Ic5a49a9ce828ad9a9e8ff4805b48302ee73bcc71
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
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>
First step in never changing the text document after construction,
because that is actually not really supported.
Second step will be to fix that for the editor duplicate() methods too.
Change-Id: I3d112ba0895e7ee7ac6dd8ae2318f0de7d2cebc9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Can be set directly from the document constructor, no need to do that
later.
Change-Id: I4326757e1b1cb1e48c157c4b330ccb2abb8f3b1f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
It was never called with a sensible value anyhow, and only complicates things.
Change-Id: I005848700b6c00114d91495670d4a0e15a2d2e64
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Doesn't really make sense to have the additional IDocument *editorDocument()
method.
Change-Id: I0a7420eb1afaa76f63c3f7e9c4b373acf624ffb9
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
The action handler already knows which editors to handle through the
context. It only needs to receive signals for updating the actions from
the current editor. So there is no need to tell the action handler about
every individual editor. This also removes some noise from the text
editor implementations.
Change-Id: I76dc5b1559cc8cf54ff313e6cdba4e789a3108aa
Reviewed-by: David Schulz <david.schulz@digia.com>
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>
And not from the global object pool. This way, the editors that have
different highlighters for various language dialects, or editors that
support multiple languages in a single editor, can decide themselves on
what CompletionAssistProvider to provide.
Change-Id: Ieebc4a8e7b3de6470fdb8103035aa3b8b2ba6598
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>