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>
Getting the #include directives ready for Qt5. This includes the
new-project wizards.
Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Caused while to run forever when not checking
cursor.movePosition() return value.
Change-Id: Ie8211a477ab1889d4583d3b01e1a200d9905fd6d
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This way the editor does not need to know all the details of
instantiating or maintaining classes for highlighting and/or completion,
it can just ask the model manager. The change also enables different
highlighting- or completion-engines without changes to the cppeditor.
Change-Id: I8000d9d9fe446b292defddb2295493cf77d0f14a
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This saves one function call compared to the instance()->currentProject()
pattern and is typically less to type on the caller site.
Change-Id: I65568f30205fc90e2aaca7e8e7f0192241df8c85
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This fixes the issue pointed below and the general case
int which superfluous asterisks are generated.
Task-number: QTCREATORBUG-6823
Change-Id: I1c8659fb5734609d90cfad052804943b8b99d5df
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Througout the initial review the singleton was transformed into an
ordinary class, but a error was introduced: The "reference" file was
incorrectly assumed to be the editors file, which is wrong, since
it should be the declaration file.
Change-Id: Iad3e25a690fa8bd07a18184b24b10f8dea965332
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This patch introduces a priority-based mechanism when searching for certains
symbols in the snapshot. The priority corresponds to how similar the file path
from the "reference" symbol is to the file path from the "candidate" symbol.
This solves a variety of issues when matching "equivalent" symbols but that
are in another file/project, such as when following a function declaration,
a forward class declaration, or adding a definition through a quickfix.
There's now a symbol finder which will compute the "best" search order and cache
the most recent results. A consequence is that following symbols in some cases
is slower, but not apparently significatly.
Note: The "find" functions were moved from the Snapshot to the new SymbolFinder
class.
Task-number: QTCREATORBUG-6697
Task-number: QTCREATORBUG-6792
Change-Id: Ia518f014275fec1f4d0cb3224bd4e06a9df6d557
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
The model uses UTF-8 internally and it makes more sense to only
convert when necessary.
A following commit will rename the source/setSource methods in
document for more clarity too.
Change-Id: I960ea0754efabd1436ad4b4299a57faeb65a8bee
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This improves our completion support for documentation
comments. It's now possible to have a Doxygen block
generated when hitting enter after a /** or /*! comment
start. A couple other related options are also available.
Task-number: QTCREATORBUG-2752
Task-number: QTCREATORBUG-3165
Change-Id: I1c81c0b4b370eb1d409ef72a9c7f22c357f202f4
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com>
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
When editing a function declaration or definition the code model
may realize the same changes have to be applied somewhere else. A
refactoring marker will pop up that can be clicked to perform the
changes. Alternatively, press enter to apply.
Change-Id: I2299a2ecfb6a8f87d4853fc7cfa99486f890a1d3
Reviewed-on: http://codereview.qt.nokia.com/2909
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
All places that use it deal with unsigned revisions:
* SemanticInfo::revision
* Document::revision
* CPPEditorWidget::editorRevision
Even though QTextDocument::revision is int.
Change-Id: I2b3a94056d15fd02539d14c7cec35511abed57b5
Reviewed-on: http://codereview.qt.nokia.com/2954
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
This also changes the mutex so that the check for reusing
the last semantic info is consistent.
Task-number: QTCREATORBUG-5276
Change-Id: Ia5a2dae25ba3aa40949ac751bcda209d0bcf1f3c
Reviewed-on: http://codereview.qt.nokia.com/1581
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Fix a regression introduced by ad53fa42b0
in which follow symbol takes you to the function declaration (instead
of to the type) for situations like the one below (the | indicates the
cursor):
void Ty|pe::function() {}
Change-Id: Iffd15b23bb0cd67eca5965cb22d9b60c4d024fb7
Reviewed-on: http://codereview.qt.nokia.com/1375
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
Use Creator's main window as a reference for the width. Note that
this does not necessarily imply they are aligned.
Task-number: QTCREATORBUG-4021
Change-Id: Id0be8a7435d9b3f9eaab638f7a82bb0bd1afa192
Reviewed-on: http://codereview.qt.nokia.com/109
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
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).
this is where it belongs, rather than into some arbitrary editor.
as a nice side effect, now not only the "rename symbol", but also the
global search&replace has such a warning.
the info about the bars is now stored in the IFile, not in the
EditorView. this is somewhat more expensive for the bars which
identically apply to all editors of one type, but fixes consistency
issues between views.
additionally, it is now possible to set several simultaneous
info bars per file, which ensures that no information is lost.
Co-authored-by: mae