summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpptoolsplugin.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Crossify normalizePathNameOrgad Shaneh2013-10-241-8/+2
| | | | | | | | | | | | Denoise usages get{Short|Long}PathName are now static. They're not used anywhere except in normalizePathName. Change-Id: Ief277b6d828faadd98ec7faa39dd682bfaa8805f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* CppTools: honor pre-compiled headers in the code-model.Erik Verbruggen2013-10-011-1/+1
| | | | | | | Task-number: QTCREATORBUG-476 Change-Id: I82ed92acdcda551d2c6a9ca221832ac20117a08f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: add code-model settings to choose one by mime-type.Erik Verbruggen2013-09-131-2/+11
| | | | | | | | | | | | 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>
* C++: Custom directory list for Switch Header/SourceOrgad Shaneh2013-09-031-9/+48
| | | | | | | | | | | | | | | | | | 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>
* Apply 'static' pattern to VcsManagerhjk2013-09-031-2/+1
| | | | | | | Adapt user and surrounding code. Change-Id: Id2648f82a9cbbd0ad0bfb91f6958b8cee7ea29cc Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Apply 'static' pattern to MimeDatabasehjk2013-09-031-19/+19
| | | | | | | | Also adjust and streamline using and surrounding code. Change-Id: I6a8b05126bdcbb74ff611b21c7cb3c5902a2d5ca Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* CppTools: Introduce LocatorDataNikolai Kosjar2013-08-301-3/+6
| | | | | | | | | | | | | | | | 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>
* EditorManager: Use interface directly instead of going through ICorehjk2013-08-301-1/+1
| | | | | | | | In the majority of cases we were doing that anyways, having two ways is just needlessly confusing. Change-Id: Ied362a702c23beee528368d74df1f2aabe5807f8 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Introduced mime-type for ObjC++.Erik Verbruggen2013-07-181-0/+1
| | | | | | | | | Updated/fixed the code to treat treat text/x-objcsrc and text/x-objc++src correctly. Change-Id: I1ab97577c786a28381398e4e0fac177325d00d7b Reviewed-by: Sergey Shambir <sergey.shambir.auto@gmail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* Make document model static and add some document related methodsEike Ziller2013-07-121-2/+2
| | | | | Change-Id: Ibcb863e67a2433529c9d2b6dec237f9d8b1d8d50 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Rename IDocument::fileName --> filePathEike Ziller2013-07-091-2/+2
| | | | | | | That is what it actually is, wrt how Qt API calls it. Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* CppTools: "Switch Header/Source" checks also other projectsNikolai Kosjar2013-06-251-23/+49
| | | | | | | | | | | | | ...and not only the current one as fallback. E.g. if the projects qtcreator and qtbase are open and you navigate into qdir.h of your include path from the qtcreator project and trigger "Switch Header/Source", then "qdir.cpp" will be found in the qtbase source dir. Task-number: QTCREATORBUG-3789 Change-Id: Ibd73c37bb626f8f7ee80cd8be3ef1244883ccf5e Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Switch less often to edit modeEike Ziller2013-06-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This change * Removes IMode::type, ModeManager::activateModeType, and IEditor::preferredModeType, and adds IEditor::isDesignModePreferred instead * Adapts the mode switching code in EditorManager to handle multiple windows, for example switching to edit mode should only happen if the editor/view is in the main window. Otherwise the editor window should be raised and focused * Renames EditorManager::NoActivate --> DoNotChangeCurrentEditor * Reverts the EditorManager::ModeSwitch logic to switch mode or make the current editor visible by default, introducing DoNotMakeVisible flag instead * Fixes a few instances where EditorManager::ModeSwitch should have been used One non-trivial problem left: If you open a .ui file and switch to an external editor window, edit mode is activated, because the current editor no longer is a .ui file, which means that the design mode gets deactivated. Change-Id: I76c5c2391eb4090143b778fb103acff3a5a1ff41 Reviewed-by: David Schulz <david.schulz@digia.com>
* Make 'open in other split' a flag instead of another method.Eike Ziller2013-06-031-1/+2
| | | | | Change-Id: I1acafd85ec7a87ba2ac61240f30c329d56461118 Reviewed-by: David Schulz <david.schulz@digia.com>
* Cycle through extra editor windows when cycling through splitsEike Ziller2013-05-311-1/+1
| | | | | Change-Id: I1bd5654d62b11456c35cc5bf1099e41fb3559bc7 Reviewed-by: David Schulz <david.schulz@digia.com>
* C++: moved the CppPreprocessor into its own file.Erik Verbruggen2013-04-261-1/+1
| | | | | Change-Id: I399d667a1fccb376fadbd6ab8fbba243e86d8f4b Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* Correct some default shortcuts for MacEike Ziller2013-04-261-1/+4
| | | | | | | This makes them align to the other "editor split" shortcuts. Change-Id: I0b300ae495ffa17062a0a52b148f61015b965c29 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: fix possible null-pointer deref.Erik Verbruggen2013-04-101-1/+1
| | | | | Change-Id: Ic02eb67fa4a9c674880345cfa3afc9d037eb3bf2 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppTools: moved some logic to ProjectFileSergey Shambir2013-04-101-55/+32
| | | | | | | Simplifies code and makes it independent from mimetype names. Change-Id: Ib56a07654df4986b1916c517e3862e6c3a3dd720 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Clean headers in CppTools.Friedemann Kleint2013-04-101-18/+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>
* fix include style relating to cplusplus librariesOswald Buddenhagen2013-04-031-14/+13
| | | | | | | | | | | ... 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>
* CppTools: Simplify testing of typical use casesNikolai Kosjar2013-03-201-0/+5
| | | | | Change-Id: I7ccb09bb8e1d2327f206640cd8c9090164a5f146 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Fix Krazy-warnings in CppTools.Friedemann Kleint2013-03-081-1/+1
| | | | | | | | - values or keys iteration - non-const ref iterator Change-Id: I6bb58793b3155243e0fbfaf33ee43ce60edea8d1 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* UI text: fix caps in CPP plugin actionsLeena Miettinen2013-02-151-1/+1
| | | | | | | | | Use book style capitalization, which means that prepositions less than 4 characters long are written in lower case. Change-Id: I6d46a2513070897929cf1a8af2943a17d8e52b2d Reviewed-by: David Schulz <david.schulz@digia.com>
* Editor: Refactor Open Link in Next Split.David Schulz2013-02-141-26/+17
| | | | | | | | | | | Cleanup code and added shortcuts and menu entries for - open header/source in next split - follow symbol under cursor in next split - open declaration/definition in next split Change-Id: I2c4347749d26669d88b7c2968f30f60710f442b1 Reviewed-by: Petar Perisin <petar.perisin@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Merge remote-tracking branch 'origin/2.6'Oswald Buddenhagen2013-01-311-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in src/plugins/debugger/qtmessageloghandler.cpp src/plugins/debugger/qtmessagelogwindow.cpp src/plugins/madde/maemodeployconfigurationwidget.cpp src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp src/plugins/qmldesigner/designercore/include/widgetqueryview.h src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp src/plugins/qnx/bardescriptormagicmatcher.h src/plugins/qt4projectmanager/profilekeywords.cpp src/plugins/remotelinux/deployablefilesperprofile.cpp src/plugins/remotelinux/deployablefilesperprofile.h src/plugins/remotelinux/deploymentinfo.cpp src/plugins/remotelinux/deploymentsettingsassistant.cpp src/plugins/remotelinux/profilesupdatedialog.cpp tests/auto/icheckbuild/ichecklib.cpp tests/auto/icheckbuild/parsemanager.cpp tests/auto/icheckbuild/parsemanager.h Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
| * Incremented year in copyright infov2.6.2Robert Loehning2013-01-291-1/+1
| | | | | | | | | | Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Fixed typo 'mimeDatase' -> 'mimeDatabase'Thorbjørn Lindeijer2013-01-241-12/+12
| | | | | | | | | | Change-Id: Id2ff2fb1e5e009fd267c7fcacf59e9a4ad6f2364 Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
* | Editor: Allow to open links in a new split.Petar Perisin2013-01-111-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes current behavior while opening links. Link is now opened in next split by default. If you use CTRL+Click to open links, it will also open in next split. However, by using CTRL+ALT+click it will open in current split. There are two new checkboxes in Tools/Options/Text Editor/Display: - "Open Links in New Split" - if it is checked, links will not be opened in current split. However, if document with link is already opened, it will be used to open the split - "Force open links in next split" - Links will always open in next split, even if their document is already opened somewhere else. Task-number: QTCREATORBUG-8117 Change-Id: Ib99075b55d9e9683ed2c2386767227457de0a3fc Reviewed-by: David Schulz <david.schulz@digia.com>
* | C++: changed the CppModelManager to use a normal singleton.Erik Verbruggen2012-10-161-11/+9
| | | | | | | | | | | | | | Also removed two TODOs. Change-Id: I91b235795da7e87a21782d189844eacdd68c5f3c Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* | CppTools: make correspondingHeaderOrSource freely accessiblehjk2012-10-121-15/+21
|/ | | | | Change-Id: Ic8aba607157381359984ef1c99b2f32161daaecd Reviewed-by: hjk <qthjk@ovi.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>
* Don't cache mapping between source and private headerNicolas Arnaud-Cormos2012-06-281-1/+2
| | | | | | | | When switching from a header to a source file, the source->header mapping is cached. It's not the case anymore for private headers (_p). Change-Id: I481c0613e29db0a3fb4e17f339626abb49ffa8e2 Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
* ActionManager API cleanup.Eike Ziller2012-05-251-5/+3
| | | | | | | | d-pointer instead of inheritance static methods Change-Id: I7b2f0c8b05ad3951e1ff26a7d4e08e195d2dd258 Reviewed-by: hjk <qthjk@ovi.com>
* editormanager: simplify use of interfacehjk2012-05-111-3/+2
| | | | | | | Less code on the user side, same meaning. Change-Id: I14e54a5d2ed8e024a51cce74eaf7c8419ad544be Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* [C++] Added object pool handling for CompletionAssistProvider.Erik Verbruggen2012-02-231-2/+0
| | | | | Change-Id: I89634989a7f360a30f7ed1bde4e67c93551ddfe4 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* Rename IFile->IDocument and FileManager->DocumentManagerEike Ziller2012-02-201-3/+3
| | | | | | | | 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>
* Removed module names from #include directives.Erik Verbruggen2012-02-151-9/+9
| | | | | | | | Getting the #include directives ready for Qt5. This includes the new-project wizards. Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* Move QtConcurrent library into Utils.Friedemann Kleint2012-02-091-1/+1
| | | | | | | | It causes a conflict with the new QtConcurrent library of Qt 5 and is quite small. Change-Id: Ib97ab6daf8f67a88300cf03f044ba3593a4cd270 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>
* Core::Filemanager: make some methods statichjk2012-01-251-2/+1
| | | | | | | This follows suit to the ICore changes. Change-Id: Iba2de1b1e3f2574fd1459892eae702e6af1cc7dc Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
* ProjectExplorer: make currentProject statichjk2012-01-241-3/+1
| | | | | | | | 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>
* Use new static ICore interface.hjk2012-01-241-8/+6
| | | | | Change-Id: I9b690d9b150c8d162b15370f9f8986267c9128f1 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
* C++: Replace non-absolute-critical asserts for soft onesLeandro Melo2012-01-241-1/+2
| | | | | Change-Id: I021074a78d90929b4e83b8aff9db1ae7995e8c6a Reviewed-by: hjk <qthjk@ovi.com>
* Add a cache for the header/source mapping.Nicolas Arnaud-Cormos2012-01-111-2/+10
| | | | | | | | | Now that we are iterating all the files in the project (instead of stopping at the first success), we need a cache to make the switching fast enough on big projects. Change-Id: Ib7d63c93b3303c534ca53856d96333a822046ced Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
* Fix the switch header/source action.Nicolas Arnaud-Cormos2012-01-111-10/+33
| | | | | | | | In case multiple files have the same name (in a complex project), find the file with the most common path instead of the first one. Change-Id: I75495dabe7ba8f5142d6b52e7c07d54d5d6f54bd Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
* C++: Automatic Doxygen comment blocks generationLeandro Melo2011-12-091-1/+0
| | | | | | | | | | | | | | 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>
* 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>
* C++ switch header/source: Always prefer file in same directory.Christian Kamm2011-09-281-44/+49
| | | | | | Change-Id: I4c029919dd0bd9103bfdb1604026745d07e5535a Reviewed-on: http://codereview.qt-project.org/5692 Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>