aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpptools/abstracteditorsupport.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge CppTools into CppEditorChristian Kandeler2021-09-011-78/+0
| | | | | | | | | | | | | | | | There was no proper separation of responsibilities between these plugins. In particular, CppTools had lots of editor-related functionality, so it's not clear why it was separated out in the first place. In fact, for a lot of code, it seemed quite arbitrary where it was put (just one example: switchHeaderSource() was in CppTools, wheras switchDeclarationDefinition() was in CppEditor). Merging the plugins will enable us to get rid of various convoluted pseudo-abstractions that were only introduced to keep up the artificial separation. Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Don't access static functions/fields via instanceAlessandro Portale2020-11-271-1/+1
| | | | | | | | | | | | Courtesy of readability-static-accessed-through-instance Amends: b2a766a79ac778febff87f0def34cf6d3f4f93e3 Round #2: This time done with Qt Creator's Analyzer, which found other occurences than run-clang-tidy.py Change-Id: I479e280c7abcf2d24baccbb0af69ae4bda05198e Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-281-1/+1
| | | | | | | | More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CppTools: Add sourceFilePath to AbstractEditorSupportMarco Bubke2019-01-241-1/+1
| | | | | | | | | | Provide the source path to track a generated file source. You can for example get the modified time stamp for the source file and use it for the generated file content. Task-number: QTCREATORBUG-21876 Change-Id: Ia422e128c5cb7a3dce88960f126152c2f65afb41 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Wizards: Support using #pragma once instead of include guardsFilip Bucek2019-01-231-0/+6
| | | | | | | | | | | Allow users to choose #pragma once instead of #ifndef include guards in generated header files. Fixes: QTCREATORBUG-12166 Change-Id: I3ba41c7570beb9c5958e174b5581fcc25855050f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Filip Bucek <fbucek@atlas.cz>
* CppTools: modernizeAlessandro Portale2019-01-211-1/+1
| | | | | | Change-Id: Iaf02e4d026f1ac8b216833d83cd7a735e21ff60a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Generalize support for extra compilersUlf Hermann2016-02-161-2/+8
| | | | | | | | | | | | | | | | Allow for different extra compilers which may get called to generate additional code for the code model. The build system is expected to know what files are generated from which source file and the extra compilers know how to generate the content of those files, without touching the build directory. the uic adapter is refactored to be the first such extra compiler. The extra compiler is run when an editor for its source document loses focus, or after a timeout of 1s when the source document has been changed. Change-Id: I13c110c61120c812f02639a3684144daf8979b37 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Cpp: Add full stop to end of messageLeena Miettinen2015-10-231-1/+1
| | | | | Change-Id: Idbda9e71fcd2322c2925c5dbfdca540992660282 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* AbstractEditorSupport: Simplify licenseheader handlingTobias Hunger2015-10-141-24/+2
| | | | | Change-Id: I6bad3870b14066716fff5adc2a03b18f1840b6c7 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* Old-style wizards: Handle line continuation in license templatesTobias Hunger2015-09-221-1/+24
| | | | | | | | | This is necessary to have the same template work in the old-style wizards and the JSON wizard, which supports inserting \n, \t as well as line continuation for everything. Change-Id: I11c310998b92650003206484de8f1ecfc6000034 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* LicenseTemplate: Use macro expansionTobias Hunger2015-09-221-1/+11
| | | | | | | | | | | | Convert existing licensetemplate syntax to macro expansion. That is way more powerful than what we used to have. Do return the (converted) license template and do not try to fill in information since that is not available when querying the template. Change-Id: Ia4f45ccf055772b21b0c2ce3c083cf49c45ae7d8 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* CppTools: Remove unnecessary code from abstracteditorsupportTobias Hunger2015-09-141-7/+0
| | | | | Change-Id: Ie9032ea494d151a491d37cd5e777f3c2df40f1e2 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* UiCodeModelSupport: Notify if content changesNikolai Kosjar2015-07-081-0/+5
| | | | | | | | | | | Needed for ClangCodeModel. If the content changes, we want to send it immediately to the codemodelbackend process. Change-Id: Iedf16930b494ccb5e91f1bc435db026067d98613 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
* Update LicenseEike Ziller2015-01-161-6/+6
| | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Merge remote-tracking branch 'origin/3.2'Eike Ziller2014-10-141-7/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/utils/ipaddresslineedit.cpp src/libs/utils/logging.h src/plugins/analyzerbase/AnalyzerBase.pluginspec.in src/plugins/android/Android.pluginspec.in src/plugins/android/androiddeploystep.cpp src/plugins/android/androiddeploystep.h src/plugins/android/androiddeploystepfactory.cpp src/plugins/android/androiddeploystepwidget.cpp src/plugins/android/androidpackagecreationfactory.cpp src/plugins/android/androidpackagecreationstep.cpp src/plugins/android/androidpackagecreationstep.h src/plugins/android/androidpackagecreationwidget.cpp src/plugins/android/androidpackagecreationwidget.h src/plugins/android/javafilewizard.cpp src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in src/plugins/baremetal/BareMetal.pluginspec.in src/plugins/bazaar/Bazaar.pluginspec.in src/plugins/beautifier/Beautifier.pluginspec.in src/plugins/bineditor/BinEditor.pluginspec.in src/plugins/bookmarks/Bookmarks.pluginspec.in src/plugins/clangcodemodel/ClangCodeModel.pluginspec.in src/plugins/clangcodemodel/clanghighlightingsupport.cpp src/plugins/clangcodemodel/clangsymbolsearcher.cpp src/plugins/classview/ClassView.pluginspec.in src/plugins/clearcase/ClearCase.pluginspec.in src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec.in src/plugins/cmakeprojectmanager/cmakeeditorfactory.cpp src/plugins/cmakeprojectmanager/cmakehighlighter.cpp src/plugins/coreplugin/Core.pluginspec.in src/plugins/cpaster/CodePaster.pluginspec.in src/plugins/cppeditor/CppEditor.pluginspec.in src/plugins/cppeditor/cppfilewizard.cpp src/plugins/cpptools/CppTools.pluginspec.in src/plugins/cpptools/cpphighlightingsupportinternal.cpp src/plugins/cpptools/cppmodelmanagerinterface.cpp src/plugins/cpptools/cppmodelmanagerinterface.h src/plugins/cvs/CVS.pluginspec.in src/plugins/debugger/Debugger.pluginspec.in src/plugins/designer/Designer.pluginspec.in src/plugins/diffeditor/DiffEditor.pluginspec.in src/plugins/emacskeys/EmacsKeys.pluginspec.in src/plugins/fakevim/FakeVim.pluginspec.in src/plugins/genericprojectmanager/GenericProjectManager.pluginspec.in src/plugins/git/Git.pluginspec.in src/plugins/git/gitorious/gitorious.cpp src/plugins/git/gitorious/gitorious.h src/plugins/git/gitorious/gitoriousclonewizard.cpp src/plugins/git/gitorious/gitorioushostwidget.cpp src/plugins/git/gitorious/gitorioushostwidget.h src/plugins/git/gitorious/gitorioushostwizardpage.cpp src/plugins/git/gitorious/gitoriousprojectwidget.cpp src/plugins/git/gitorious/gitoriousprojectwidget.h src/plugins/git/gitorious/gitoriousprojectwizardpage.cpp src/plugins/git/gitorious/gitoriousprojectwizardpage.h src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp src/plugins/git/gitorious/gitoriousrepositorywizardpage.h src/plugins/glsleditor/GLSLEditor.pluginspec.in src/plugins/glsleditor/glsleditorfactory.cpp src/plugins/glsleditor/glslfilewizard.cpp src/plugins/helloworld/HelloWorld.pluginspec.in src/plugins/help/Help.pluginspec.in src/plugins/imageviewer/ImageViewer.pluginspec.in src/plugins/ios/Ios.pluginspec.in src/plugins/macros/Macros.pluginspec.in src/plugins/mercurial/Mercurial.pluginspec.in src/plugins/perforce/Perforce.pluginspec.in src/plugins/projectexplorer/ProjectExplorer.pluginspec.in src/plugins/pythoneditor/PythonEditor.pluginspec.in src/plugins/pythoneditor/pythoneditorwidget.cpp src/plugins/pythoneditor/wizard/pythonfilewizard.cpp src/plugins/qbsprojectmanager/QbsProjectManager.pluginspec.in src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp src/plugins/qmakeprojectmanager/QmakeProjectManager.pluginspec.in src/plugins/qmakeprojectmanager/profileeditorfactory.cpp src/plugins/qmldesigner/QmlDesigner.pluginspec.in src/plugins/qmljseditor/QmlJSEditor.pluginspec.in src/plugins/qmljseditor/qmljseditorfactory.cpp src/plugins/qmljstools/QmlJSTools.pluginspec.in src/plugins/qmlprofiler/QmlProfiler.pluginspec.in src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec.in src/plugins/qnx/Qnx.pluginspec.in src/plugins/qtsupport/QtSupport.pluginspec.in src/plugins/remotelinux/RemoteLinux.pluginspec.in src/plugins/resourceeditor/ResourceEditor.pluginspec.in src/plugins/resourceeditor/resourcewizard.h src/plugins/subversion/Subversion.pluginspec.in src/plugins/tasklist/TaskList.pluginspec.in src/plugins/texteditor/TextEditor.pluginspec.in src/plugins/texteditor/basetexteditor_p.h src/plugins/texteditor/basetextmark.cpp src/plugins/texteditor/codeassist/basicproposalitemlistmodel.h src/plugins/texteditor/codeassist/defaultassistinterface.h src/plugins/texteditor/codeassist/iassistproposalitem.cpp src/plugins/texteditor/itexteditor.cpp src/plugins/texteditor/itexteditor.h src/plugins/texteditor/itextmark.cpp src/plugins/texteditor/plaintexteditor.cpp src/plugins/texteditor/plaintexteditor.h src/plugins/texteditor/texteditoractionhandler.cpp src/plugins/todo/Todo.pluginspec.in src/plugins/updateinfo/UpdateInfo.pluginspec.in src/plugins/valgrind/Valgrind.pluginspec.in src/plugins/vcsbase/VcsBase.pluginspec.in src/plugins/welcome/Welcome.pluginspec.in src/plugins/winrt/WinRt.pluginspec.in tests/auto/debugger/temporarydir.h Change-Id: I254af8be8119fe9855287909e17d4b8ca9d2fc2f
| * License updateEike Ziller2014-10-091-7/+8
| | | | | | | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | Debugger: Clean up source utilshjk2014-09-191-14/+0
| | | | | | | | | | Change-Id: Ibfe20af9c4c413657b6a238337ff9af661857b3e Reviewed-by: hjk <hjk121@nokiamail.com>
* | CppTools: Change CppModelManager implementation patternhjk2014-09-191-3/+3
| | | | | | | | | | | | | | | | | | Replace the CppModelManagerInterface/derived CppModelManager combo by a more common CppModelManager/CppModelManagerPrivate pimpl pattern. Change-Id: Ia4582845ed94d5ef60b8571bab9b2260c6290287 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | C++: Change QStringList to QSet<QString> to prevent conversions.Erik Verbruggen2014-09-041-1/+1
|/ | | | | | | | | This eliminates a bunch of list->set->list conversions. Especially the ProjectInfo::appendProjectPart takes lots of time converting for every part added. Change-Id: Ib3c8cd4b0ad6c012ccbeed12ebedd46b9b6cca95 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* CppTools: Fix highlighting of ui_*.h filesNikolai Kosjar2014-03-271-1/+1
| | | | | | | | | | | | | Editor revisions start with 1, not 0. There are some more problems in that area which are not addressed by this patch. E.g. the synchronization of the AbstractEditorSupport revision and the QTextDocument revision. Task-number: QTCREATORBUG-11774 Change-Id: I4b0f41b2436ecedcd10dc0e3e39e5f185f990e05 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* 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>
* CppTools: Add revisions to AbstractEditorSupportNikolai Kosjar2013-11-251-1/+2
| | | | | | | | | | | | | | So far revisions for AbstractEditorSupport were not needed because until recently we only had a single snapshot ("global snapshot"). Now, since editor snapshots are introduced, we need to make sure to update the corresponding documents in these snapshots, too. To do this efficiently, a revision is introduced for AbstractEditorSupport. Task-number: QTCREATORBUG-10894 Change-Id: Ibad1dbbafb7c721d1328959c1e903345fe465326 Reviewed-by: Christian Stenger <christian.stenger@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: fix functionAt(), moved it, and added test.Erik Verbruggen2013-06-041-22/+6
| | | | | | | Thanks to Jesper K. Pedersen for the fix! Change-Id: Ie49c3352e26a9632b1500596b00d559bfe932dff Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppTools: Rename files to comply with coding standardTobias Hunger2013-04-101-2/+1
| | | | | | | | 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>
* Clean headers in CppTools.Friedemann Kleint2013-04-101-9/+0
| | | | | | | | Ran script to remove inludes on a trial-and-error basis and manually corrected it. Change-Id: Ic8464ea084ca1ab401e9f4a7d0183b92b4038902 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Use namespace CppTools consistentlyTobias Hunger2013-04-081-3/+2
| | | | | | | | | There were quite a few classes using CPlusPlus namespace in the CppTools plugin. Rename them and do some other small namespace related coding style fixups. Change-Id: I093fc1f3fc394fd9923e3f18d5f66522e288f21d Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* fix include style relating to cplusplus librariesOswald Buddenhagen2013-04-031-7/+9
| | | | | | | | | | | ... 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>
* Incremented year in copyright infov2.6.2Robert Loehning2013-01-291-1/+1
| | | | | Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Adjust license headershjk2012-10-051-21/+20
| | | | | Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Contact -> qt-project.orgEike Ziller2012-07-191-3/+1
| | | | | Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Move the ModelManagerInterface out of the CPlusPlus library.Erik Verbruggen2012-03-141-1/+1
| | | | | Change-Id: Iffaa18f848a22f6961b49dff048672b194570df6 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Removed module names from #include directives.Erik Verbruggen2012-02-151-1/+1
| | | | | | | | Getting the #include directives ready for Qt5. This includes the new-project wizards. Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* Long live the king!hjk2012-01-261-1/+1
| | | | | Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
* all: s/info@qt.nokia.com/qt-info@nokia.com/hjk2011-11-031-2/+2
| | | | | Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* Header cleanup in various plugins.Friedemann Kleint2011-08-181-0/+1
| | | | | | Change-Id: I16b273cc792bfd2035d35e7c67675f039cd387b9 Reviewed-on: http://codereview.qt.nokia.com/3185 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix/add copyright headersTobias Hunger2011-05-061-1/+1
| | | | Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
* Update license.hjk2011-04-131-14/+13
|
* It's 2011 now.con2011-01-121-1/+1
| | | | Reviewed-by: hjk
* C++: Move the ModelManagerInterface from CppTools to CPlusPlus.Christian Kamm2011-01-041-1/+3
|
* License headers.con2010-12-171-7/+11
|
* Code model: Fix endless loop in AbstractEditorSupport::functionAtFriedemann Kleint2010-11-221-10/+7
| | | | | | | | used by CDB debugger tooltip (introduced by A 354b9712e4655040930a9f18de4e6b4c71dc42d9). Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com> Rubber-stamped-by: dt
* Renamed Symbol::scope() to Symbol::enclosingScope().Roberto Raggi2010-08-261-1/+1
|
* Merged ScopedSymbol and Scope.Roberto Raggi2010-08-111-5/+4
|
* C++-Settings/License template: Add %FILENAME%, %CLASS% placeholders.Friedemann Kleint2010-08-091-2/+2
| | | | | | | ... for doxygen. Change logic for known empty keywords to be replaced by an empty string. Task-number: QTCREATORBUG-1854
* Use Prototype instead of Function.Roberto Raggi2010-08-051-1/+1
|
* Renamed Document::findSymbolAt().Roberto Raggi2010-05-171-1/+1
|
* Long live the king!hjk2010-03-051-1/+1
|
* CppCodeModelSupport: functionAt: Prepend namespaces to name.Friedemann Kleint2010-02-041-1/+18
| | | | To improve CDB debugger tooltips which go via the function name.
* Initial work on the new CPlusPlus::Snapshot.Roberto Raggi2009-12-071-1/+1
| | | | Encapsulate the details.