Move common functionality of the 12 test classes into base classes.
Change-Id: If64d3cec876807ac6f991151189860a99b8ff4ca
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
If two files from different (sub-)projects include the same header file,
and the defined macros differ for both files, the header file will be
parsed with only the appropriate macros for the including file.
Task-number: QTCREATORBUG-9802
Task-number: QTCREATORBUG-1249
Change-Id: I560490afa287b3bb1e863bce1bb4f57af36ad56e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Botan:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility:2227:
warning: C4996: 'std::_Copy_impl': Function call with parameters that may be
unsafe - this call relies on the caller to check that the passed values are
correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See
documentation on how to use Visual C++ 'Checked Iterators'
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility:2212:
see declaration of 'std::_Copy_impl'
D:\dev\qt-creator\src\libs\3rdparty\botan\botan.cpp:7248: see reference
to function template instantiation
'_OutIt std::copy<const Botan::u32bit*,T*>(_InIt,_InIt,_OutIt)' being compiled
with
[
_OutIt=Botan::word *,
T=Botan::word,
_InIt=const Botan::u32bit *
]
CppTools:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility:2873:
warning: C4996: 'std::_Mismatch1': Function call with parameters that may be
unsafe - this call relies on the caller to check that the passed values are
correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See
documentation on how to use Visual C++ 'Checked Iterators'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xutility:2856:
see declaration of 'std::_Mismatch1'
D:\dev\qt-creator\src\plugins\cpptools\symbolfinder.cpp:388: see reference to
function template instantiation 'std::pair<_Ty1,_Ty2>
std::mismatch<QString::const_iterator,QString::const_iterator>(_InIt1,_InIt1,_InIt2)'
being compiled
with
[
_Ty1=QString::const_iterator,
_Ty2=QString::const_iterator,
_InIt1=QString::const_iterator,
_InIt2=QString::const_iterator
]
Change-Id: I09a477e755c4555101b064271f10c08a69576e33
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
The model-manager now supports multiple code models for semantic
highlighting and code completion, and will choose one based on the
mime-type of the editor.
The settings page is currently disabled. It will get enabled when a
second plug-in lands that has a ModelManagerSupport class.
Change-Id: I10023f52322ed6860397da15dba1c231e80e6517
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Both semantic highlighting and code-completion go hand-in-hand, so now
the ModelManagerSupport class acts as a "factory" for the model manager.
Depending on the mime-type of the document in the editor, the model
manager will return the appropriate highlighter or code-completion
engine. If none is registered, the built-in fall-back is used.
Change-Id: I3e5dbb0e3b58e077dd5eda9aecb2ce5d448ac0b8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This is step 1 of 2 for merging the various provider factories into a
single class. Merging has the advantage that selecting based on editor
(content) mime-type only has to select one class, instead of re-doing
the selection for each class separately.
Change-Id: I11f815151bd4769ae6028b636793d6a80d02e202
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Some projects use separate directories for sources and headers.
An example tree:
*
|-- src
|-- foo.cpp
|-- include
|-- foo.h
Allow the user to specify directories for finding out-of-project related
header/source files, in addition to current directory
Task-number: QTCREATORBUG-8883
Change-Id: I57215c8f2feffcc246d0d161798290861bcfcdd4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Until now the locator filters CppLocatorFilter, CppClassesFilter and
CppFunctionsFilter used unnecessarily their own SearchSymbols instance.
The results were also saved separately, which was unfavorable since e.g.
the functions and classes data could be shared.
Starting with this patch an instance of LocatorData will serve all
mentioned filters.
This saves about 20MB of memory after indexing the Qt Creator project.
Change-Id: I8a34b67eb9fe0e5c68ba6e7c8f576389c78efc6f
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Move basic ui code model support from CppTools into QtSupport
* Use Kit infrastructure to retrieve uicCommand and environment
* Remove specialization for cmake projects (no longer needed)
* Remove specialization for qmake based projects (no longer needed)
Change-Id: I8569cc01acb46a540883c2da235d169bebf7db39
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
...by detecting include groups (separated by new lines, include types
and same dir prefix).
Task-number: QTCREATORBUG-9317
Change-Id: I73e80fdc715104901cb2d4f5b15b4cab5d04d305
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Rename ModelManagerInterface.(h|cpp) to cppmodelmanagerinterface.(h|cpp).
Rename TypeHierarchyBuilder.(h|cpp) to typehierarchybuilder.(h|cpp).
Change-Id: I035d833fd205d7460819bd0fb7031294359032f9
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
the information is redundant now
Change-Id: Icc8c8b4ace11538d45c6c9e1dbe5a7976f4743e1
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
... and adjust INCLUDEPATH accordingly.
while i'm at messing with include statements, also re-order the include
blocks according to policy and sort them within bigger blocks.
Change-Id: I7762abfd7c4ecf59432b99db2f424e4fa25733a5
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
For a given AST, CppRefactoringFile and Overview this will create a
ChangeSet for rewriting the pointer or reference declaration according
to the Overview.
Task-number: QTCREATORBUG-6169
Change-Id: If6f824c1ea5e9f53a11a58ec8b6d696d01f0723e
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
The indexing support for the built-in code model is moved to its own
file. Symbol searching will now call for a searcher through that support
interface, which will create a fully configured and ready-to-go searcher
that can be started in the/a future.
Change-Id: Idc3ee1c7c789a69fa05ee1d42415313dcea94cf8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.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 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>
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>
Now the type hierarchy widget will also show the classes
derived from the selected one. For consistency the way
the base classes are shown was changed too. The diagram
below is an example from Creator's code when openining
the type hierarchy for BaseTextEditorWidget:
Bases
+QObject
+QWidget
+...
BaseTextEditorWidget
+QPaintDevice
+...
BaseTextEditorWidget
Derived
+BaseTextEditorWidget
+VCSBaseEditorWidget
GitEditor
MercurialEditor
...
GLSLEditorWidget
CppEditorWidget
QmlJSTextEditorWidget
...
Depending on the project and on the selected class the
hierarchy widget might take a bit to be constructed.
This should be improved later.
Change-Id: Ifbdd1cbbba955a0bdf03297ff0e7620351b12dc5
Reviewed-on: http://codereview.qt.nokia.com/883
Reviewed-by: Roberto Raggi <roberto.raggi@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).