aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cppeditor.pro
Commit message (Collapse)AuthorAgeFilesLines
* CppTools: Move CppHoverHandler to CppToolsNikolai Kosjar2018-01-161-4/+0
| | | | | | | | This is in preparation for clang code model to provide its own hover handler. Change-Id: Ifbdd96f427989bd5d1fbc4badb9c38108485c2f2 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* C++: remove builtin RefactoringEngine dependency from CppEditorIvan Donchevskii2017-09-221-2/+0
| | | | | | | | Move CppRefactoringEngine to CppTools and builtin member ownership to model manager. Change-Id: I3e72308559fd2928229f9f25d4dd09beb3f56c34 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* C++: remove builtin FollowSymbol dependency from CppEditorIvan Donchevskii2017-09-221-6/+0
| | | | | | | | Move FollowSymbolUnderCursor to CppTools and builtin member ownership to internal model manager. Change-Id: I97a4f744ec1709ccc0b34fb67b58680973ef566f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppEditor: add default RefactoringEngineIvan Donchevskii2017-09-151-0/+2
| | | | | | | ..and use it when we don't have refactoring plug-in Change-Id: Ibe317a9728d439b9c5e05271d92a330d22eaacb9 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppEditor: split CppEditor and CppEditorWidgetIvan Donchevskii2017-09-121-0/+2
| | | | | Change-Id: Id3c815184f7f3bace0276e947f6b6f76e61ec6de Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Move CanonicalSymbol from CppEditor to CppToolsNikolai Kosjar2017-05-291-2/+0
| | | | | | | | Needed for a follow-up change. Change-Id: Ibb4815f3411f0d63deac8c32583178470668f67b Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Remove the need to create ISnippetProvider subclassesEike Ziller2017-04-251-2/+0
| | | | | Change-Id: I1810aaa945136d9726a66dad41377429a6adc8e1 Reviewed-by: David Schulz <david.schulz@qt.io>
* CppEditor: Rework showing/switching parse configurationsNikolai Kosjar2017-02-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | * Move the combox box for switching the parse configurations out of the "Additional Preprocessor Directives" dialog ('#'-button) to make it better visible/accessible. Also, decouple the extra preprocessor directives from the concrete parse context since this is not anymore in same dialog. * The combo box appears only if multiple parse configurations are available for a file. * The first time multiple parse configurations are detected, an info bar is shown that points the user to the combox box. A "Do Not Show Again" button is provided. * Upon selecting an entry, the preferred parse configuration is saved as part of the session. The setting can be cleared with the context menu entry on the combo box. Follow-up changes need to ensure that the display name and/or tooltip is unambiguous, e.g. for qbs and cmake projects. Change-Id: I9e9773704187291524ad7b605bfdddd83ef5b19d Reviewed-by: David Schulz <david.schulz@qt.io>
* CppEditor: Show info bar for project-less fileNikolai Kosjar2017-01-261-0/+2
| | | | | | | | While at it, centralize the code for handling the info bars and actions. Change-Id: Ied62e3db268aaff3ef87e246bfe2b50399341be3 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* cppeditor: add resource preview hover handler classMarc Reilly2016-08-111-2/+4
| | | | | | | | | | This adds a hover handler which will preview images from within project resource. Change-Id: I88bcb56a977e41ed4dc5bfe165e2c80d4396a21f Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* CppEditor: Rework CppIncludeHierarchy modelhjk2016-07-291-6/+0
| | | | | | | | | | Use a Utils::TreeModel as base for the model. Avoid excessive expansion of items during incremental search. Change-Id: Ic2f51c7e467ea127ccf69ef7d122cec4a63be2f5 Task-number: QTCREATORBUG-15834 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppEditor: Tests: Move doxygen tests in separate test classNikolai Kosjar2015-02-041-0/+1
| | | | | Change-Id: If27b4e11deafaefd95a5815466fc5fdac23ba30a Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* CppEditor: Move CppEditorOutline to CppToolsNikolai Kosjar2015-01-261-2/+0
| | | | | Change-Id: I75768f548f8f914e76fbdeaf3c318c207782fe1b Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
* JsonWizard: Replace CppClassWizard with a JsonWizardTobias Hunger2014-10-151-2/+0
| | | | | Change-Id: I4e1aeea4ccd1087b5e804e9ba4c2aa8fde4f4fcb Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* CppEditor: Replace CppFileWizard with two JsonWizardsTobias Hunger2014-09-301-2/+0
| | | | | | Change-Id: If39ed6d2711fa4cc144d1b1f9738acf3d04ac225 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: Base parsing on editor document instead of widgetNikolai Kosjar2014-08-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This mainly takes CppEditorSupport apart. * Parsing is now invoked by CPPEditorDocument itself by listening to QTextDocument::contentsChanged(). * Upon construction and destruction CPPEditorDocument creates and deletes an EditorDocumentHandle for (un)registration in the model manager. This handle provides everything to generate the working copy and to access the editor document processor. * A CPPEditorDocument owns a BaseEditorDocumentProcessor instance that controls parsing, semantic info recalculation and the semantic highlighting for the document. This is more or less what is left from CppEditorSupport and can be considered as the backend of a CPPEditorDocument. CPPEditorDocument itself is quite small. * BuiltinEditorDocumentProcessor and ClangEditorDocumentProcessor derive from BaseEditorDocumentProcessor and implement the gaps. * Since the semantic info calculation was bound to the widget, it also calculated the local uses, which depend on the cursor position. This calculation got moved into the extracted class UseSeletionsUpdater in the cppeditor plugin, which is run once the cursor position changes or the semantic info document is updated. * Some more logic got extracted: - SemanticInfoUpdater (logic was in CppEditorSupport) - SemanticHighlighter (logic was in CppEditorSupport) * The *Parser and *Processor classes can be easily accessed by the static function get(). * CppHighlightingSupport is gone since it turned out to be useless. * The editor dependency in CompletionAssistProviders is gone since we actually only need the file path now. Change-Id: I49d3a7bd138c5ed9620123e34480772535156508 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppEditor: Add tests for use selectionsNikolai Kosjar2014-08-201-0/+1
| | | | | Change-Id: I5f958f0afbee076a8bac40e6e3c383f0c558d34a Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* TextEditor: Simplify HighlighterFactory hierarchyhjk2014-06-261-2/+0
| | | | | | Change-Id: I555639a9137dcb8ccb471e1615823870c8158b3c Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* CppEditor: Extract CanonicalSymbolNikolai Kosjar2014-06-131-0/+2
| | | | | Change-Id: I42c55f844c4228725251df8c985bfc275925f2ff Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppEditor: Extract CppDocumentationCommentHelperNikolai Kosjar2014-06-131-0/+2
| | | | | Change-Id: Iefaff837565f0aaf7e52263daa40a58fc391df36 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppEditor: Extract CppEditorOutlineNikolai Kosjar2014-06-131-0/+2
| | | | | Change-Id: I3b41f91f17ce9fb24796f2f6bff353fb3c6177ec Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppEditor: Extract CppLocalRenamingNikolai Kosjar2014-06-131-0/+2
| | | | | | | | | | Now CppEditorWidget is much less convoluted with the local rename mode. This class can be reused since there is no dependency on CPPEditorWidget. Change-Id: If513e59a03214cf9f2e3831f7e3616c001e1f036 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppEditor: Extract CppEditorDocumentNikolai Kosjar2014-06-121-0/+2
| | | | | | | This one will get some more functionality. Change-Id: Ifba410e32f98c28cbfbb5a72493906ab3d681225 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppEditor: Sort qmake project fileOrgad Shaneh2014-01-271-4/+4
| | | | | Change-Id: I81271c4cc42868ef5c0eb78aafd19c2a3cd5599a Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* CppEditor: Move InsertVirtualMethods to its own fileOrgad Shaneh2014-01-241-4/+5
| | | | | | | | It contains many components, doesn't make sense to have it with all other quickfixes. Change-Id: Idede14c90ba9b612ae9e9048f5795d674811acfe 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>
* CppEditor: Introduce C++ Code Model InspectorNikolai Kosjar2013-12-111-2/+4
| | | | | | | By default invokable via Ctrl+Shift+F12. Change-Id: If8d61233b6d38d12131718f7c20bf40f76bc9ae4 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Clean up {classview,cppeditor,cpptools}.{pro,qbs}Nikolai Kosjar2013-12-111-28/+32
| | | | | | | | Mostly reordering files alphabetically. Change-Id: Ibad1fa75559218fe488d1b31c7200ba4ff6131fe Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppEditor: tests for "Include Hierarchy"Przemyslaw Gorszkowski2013-11-151-1/+2
| | | | | | | | | | Very simple tests for include hierarchy model: * test if checked file includes one file * test if checked file is included by one file * test if checked file includes one file and is included by one file Change-Id: I3688f9ddb86a569f780fc156bdfcf6b81a9fb0c1 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppEditor: Extract VirtualFunctionProposalItem into separate filesNikolai Kosjar2013-10-231-0/+2
| | | | | | | ...for tests. Change-Id: Idc408e30ee0cdc22610e3037f94de5f7d246accf Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CPPEditor: Rework preprocessor addition tooltip.David Schulz2013-10-171-3/+3
| | | | | | | | | Change the preprocessor popup to a dialog. Save the additional preprocessor directives to the session instead of the .pro.user file. Change-Id: I0d08c5684cfb21e822cde0a965c9cf14e5d6d47d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++ Preprocessor additions widget.David Schulz2013-10-021-2/+7
| | | | | | | | | Introducing a Widget with a SnippetEditor and a C++ Highlighter which should provide additional information to the C++ preprocessor for a specific file. Change-Id: I27f9498c7e52d1493d6ea92a02a2c6d26130fe07 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppEditor: "Follow Symbol Under Cursor" for virtual functionsNikolai Kosjar2013-10-011-2/+4
| | | | | | | | | | | 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>
* CppEditor: introduce include hierarchyPrzemyslaw Gorszkowski2013-10-011-2/+10
| | | | | | | | | | | | | | | | | | | Based on type hierarchy. Added to context menu ('Open Include Hierarchy') Shortcut(Ctrl+Shift+I) 'Include Hierarchy' contains: FileName for which 'Include Hierarchy' is done Includes(which files are included by current file - tree hierarchy) Included by(which files include current file - tree hierarchy) It is possible to open/goto each file by clicking on specific item. Additionally for 'Included by' files it goes to the line where is include directive for current file. Change-Id: I549b1ed64e4c9f6955f60d00efb12950a3259f81 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* Fix qmake projectOrgad Shaneh2013-10-011-2/+2
| | | | | Change-Id: Ib6beb99f346d72a329ec7cd72fcce1d63e46b1f2 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* fix syntax of cppeditor.proJoerg Bornemann2013-10-011-2/+2
| | | | | Change-Id: I39a458d6805fcb214297471f72bf3b6cb2dd487d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppEditor: findLinkAt() delegates to FollowSymbolUnderCursorNikolai Kosjar2013-10-011-3/+5
| | | | | | | | | Moves functionality of CPPEditorWidget::findLinkAt into a newly created class FollowSymbolUnderCursor. This slim downs cppeditor.cpp a bit and makes Follow Symbol Under Cursor more easily testable. Change-Id: I106c7fbfc6869dd13c75381fbe87c90dc88998a7 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Implement syntax highlighting in diff editorjkobus2013-08-291-0/+2
| | | | | | | | | | | | All Qt Creator's main highlighters are used in the first place, for other mimetypes generic highlighter is used as a fallback. Task-number: QTCREATORBUG-9580 Change-Id: I863b9085520e5bdda142ce88f2074afeacee0531 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Petar Perisin <petar.perisin@gmail.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
* CppEditor: Tests: Fix blocking the token tests by a pop upNikolai Kosjar2013-07-231-0/+3
| | | | | | | | Now the used QuickFixFactory InsertVirtualMethods is configured to not generate any pop ups. Change-Id: I36d297678d87e6fb2eb0a73fea6384f0eb7e21f0 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* Streamline mimetypes.xml filesOrgad Shaneh2013-06-071-1/+0
| | | | | Change-Id: I4f2a28d4732ea496f574e5f51fb1e1633ebca99d Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* CppEditor: Tests: Add Switch Between Method Decl/Def testsNikolai Kosjar2013-05-071-1/+1
| | | | | Change-Id: I60fa4ed46178fd4053d83b9a5c6675a0029d2cc2 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppEditor: Tests: Add initial Follow Symbol Under Cursor testsNikolai Kosjar2013-04-301-1/+2
| | | | | | | | | | | Test cases are examples from Working Draft, Standard for Programming Language C++ Document Number: N3242=11-0012 Change-Id: I624c315943d6a00e821abb52eef6e0ff4a40f0d7 Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com> Reviewed-by: David Schulz <david.schulz@digia.com>
* CppEditor: Rename CppPlugin to CppEditorPluginNikolai Kosjar2013-04-191-21/+21
| | | | | | Change-Id: Icebf85ae425f413ed0d3dfc873869665233ec58c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppEditor: Rearrange quick fix filesLorenz Haas2013-04-151-6/+0
| | | | | | | | | | | | | Moved content of cppinsertdecldef.(cpp|h) cppcompleteswitch.(cpp|h) cppinsertqtpropertymembers.(cpp|h) and ApplyDeclDefLinkChanges to cppquickfixes.(cpp|h). Made msgQtStringLiteralDescription private member function of WrapStringLiteral, added anonymous namespace, "extracted" useful functions to the top of cppquickfixes.cpp. Change-Id: I4f82a005a62be3c29d4b96902667bd3a2b9397cc Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: Tests: Add stupid "do xyz for each file/token" testsNikolai Kosjar2013-04-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce tests that execute test actions on each word/token of each file from every loaded project. Currently, besides just opening files and moving token by token through the files, the following basic actions from the CppTools and CppEditor plugin are executed for each token: - Follow Symbol Under Cursor - Switch Declaration/Definition - Find Usages - Rename Symbol Under Cursor - Open Type Hierarchy - Invoke Completion - Trigger a quick fix in this scope (+perform) Note that (1) These tests are meant to detect corner cases for which Qt Creator crashes or outputs QTC_ASSERTS. Correct behavior is not tested. (2) These tests operate on the loaded projects. Therefore, projects should be specified on the command line or should be loaded by the session manager. Depending on the projects size, these tests might be quite time consuming and are therefore candidates for nightly tests. Suggested test projects are qtcreator.pro, qtbase.pro. Change-Id: I550776b3d56acb17ab337da068d409bfc21e997a Reviewed-by: David Schulz <david.schulz@digia.com>
* derive TARGET from QTC_{LIB,PLUGIN}_NAMEOswald Buddenhagen2013-04-031-1/+0
| | | | | | | | the information is redundant now Change-Id: Icc8c8b4ace11538d45c6c9e1dbe5a7976f4743e1 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* centralize assignment of TEMPLATE = libOswald Buddenhagen2013-04-021-1/+0
| | | | | Change-Id: I4025539f3875e79f03743ba9ed3fd09cd31b998d Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* automatically include libs' and plugins' _dependencies.pri filesOswald Buddenhagen2013-04-021-1/+0
| | | | | Change-Id: I25645bb625b467c6f9d895ff89a70acd6a25683e Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* CppEditor: Compile fix for release modeNikolai Kosjar2013-02-191-3/+3
| | | | | Change-Id: Ic48ad8dc36d75a1ae7644731863ce3f8d7f242c8 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* C++: Tests: Add basic tests for doxygen commentsNikolai Kosjar2013-02-191-1/+2
| | | | | Change-Id: I45e72e4d86f1cfb6798985cfddc073c524672313 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>