David Schulz
141f19a652
Utils: move code model icons to utils
...
In preperation for the language server protocol support.
Change-Id: Iee4ccd53a86d9afdb357972ea62b75ace2edcb1d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io >
2018-08-06 13:22:47 +00:00
Nikolai Kosjar
6b70c27e3b
Clang: Do not show diagnostic category in inline annotations and issues pane
...
For build system diagnostics they are not displayed either.
Also, the error/warning is already encoded in the icon and the color.
However, the category is still shown in the tooltip.
Change-Id: I190ab17691c32786cefc20d058010c65cda5ace9
Reviewed-by: David Schulz <david.schulz@qt.io >
2018-05-14 07:01:46 +00:00
Ivan Donchevskii
524d3ea28b
Clang: Helper function to get token IconType
...
Change-Id: I9de562102eded9391ab0d6b895b8d812e259efd6
Reviewed-by: Marco Bubke <marco.bubke@qt.io >
2018-02-20 12:44:56 +00:00
Ivan Donchevskii
eb1f85a971
Clang: simplify column convertion calls
...
Pass QTextBlock directly into clangColumn call.
Change-Id: I3410a82ed9a84da66e7b430e2aefce64ec459db8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io >
2018-02-01 14:14:15 +00:00
Ivan Donchevskii
fbbdfd2444
Clang: Add commentary about column convertion
...
... to/from utf8 byte offset used by Clang.
Change-Id: I294d6cd61b416e5f2d64206ee2f3f1b4a91fb1d3
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io >
2018-02-01 12:22:45 +00:00
Ivan Donchevskii
09310bcdc6
Clang: fix utf8 related column numbers
...
Use new clang_getFileContents to efficiently convert
utf8 byte offsets from line start to column numbers.
Also provide simplier backwards convertion to pass
resulting utf8 offset to clang.
Task-number: QTCREATORBUG-16941
Change-Id: If0e58fe01ad3e281b7e952e972b9e86f6e75aadb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io >
2018-01-26 15:39:31 +00:00
Ivan Donchevskii
707170ca04
Clang: make workaround for multibyte utf8
...
Correct columns in clang diagnostics and completion
Task-number: QTCREATORBUG-16775
Change-Id: I7260a0e52007fe261e83492dca5d457c34476497
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io >
2017-05-22 13:28:36 +00:00
Nikolai Kosjar
6cf1f7968f
Clang: Fix initial document parse with modified content
...
Reproduce with:
1. Create a new class named Foo with the wizard.
2. Close foo.h
3. In foo.cpp, add some class member function.
4. In foo.cpp, trigger the refactoring action "Add public Declaration"
for the just defined member function. As a result, foo.h will be
opened.
==> While the declaration was added, the header file is not yet
reparsed with the new content - this can be verified by setting
a custom color for "Function".
In this use case, the refactoring action opens the editor and
immediately modifies the document (RefactoringFile::apply).
Fix by sending the document content along for the very first
RegisterTranslationUnitForEditorMessage if the document was already
modified.
Change-Id: If20615a45b72dd0bef87e1870e403d0b277bc5d6
Reviewed-by: David Schulz <david.schulz@qt.io >
2016-11-23 11:50:39 +00:00
Denis Klychkov
36d4d01cd3
Clang: Take precompiled headers into account when parsing source files
...
Task-number: QTCREATORBUG-15590
Change-Id: Icbfce4ffd6e9f9802641d35d898fa1dc1c4c18ee
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io >
2016-11-16 09:10:14 +00:00
hjk
39a38d5679
Wholesale conversion to #pragma once
...
Kudos to cgmb and https://github.com/cgmb/guardonce
Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com >
2016-03-30 15:20:19 +00:00
Tobias Hunger
397e7f4843
Update License according to agreement with Free Qt Foundation
...
* Update files in src/plugins
Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com >
2016-01-19 15:57:01 +00:00
Marco Bubke
ddd1d4c9cc
CppTools: Remove cpptools/cppprojects.[h|cpp]
...
Change-Id: Ida0e8552d371972c141cf561b28667f4428c6fff
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com >
2016-01-13 14:47:27 +00:00
Nikolai Kosjar
5d1e894ef5
Clang: Remove left-over logging category
...
Change-Id: I6724d045e6d404f518d579bd10abdea47b8fa697
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com >
2015-12-08 15:42:36 +00:00
Nikolai Kosjar
6a393afeda
Clang: Remove unneeded CLANG_EXPORT
...
Change-Id: Ib05f97212758a4dd3f1abb7774f071c9385377b4
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com >
2015-11-30 11:04:02 +00:00
Nikolai Kosjar
5f98b8ec24
Clang: Remove PchManager
...
...which is the last dependency to libclang from the plugin.
Change-Id: I173ee7e9621912ec88706b4cf62db2b1dbcf7610
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com >
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com >
2015-11-30 11:03:51 +00:00
Nikolai Kosjar
daf9369679
Clang: Remove dead code
...
Change-Id: Ia36e96424580d9b34000cf4a9b38eab98f9c449c
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com >
2015-11-30 11:03:04 +00:00
Nikolai Kosjar
c45f08cdae
Clang: Rename isProjectPartValid to isProjectPartLoaded
...
Change-Id: Ib20700ebb7142cfa9e75edff3b21410fd3bdab05
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com >
2015-10-14 10:12:08 +00:00
Marco Bubke
250c8d662b
Clang: Add UpdateTranslationUnitsForEditorMessage
...
If an editor is changing all translation units independent of their project
part they must be updated too. So we introduce a new message to update all
translation units with the same file path.
Change-Id: I70d0ea2bbca9fa880111ff7219573e54f3277026
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com >
2015-10-13 14:03:11 +00:00
Nikolai Kosjar
420bc69739
CppTools: Use project part ids instead of file paths
...
File paths are not unique since e.g. each qbs group in a file is mapped
to a project part.
Change-Id: I7df3f224dd23046b869f2588b8a34eb26cfc0b1a
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com >
2015-07-20 09:49:14 +00:00
Nikolai Kosjar
418fc32f6a
Clang: Do not call DocumentManager::modifiedDocuments() from worker thread
...
This is unsafe.
Change-Id: I8ac075a7289afa0d84785e37b1325d186a153000
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com >
2015-07-10 14:04:19 +00:00
Nikolai Kosjar
23b8a3b2e8
Clang: Use completion through backend process
...
This makes us independent of libclang crashes for completion.
Re-parsing for highlighting still happens in the Qt Creator process.
Run in verbose mode:
qtc.clangcodemodel.ipc=true
Run tests:
-test "ClangCodeModel"
Task-number: QTCREATORBUG-14108
Task-number: QTCREATORBUG-12819
Change-Id: Id3e95bd2afdb6508bbd1d35fddc69534a909b905
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com >
2015-06-10 10:15:40 +00:00
Eike Ziller
3c85058694
Update License
...
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com >
2015-01-16 12:37:56 +01:00
Nikolai Kosjar
bf3c55be42
ClangCodeModel: Make use of QLoggingCategory
...
Change-Id: I28d50e224803096c032ae6e387bf1346db4cc216
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com >
2014-11-03 12:11:04 +01:00
Nikolai Kosjar
f07b876a93
Move some functions from ClangCodeModel to CppTools
...
Most of the functions were quite generic and not specific to clang.
Change-Id: I160cfeb7eca5b69ad6a8932a4f76db5bf5c1d42d
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com >
2014-10-20 13:11:08 +02:00
Nikolai Kosjar
1754dbf6ff
Clang: Make some functions available
...
Change-Id: I1d2d898e5ab197eb3e5c95e82b6668a00affce7d
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com >
2014-10-16 11:10:16 +02:00
Eike Ziller
ea27143239
Merge remote-tracking branch 'origin/3.2'
...
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
2014-10-14 15:36:16 +02:00
Eike Ziller
8295b503be
License update
...
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com >
2014-10-09 11:41:44 +02:00
hjk
b26a17f30d
CppTools: Change CppModelManager implementation pattern
...
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 >
2014-09-19 13:17:55 +02:00
Erik Verbruggen
990cedeb1b
C++: remove C/C++ distinction from ProjectPart fields.
...
.. because they now hold only files for a single language+extensions
combination.
Task-number: QTCREATORBUG-11709
Task-number: QTCREATORBUG-12818
Change-Id: If294f6de07d60126be733d98de12b89b8af3efce
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com >
2014-09-16 17:01:35 +02:00
Nikolai Kosjar
b8a6a4dd4e
CppTools: Move WorkingCopy to new cppworkingcopy.{h,cpp}
...
Change-Id: I447acf28849bffb52c1e6b6eafdde221ec0b179e
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com >
2014-08-20 10:26:47 +02:00
Robert Loehning
5292748bf2
Incremented year in copyright info
...
Change-Id: I6e25ba25aa2898b5382dae7f3751deebb6072efa
Reviewed-by: Eike Ziller <eike.ziller@digia.com >
2014-01-09 09:41:23 +01:00
Erik Verbruggen
5beb74fd9d
Add experimental clang code-model plug-in.
...
Previously known as the wip/clang branch.
Contributors (in alphabetical order):
- Christian Kamm <christian.d.kamm@nokia.com >
- Erik Verbruggen <erik.verbruggen@digia.com >
- Leandro Melo <leandro.melo@nokia.com >
- Peter Kuemmel <syntheticpp@gmx.net >
- Sergey Shambir <sergey.shambir.auto@gmail.com >
Change-Id: I4c3ff600a19b6732641c1d5ef28236bf2cc17737
Reviewed-by: hjk <hjk121@nokiamail.com >
2013-12-20 17:05:09 +01:00