summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppmodelmanagerinterface.h
Commit message (Collapse)AuthorAgeFilesLines
* License updateEike Ziller2014-10-091-7/+8
| | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* C++: fix include/framework path handling.Erik Verbruggen2014-07-041-12/+30
| | | | | | | | | | Instead of having two lists of paths, now only one list is used where both include paths and framework paths can be mixed. This reflects the way the compiler is invoked, and retains the (correct) search order. Task-number: QTCREATORBUG-11599 Change-Id: I373953e3e305df5b7a0d10920e12d146584adf9f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppTools: CppHighlightingSupport takes a BaseTextDocumentNikolai Kosjar2014-06-121-2/+3
| | | | | | | | | | ...instead an ITextEditor. The ITextEditor was only used to access the file path and QTextDocument via the BaseTextEditorWidget. Change-Id: Idef2b8162b992fe3718e16e2a046e2ff214846f2 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: CMM::completionAssistProvider takes a mimeTypeNikolai Kosjar2014-06-121-1/+1
| | | | | | | No need to pass more than needed. Change-Id: I047cc44f17342999e0809d022df35ba9a4a8dfb8 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Unexport some internal classes.Nikolai Kosjar2014-06-101-2/+4
| | | | | | | | | | | | | | | | Unexports CppModelManager, CppSourceProcessor and CppToolsPlugin. Now only some constructor signatures mention "Internal::" in the exported symbols: % nm --extern-only --demangle ./lib/qtcreator/plugins/libCppTools.so | grep "Internal::" CppTools::CppClassesFilter::CppClassesFilter(CppTools::Internal::CppLocatorData*) CppTools::CppClassesFilter::CppClassesFilter(CppTools::Internal::CppLocatorData*) CppTools::CppEditorSupport::CppEditorSupport(CppTools::Internal::CppModelManager*, TextEditor::BaseTextEditor*) CppTools::CppEditorSupport::CppEditorSupport(CppTools::Internal::CppModelManager*, TextEditor::BaseTextEditor*) Change-Id: I167c21a6dc03cf02230c95fde66cf404e40df36f Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: introduce a project config file field in the projectPart.Erik Verbruggen2014-02-271-0/+4
| | | | | | | | | | | This field is used by the generic project manager which passes the ".config" file in it. The advantage is that both the SnapshotUpdater and the clang code model do not need to do anything smart, but can pass it directly to the preprocessor. Task-number: QTCREATORBUG-11390 Change-Id: I44fc7b20afd28fb59608412f2cce86af6f7e7d6b Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* qml: moving most of ModelManager logic to ModelManageInterfaceFawzi Mohamed2014-02-191-4/+2
| | | | | | | | | | | | | | Currently ModelManager contains lot logic, but as it sits in QmlJSTools it is not possible to use it in standalone tests. Moving most of the logic to ModelManagerInterface (and cleanup) to allow better testing, and refactoring. This introduces a dependency of the qmljs lib on the cplusplus lib Also a (small) part of the CppTool::ModelManagerInterface has been moved to CPlusPlus::CppModelManagerBase to remove the dependency on CppTools to gather the Qml types exposed from C++. Change-Id: Icad7fe96dfd0f1a2b1058d82bd98c77c40aa5e9d Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* Merge remote-tracking branch 'origin/3.0'Eike Ziller2014-01-081-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: share/qtcreator/debugger/dumper.cpp share/qtcreator/debugger/dumper_p.h share/qtcreator/debugger/test/main.cpp src/plugins/debugger/gdb/classicgdbengine.cpp src/plugins/debugger/gdb/pythongdbengine.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.h src/plugins/debugger/lldblib/guest/main.cpp src/plugins/debugger/lldblib/ipcengineguest.cpp src/plugins/debugger/lldblib/ipcengineguest.h src/plugins/debugger/lldblib/ipcenginehost.cpp src/plugins/debugger/lldblib/ipcenginehost.h src/plugins/debugger/lldblib/lldbenginehost.cpp src/plugins/debugger/lldblib/lldboptionspage.cpp src/plugins/qbsprojectmanager/qbsstep.cpp src/plugins/qbsprojectmanager/qbsstep.h src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp src/plugins/qnx/blackberrycheckdevmodestep.cpp src/plugins/qtsupport/debugginghelper.cpp Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
| * Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | | | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | CppEditor/CppTools: Avoid triggering garbage collector on editor close in testsNikolai Kosjar2014-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | Closing an editor might trigger a timer which leads to the invocation of the garbage collector. This is unfavourable for the plugin tests since a test function closing an editor might influence a subsequent test function (e.g. files get removed from the global snapshot although they were added shortly before). Change-Id: Ia80c11f99e2437fe145dc2d983b21962539b5181 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | CppEditor/CppTools: Introduce Test{Case,Document}Nikolai Kosjar2014-01-071-0/+2
| | | | | | | | | | | | | | Move common functionality of the 12 test classes into base classes. Change-Id: If64d3cec876807ac6f991151189860a99b8ff4ca Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | Merge remote-tracking branch 'origin/3.0'Eike Ziller2013-12-181-0/+1
|\ \ | |/ | | | | | | | | | | | | Conflicts: share/qtcreator/debugger/stdtypes.py src/plugins/qmlprofiler/qmlprofilereventsmodelproxy.cpp Change-Id: I5d86746d58960e41e01e725ccb2a6c00890f0dfd
| * CppEditor: Use the project part chosen with CppPreProcessorDialogNikolai Kosjar2013-12-161-0/+1
| | | | | | | | | | | | | | | | | | ...otherwise the CppPreProcessorDialog is only semi-useful. Change-Id: I6b80967b05e7c9a51cd78ae064a3d78170948e32 Reviewed-by: David Schulz <david.schulz@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* | C++: remove superfluous forward defines.Erik Verbruggen2013-12-101-1/+0
| | | | | | | | | | Change-Id: I962e0fbafdb2281645b98779a421d1084d223570 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | C++: split defines into project-defined and toolchain-defined.Erik Verbruggen2013-12-101-1/+2
|/ | | | | | | | So we can ignore possibly problematic toolchain-defines, while can still unconditionally apply project-defines. Change-Id: I7cb96f35a963d080011fe888ef71bfc098dd33ef Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: Release more documents.Erik Verbruggen2013-11-121-0/+2
| | | | | | | | | | | | | | | | | | | | - fix memory leak in find-usages - do not retain snapshot in search history - when an editor is invisible for more than 2 minutes, release the backing snapshot Retaining snapshots will retain their documents, and if done for too long, the memory consumption might grow. This is especially the case when switching to a different kit (Qt version): in that case, the new versions of headers will be indexed, while the old ones stay around. Task-number: QTCREATORBUG-5583 Task-number: QTCREATORBUG-7645 Task-number: QTCREATORBUG-9842 Change-Id: I045eda1565e0a3fa702baeffaab9c12662f90289 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppEditor: Follow Symbol Under Cursor opens the preprocessor dialogNikolai Kosjar2013-10-221-0/+1
| | | | | | | ... when invoked on a macro that is defined inside that dialog. Change-Id: I419c6675d70cfb8dd174f6a33f502b4c584baa3a Reviewed-by: David Schulz <david.schulz@digia.com>
* Rename "[Mm]ethod(s)" to "[Ff]unction(s)"Nikolai Kosjar2013-10-101-1/+1
| | | | | | | | | | | Only methods as programming functions are affected. Besides renaming some actions like "Switch Between Function Declaration/Definition" this mostly touches (api) code comments. This is a follow-up patch to commit 872bfb7. Change-Id: Icb65e8d73b59a022f8885b14df497169543a3b92 Reviewed-by: hjk <hjk121@nokiamail.com>
* ProjectPart: Add meta informationDaniel Teske2013-10-011-0/+3
| | | | | | | | Add displayname and project file path and a pointer back to the project. Change-Id: Ic9a18f52a6291493bd3a95fd3456ed0e1a3c63e3 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: Only parse with appropriate defines for open editors.Erik Verbruggen2013-10-011-0/+2
| | | | | | | | | | | | 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>
* C++: change working-copy to work on UTF-8 encoded QByteArrays.Erik Verbruggen2013-09-111-6/+15
| | | | | | | | | | | | These not only take less space than UTF-16 encoded QStrings, but due to the caching in the CppEditorSupport also take less time to build. This patch also fixes a number of possible encoding issues, where files and constant strings were (falsely) assumed to be UTF-8. Change-Id: Ib6f91c9a94ebed5b5dfbd4eb2998825c62c72784 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* C++: unify highlighting/code-completion support "factories".Erik Verbruggen2013-09-101-5/+5
| | | | | | | | | | | 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>
* C++: add fallback project part queryingErik Verbruggen2013-09-101-1/+4
| | | | | | | | | | When a file is not part of any other project part, this project part can be used to get at least some compiler flags, defines, etc. to use. This can happen when either a file outside a project is opened, or when the project description is incomplete. Change-Id: I5d595fae7195e8b61dbad14368b6cae9eb15c21b Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: clean-up CppCompletionAssist.Erik Verbruggen2013-09-091-2/+0
| | | | | | | | | | 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>
* TextEditor: get CompletionAssistProvider from editor.Erik Verbruggen2013-09-091-0/+1
| | | | | | | | | | 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>
* C++: optionally let the highlighter handle ifdefed-out blocks.Erik Verbruggen2013-08-191-1/+3
| | | | | Change-Id: I38cc0e55348cac0245d2ab8f3e39c68de76e3e6d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppTools: Rework handling of ProjectInfo changesNikolai Kosjar2013-08-131-1/+6
| | | | | | | | | | | | | | | | | (a) The code model manager figures out by itself which files were added or removed from the project. If this was done successfully, check also the timestamp of the common files and reindex if necessary. (b) A full reindexing is only triggered if the project configuration changes (defines, includes, framework paths). (c) If project files were removed, the garbage collector is called. Task-number: QTCREATORBUG-9730 Change-Id: Ib855614b070880576233a3525813617c967a72f3 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* CppTools: Clean up CppModelManager(Interface)Nikolai Kosjar2013-07-311-17/+17
| | | | | | | | | | | * Const correctness * Better variable names * Sort order of includes and forward declarations * Comment fixes * Cosmetic/Whitespace changes Change-Id: Ieb137266ac7eddedb00c37f8b2cc8677d67e4bdd Reviewed-by: David Schulz <david.schulz@digia.com>
* Merge remote-tracking branch 'origin/2.8'Oswald Buddenhagen2013-07-251-1/+1
|\ | | | | | | | | | | | | Conflicts: src/plugins/cpptools/cppmodelmanager.cpp Change-Id: I0e69dfad951eb81d8008f5ca05e8fb6999ae2c8a
| * CppTools: Check if project has changed before reparsingNikolai Kosjar2013-07-221-1/+1
| | | | | | | | | | | | | | | | | | This introduces an API change for the project managers. Those are not expected to call updateSourceFiles() anymore. Task-number: QTCREATORBUG-9581 Change-Id: I77befd29fb851c9acf87204d571da00183c9cd05 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | CppTools: Fix "! condition" coding styleNikolai Kosjar2013-07-251-2/+2
|/ | | | | | Change-Id: Ic7e634e4249fb64edbc2daceb65ec8e9b5f0f8b9 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* CppTools: Allow to force a "Parsing" notificationNikolai Kosjar2013-06-241-1/+9
| | | | | | | Task-number: QTCREATORBUG-9597 Change-Id: I726a818c7d4af35dcb4863f74b08cd639a189bdd Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* CppEditor: Check <include path>/QSomethingNikolai Kosjar2013-06-171-0/+2
| | | | | | | | | | | For the quick fix AddIncludeForUndefinedIdentifier, if no class is found via the locator, check the "Qt include paths" for a header file with the same name as the class name. Task-number: QTCREATORBUG-9538 Change-Id: I13c86844c2ff653fa479dc91eb109af2a6d76fae Reviewed-by: Lorenz Haas <lykurg@gmail.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* C++: fix crash when failing to open non-existing file.Erik Verbruggen2013-05-241-0/+1
| | | | | | Change-Id: Ie7bd3b36139ab7fac1186cefa7222dff7277eb53 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppTools: ProjectPart now collects warning flagsSergey Shambir2013-05-131-10/+5
| | | | | | | | Will be used by ClangCodeModel, but native model also can use it by disabling unused variable/parameter warnings when needed. Change-Id: I184efb3c65e893a2d85a933385cc547b646e6826 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: added ProjectPart::evaluateToolchain()Sergey Shambir2013-04-301-1/+10
| | | | | | | | | At this moment each project manager duplicates code that reads C++ code model information from ProjectExplorer::ToolChain. This change provides unified way. Change-Id: If9ecfc40991aab90768dd69f5f10f31bbf5fbc21 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* C++ Detach the CppEditor from code-model internals.Erik Verbruggen2013-04-261-11/+4
| | | | | | | | | - Moved document update handling into CppTools. - Moved semantic info calculation into CppTools. - Moved semantic highlighting into CppTools. Change-Id: I253861bf074a64b1f657f7a4a8e6583871b5285f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppTools: Rename files to comply with coding standardTobias Hunger2013-04-101-0/+261
| | | | | | | | 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>
* C++: Move the ModelManagerInterface from CppTools to CPlusPlus.Christian Kamm2011-01-041-185/+0
|
* License headers.con2010-12-171-7/+11
|
* C++-Settings/License template: Add %FILENAME%, %CLASS% placeholders.Friedemann Kleint2010-08-091-1/+1
| | | | | | | ... for doxygen. Change logic for known empty keywords to be replaced by an empty string. Task-number: QTCREATORBUG-1854
* Quickfix: Convert underscore notation to camel case.ck2010-07-201-1/+2
| | | | Reviewed-by: Roberto Raggi
* Removed the TokenCache.Erik Verbruggen2010-07-021-3/+0
|
* Introduced token caching to prevent repetetive tokenizing.Erik Verbruggen2010-06-141-0/+11
| | | | | | Also removed TokenUnderCursor as it's functionality is in the token cache. Reviewed-by: ckamm
* Refactored the quickfix engine.Roberto Raggi2010-06-071-0/+6
|
* Revert "Introduced a token cache for the C++ editor."Erik Verbruggen2010-06-041-11/+0
| | | | This reverts commit c2393df02332618c8cf6159d9d6f6a40041ced89.
* Introduced a token cache for the C++ editor.Erik Verbruggen2010-06-041-0/+11
| | | | | This should speed things up a bit, because before, the line was tokenized at least 3 times.
* Ensure we keep the context around for as long as it is needed.Roberto Raggi2010-05-311-4/+7
|
* Put the DependencyTable calculation into the QFuture.Erik Verbruggen2010-03-171-0/+3
| | | | Done-with: Roberto Raggi
* Cancel a previous update code modeldt2010-03-101-1/+2
|