- Mar 31, 2016
-
-
Nikolai Kosjar authored
There are three cases that must be handled: 1. Completion in C++ style comment 2. Completion in first line of a C style comment 3. Completion in non-first line of a C style comment This change fixes case 1 + 2. Case 3 will be addressed in a follow-up change, same goes for the duplication. Task-number: QTCREATORBUG-15143 Change-Id: I449711f965ddcbbe6158870a8a5ae33218e0d238 Reviewed-by:
David Schulz <david.schulz@theqtcompany.com>
-
- Jan 19, 2016
-
-
Tobias Hunger authored
* Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by:
Tobias Hunger <tobias.hunger@theqtcompany.com>
-
- Oct 06, 2015
-
-
Daniel Teske authored
Didn't work if there was any folded text before the #include. Change-Id: I8f16205f06bfaa8b8541401a9ebd5995c15b2227 Reviewed-by:
Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> Reviewed-by:
Daniel Teske <daniel.teske@theqtcompany.com>
-
- Jun 03, 2015
-
-
Nikolai Kosjar authored
Needed for the ClangCodeModel tests, where we need to activate the clang code model. Change-Id: I368b840875ca2a46da4535338bf55967cbcdf5ea Reviewed-by:
Marco Bubke <marco.bubke@theqtcompany.com>
-
- Apr 24, 2015
-
-
Nikolai Kosjar authored
For indexing we used a custom revision that was updated on each modelManager BuiltinIndexingSupport::refreshSourceFiles() call. This could lead to rejection of updated documents triggered by refactoring actions, like for the following case: 1. Open a project containing a.h and a.cpp 2. Open a.cpp, insert some new lines, save and close the document 3. Open a.h and rename a function that is defined in a.cpp --> The refactoring action modifies a.h and a.cpp, so re-indexing of those is triggered. Since a.cpp has already a higher revision (step 2) than the updated document, the updated document is discarded. As a consequence find usages and follow symbol fails for the renamed function. Now the document call back provided to CppSourceProcessor is responsible for updating the document revision based on the latest revision in the global snapshot. Change-Id: I4dfa0a4d34991655acfa749109f00c47b0fbfdbe Reviewed-by:
Orgad Shaneh <orgads@gmail.com> Reviewed-by:
Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by:
Eike Ziller <eike.ziller@theqtcompany.com>
-
- Apr 13, 2015
-
-
Nikolai Kosjar authored
Regression introduced by commit 9fb5b0be CppTools: Add basic completion support for qt5 style signals/slots Change-Id: I0a8e5ef31c1394512a51a26ed08b0f445add5acd Reviewed-by:
Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by:
Eike Ziller <eike.ziller@theqtcompany.com>
-
- Jan 16, 2015
-
-
Eike Ziller authored
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by:
Alessandro Portale <alessandro.portale@digia.com>
-
- Dec 15, 2014
-
-
Nikolai Kosjar authored
This implements the actual include_next logic and thus completes commit b934cc19 C++: pass #include_next down to CppPreprocessor::tryIncludeFile commmit 140b5029 C++: Highlight argument to gcc's #include_next extension Based on https://gcc.gnu.org/onlinedocs/cpp/Wrapper-Headers.html Task-number: QTCREATORBUG-10225 Change-Id: I7eef7f5ea64a114f6d092304d32b72c55c2ce134 Reviewed-by:
hjk <hjk121@nokiamail.com> Reviewed-by:
Erik Verbruggen <erik.verbruggen@theqtcompany.com>
-
- Dec 03, 2014
-
-
Nikolai Kosjar authored
...if the project was updated in the meanwhile. If a project is updated mark invisible editor documents dirty and update them if they get focus. This also fixes document highlighting when restoring a session for documents that the user "switched away" before the project info is pushed to CppModelManager. This completes CppTools: Update visible documents on project update commit c2eb91e0 which only takes care of visible documents. Task-number: QTCREATORBUG-13270 Change-Id: Id445e7f509deac5d03194aecc54ce4629b7926ce Reviewed-by:
Erik Verbruggen <erik.verbruggen@theqtcompany.com>
-
- Oct 09, 2014
-
-
Eike Ziller authored
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by:
Alessandro Portale <alessandro.portale@digia.com>
-
- Oct 02, 2014
-
-
David Schulz authored
Change-Id: Ie6aaaa5d99ba3823d9d42331f45b2dcab397e1cd Reviewed-by:
Nikolai Kosjar <nikolai.kosjar@digia.com>
-
- Sep 19, 2014
-
-
hjk authored
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>
-
- Jul 24, 2014
-
-
Nikolai Kosjar authored
So far the pre-compiled headers were processed (thus defines from those headers were visible), but the actual includes for the documents were not added, which is necessary for lookup/completion. Note that this will be only done if pre-compiled headers are not ignored (Options > C++ > Code Model > [] Ignore pre-compiled headers). Change-Id: I54a8e6b00597af164d958e3e9f2a1075ea187788 Reviewed-by:
Erik Verbruggen <erik.verbruggen@digia.com>
-
- Jul 15, 2014
-
-
Tobias Hunger authored
Change-Id: Id86b72b275d3381a32003c0439ff2d6b3b6ab505 Reviewed-by:
Erik Verbruggen <erik.verbruggen@digia.com>
-
- Jul 04, 2014
-
-
Nikolai Kosjar authored
Change-Id: I199e912203f329ec9b8bed2eb105e4a56f729e7d Reviewed-by:
Erik Verbruggen <erik.verbruggen@digia.com>
-
- Jun 10, 2014
-
-
Nikolai Kosjar authored
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>
-
Nikolai Kosjar authored
They belong there. This will also kill the CppSourceProcessor dependency from CppEditor. Change-Id: Ic2ae6b0c6f0913d913636be61df194846985d1ce Reviewed-by:
Erik Verbruggen <erik.verbruggen@digia.com>
-
- Jun 04, 2014
-
-
Nikolai Kosjar authored
...since it does quite a bit more than only preprocessing, as the name suggests. We use that class to process source files in general. The output is not a preprocessed source, but a set of CPlusPlus::Documents with symbols. Change-Id: I787d0f22f9f042ddf0c99e8c2f0bdb9aa7001735 Reviewed-by:
Erik Verbruggen <erik.verbruggen@digia.com>
-
- Jun 03, 2014
-
-
Nikolai Kosjar authored
This caused displaced highlighting of macro uses after #if constructs. MacroUse::utf16charBegin() was based on the last "continuation token", which was wrong. Change-Id: I89983d82fcf804ba853c04a59a7533c489785d05 Reviewed-by:
Erik Verbruggen <erik.verbruggen@digia.com>
-
- May 28, 2014
-
-
Erik Verbruggen authored
This string table uniques strings, so that multiple identical strings share their contents. It is used by the locator and the symbol searcher, and will later be used by the class view. Change-Id: Ib8b50f69bbf994d0d7a39b66dc8caf1a3d9bfb42 Reviewed-by:
Nikolai Kosjar <nikolai.kosjar@digia.com>
-
- Mar 10, 2014
-
-
Nikolai Kosjar authored
...of type 'No such file or directory' to the CPlusPlus::Document. Only the first one was added and as a result, the editor only wavely underlined that one. Add also diagnostic messages if it's not possible to get the file contents. Change-Id: I8389d8e6af9480ea6712759ce5e130e1dd8912f1 Reviewed-by:
Erik Verbruggen <erik.verbruggen@digia.com>
-
- Feb 24, 2014
-
-
Nikolai Kosjar authored
...in CPlusPlus::Document due to cyclic includes. Task-number: QTCREATORBUG-11457 Change-Id: I1ca19c901c26d9984d795a61879dd6b41c57096c Reviewed-by:
Orgad Shaneh <orgads@gmail.com> Reviewed-by:
Erik Verbruggen <erik.verbruggen@digia.com>
-
- Feb 20, 2014
-
-
Nikolai Kosjar authored
Use QCOMPARE instead of QVERIFY where appropriate. Change-Id: I7965a00fd004b8c3a20186bb692bf541f154d12b Reviewed-by:
Orgad Shaneh <orgads@gmail.com>
-
- Jan 21, 2014
-
-
Orgad Shaneh authored
Task-number: QTCREATORBUG-5456 Change-Id: I0bb4756e3cdf3c87a4c2b0fbfe6953faaa5e1c52 Reviewed-by:
André Hartmann <aha_1980@gmx.de> Reviewed-by:
Erik Verbruggen <erik.verbruggen@digia.com>
-
Orgad Shaneh authored
Task-number: QTCREATORBUG-11031 Change-Id: I93cce0ebf46984eb06094e1f1519717be2bbaa79 Reviewed-by:
Orgad Shaneh <orgads@gmail.com> Reviewed-by:
Erik Verbruggen <erik.verbruggen@digia.com>
-
Orgad Shaneh authored
Dynamically create data files in tempPath and clean them up when finished. Change-Id: Ie78f557b185b264acc0d0f5814646c203d8a93f4 Reviewed-by:
Petar Perisin <petar.perisin@gmail.com> Reviewed-by:
Erik Verbruggen <erik.verbruggen@digia.com>
-
- Jan 08, 2014
-
-
Robert Loehning authored
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by:
Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by:
Kai Koehne <kai.koehne@digia.com>
-
- Dec 23, 2013
-
-
Orgad Shaneh authored
Mostly done using the following Ruby script: Fname = 'src/plugins/cpptools/cppcompletion_test.cpp' s = File.read(Fname) mod = s.gsub(/(?<declaration>void CppToolsPlugin::test_(?<test_name>[^(]+)\(\)\n\{)(?<body>.*?\n)\}/m) { |func| match = $~ declaration = match['declaration'] body = match['body'] test_name = match['test_name'].sub('_data', '') final = body.gsub(/(?:completions.clear\(\);\s+)?(?: +)[^\n]* =\n(?<code>.*?);\s*(?<completions>(?:completions.append\(QLatin1String\("[^"]*"\)\);\s*)*)QTest::newRow\("case: (?<name>.+?)"\)\s*<< code << _\("(?<prefix>[^"]+)"\) << completions;/m) { m = $~ res = " QTest::newRow(\"#{test_name}: #{m['name']}\") << _(\n#{m['code'].rstrip}\n ) << _(\"#{m['prefix']}\") << (QStringList()" m['completions'].scan(/completions.append\((.+)\);/) { |comp| res << "\n << #{comp[0]}" } res + ');' }.gsub(/(?: +)[^\n]* =\n(?<code>.*?);\n\s*CompletionTestCase test\(.+?, "(?<prefix>.+?)"\);\s*QStringList expected;\s*(?<completions>(?:expected.append\(QLatin1String\("[^"]*"\)\);\s*)*)const QStringList completions = test.getCompletions\(\);\s*QCOMPARE\(completions, expected\);/m) { m = $~ res = " QTest::newRow(\"#{test_name}\") << _(\n#{m['code'].rstrip}\n ) << _(\"#{m['prefix']}\") << (QStringList()" m['completions'].scan(/expected.append\((.+)\);/) { |comp| res << "\n << #{comp[0]}" } res + ');' }.gsub(/(?: +)[^\n]* =\n(?<code>.*?);\n\s*CompletionTestCase test\(.+?(?:, (?<prefix>".+?"))?\);\s*(?:const )?QStringList completions = test.getCompletions\(\);\s*QCOMPARE\(completions.size\(\), \d+\);(?<completions>(?:\s*QVERIFY\(completions.contains\([^\n]+\);)*)\n/m) { |mm| m = $~ res = " QTest::newRow(\"#{test_name}\") << _(\n#{m['code'].rstrip}\n ) << _(#{m['prefix']}) << (QStringList()" m['completions'].scan(/QVERIFY\(completions.contains\((.+?)\)\);/) { |comp| res << "\n << #{comp[0]}" } res + ");\n" }.gsub(/(?: +)[^\n]* =\n(?<code>.*?);\n\s*CompletionTestCase test\(.+?(?:, (?<prefix>".+?"))?\);\s*bool replaceAccessOperator = false;\s*const QStringList completions = test.getCompletions\(\&replaceAccessOperator\);\s*QCOMPARE\(completions.size\(\), \d+\);(?<completions>(?:\s*QVERIFY\(completions.contains\([^\n]+\);)*)\s*QVERIFY\((?<replace>!?)[^)]*\);\n/m) { |mm| m = $~ res = " QTest::newRow(\"#{test_name}\") << _(\n#{m['code'].rstrip}\n ) << _(#{m['prefix']}) << (QStringList()" m['completions'].scan(/QVERIFY\(completions.contains\((.+?)\)\);/) { |comp| res << "\n << #{comp[0]}" } res + ")\n << #{m['replace'].empty?};\n" } if final == body or final['QTest::addColumn'] declaration + final + "}" else final end }.gsub(/QTest::newRow\("([^"]+)"/) { |m| name = $1 if name.size > 73 space = name[0..73].rindex(/[ _]/) "QTest::newRow(\"#{name[0..space]}\"\n \"#{name[space+1..-1]}\"" else m end }.gsub(/\s+QTest::newRow/, "\n\n QTest::newRow") if mod != s File.open(Fname, 'wt').write(mod) end Change-Id: Id6bfb03cdf31ac27b36028fcdc861c340a5398f4 Reviewed-by:
Nikolai Kosjar <nikolai.kosjar@digia.com>
-
- Dec 11, 2013
-
-
Nikolai Kosjar authored
...and rename it to FunctionUtils. Change-Id: If076ec01fd82e8ba728764bdeab7e87e8bc1ff3b Reviewed-by:
Erik Verbruggen <erik.verbruggen@digia.com>
-
- Nov 22, 2013
-
-
Przemyslaw Gorszkowski authored
Example: namespace NS { struct S { int member; void fun(); }; } using NS::S; void S::fun() { mem// ctrl+space } Task-number: QTCREATORBUG-9037 Change-Id: I5a568be1b5c44deb02caa04996167a88a9c5d4d7 Reviewed-by:
Nikolai Kosjar <nikolai.kosjar@digia.com>
-
- Nov 12, 2013
-
-
Nikolai Kosjar authored
Change-Id: I7a82f2b22105d4e096fc0bd69679adacdde2c731 Reviewed-by:
Erik Verbruggen <erik.verbruggen@digia.com>
-
- Oct 18, 2013
-
-
Nikolai Kosjar authored
This reverts commit 5be56c07 except for its tests. While it fixed the problem described in the bug report, it also introduced regressions. For now, we use a hard limit. Change-Id: I19a85be454e3d7969371707e3eb1c3d42a16ecee Reviewed-by:
Przemyslaw Gorszkowski <pgorszkowski@gmail.com> Reviewed-by:
Erik Verbruggen <erik.verbruggen@digia.com>
-
- Oct 17, 2013
-
-
Przemyslaw Gorszkowski authored
This is the first phase of fixing bug QTCREATORBUG-10320. This change resolves typedefs of template parameters(and resolves problem with endless loop). The next step will be matching appropriate template specialization (this is needed to solve problem with missing code completion). Missing matching: template specialization with the same parameters, e.g.: template <class T1, class T2, class T3> class T { }; template <class T1, class T2> class T<T1, T2, T2> { }; Task-number: QTCREATORBUG-10320 Change-Id: Icb6b539c021b2a67a66db9011a2e627f7d96526b Reviewed-by:
Przemyslaw Gorszkowski <pgorszkowski@gmail.com> Reviewed-by:
Nikolai Kosjar <nikolai.kosjar@digia.com>
-
- Oct 01, 2013
-
-
Erik Verbruggen authored
The UI side will come in another commit. Change-Id: I1038a438587fe4cef70408f7f627d08837fc192d Reviewed-by:
Nikolai Kosjar <nikolai.kosjar@digia.com>
-
Erik Verbruggen authored
Task-number: QTCREATORBUG-476 Change-Id: I82ed92acdcda551d2c6a9ca221832ac20117a08f Reviewed-by:
Nikolai Kosjar <nikolai.kosjar@digia.com>
-
Erik Verbruggen authored
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>
-
- Sep 13, 2013
-
-
Erik Verbruggen authored
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>
-
- Sep 03, 2013
-
-
Alexey Semenko authored
Since fuzzy completions are allowed, the lexicographically first proposal is not necessarily most relevant. The patch modifies sorting of proposals so that the exact match and continuations go first, and fuzzy completions follow. Moreover, being a continuation seem to be a more important characteristic of a proposal, than being it a function argument or keyword etc. That's why the check for continuation is placed before the check for order. Task-number: QTCREATORBUG-8737 Task-number: QTCREATORBUG-9236 Change-Id: I89aae9d2ce6bfa59af7c2f75e6f3af00212008ca Reviewed-by:
André Hartmann <aha_1980@gmx.de> Reviewed-by:
Alexey Zhondin <lexxmark.dev@gmail.com> Reviewed-by:
Nikolai Kosjar <nikolai.kosjar@digia.com>
-
Orgad Shaneh authored
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>
-
- Aug 22, 2013
-
-
Nikolai Kosjar authored
Change-Id: Ia36e7e7142dbc030a428369ed04e76e70e8eef0b Reviewed-by:
Erik Verbruggen <erik.verbruggen@digia.com>
-