Commit Graph

71 Commits

Author SHA1 Message Date
hjk
9a6c4a42f7 completion: enable multiple completors for different use cases.
Introduce CompletionPolicy enum, use 'TextCompletion' for the new plain
text completion, and 'SemanticCompletion' or 'QuickFixCompletion' for
the existing cases.

Reviewed-by: Erik Verbruggen
2011-02-21 14:04:43 +01:00
con
d1023c7614 It's 2011 now.
Reviewed-by: hjk
2011-01-12 09:46:24 +01:00
con
b1bcf081d8 Merge branch '2.1'
Conflicts:
	src/plugins/coreplugin/basemode.cpp
	src/plugins/coreplugin/basemode.h
	src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp
	src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h
	src/plugins/debugger/cdb/cdbsymbolpathlisteditor.cpp
	src/plugins/debugger/debuggeragents.cpp
	src/plugins/debugger/debuggeruiswitcher.cpp
	src/plugins/debugger/debuggeruiswitcher.h
	src/plugins/projectexplorer/buildconfigdialog.cpp
	src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp
	src/plugins/qmldesigner/components/propertyeditor/colorwidget.h
	src/plugins/qmldesigner/designercore/include/enumeratormetainfo.h
	src/plugins/qmldesigner/designercore/include/modelutilities.h
	src/plugins/qmldesigner/designercore/include/nodeinstance.h
	src/plugins/qmldesigner/designercore/include/propertymetainfo.h
	src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.h
	src/plugins/qmldesigner/designercore/instances/graphicsviewnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.h
	src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/qmlviewnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.h
	src/plugins/qmldesigner/designercore/metainfo/enumeratormetainfo.cpp
	src/plugins/qmldesigner/designercore/metainfo/propertymetainfo.cpp
	src/plugins/qmldesigner/designercore/model/modelutilities.cpp
	src/plugins/snippets/inputwidget.cpp
	src/plugins/snippets/snippetscompletion.cpp
	src/plugins/snippets/snippetscompletion.h
	src/plugins/snippets/snippetspec.cpp
	src/plugins/snippets/snippetsplugin.cpp
	src/plugins/snippets/snippetswindow.cpp
	src/plugins/snippets/snippetswindow.h
	src/plugins/texteditor/snippetsparser.cpp
	src/tools/qml/qmldom/main.cpp
	tests/manual/trk/runner.cpp
	tests/manual/trk/trkolddevice.cpp
	tests/manual/trk/trkolddevice.h
	tests/manual/trk/trkserver.cpp
2010-12-17 17:00:53 +01:00
con
04e32b0049 License headers. 2010-12-17 16:03:42 +01:00
Leandro Melo
1175705bfc Snippets: Make it easier for plugins to add snippets groups
Groups are no longer enum values but identified from snippet providers.
2010-12-08 17:22:13 +01:00
Leandro Melo
7528c6d617 Snippets: Feature enhancement start...
Provide an interface so users can create/edit/remove snippets.
2010-12-08 17:22:07 +01:00
Leandro Melo
cafcce0c37 Add support for C++ snippets. 2010-09-24 20:22:03 +02:00
Roberto Raggi
7de836bf85 Don't complete the current item when pressing special characters (e.g. `;') if the completion is automatically triggered. 2010-07-19 10:32:25 +02:00
Thorbjørn Lindeijer
2c51e0c9da Automatically trigger completion for C++ editor after three characters
Similar behaviour as for the QML editor. However, for now without
removing the completion box when you have typed the whole word, since it
could still be useful for automatically inserting other characters.

Task-number: QTCREATORBUG-67
2010-07-15 16:24:01 +02:00
Thorbjørn Lindeijer
b4cecd6ec8 Allow certain characters to also trigger the completion
Now you can type characters like ., ( and : to complete the selected
item, depending on the type of the completion item.

Task-number: QTCREATORBUG-271
Reviewed-by: Roberto Raggi
2010-07-09 15:52:09 +02:00
Erik Verbruggen
5d888caeb9 Added ObjC completion for message-send expressions. 2010-07-06 09:19:20 +02:00
Roberto Raggi
1b41c06590 Always remove the duplicates from the completion, even when the items are not sorted. 2010-05-28 15:22:57 +02:00
Roberto Raggi
d702119dca Revert "Sort the items lazily."
This reverts commit 13a721d985.
2010-05-26 15:14:50 +02:00
Roberto Raggi
13a721d985 Sort the items lazily. 2010-05-26 14:44:16 +02:00
Roberto Raggi
db7333e6bb Sort the completion items as soon as we have them. 2010-05-26 14:25:45 +02:00
Roberto Raggi
9e89f36cd9 There's no need to sort after filtering the completion. 2010-05-26 12:46:41 +02:00
Roberto Raggi
040e2a3049 Ported global completion to use the new LookupContext. 2010-05-26 12:35:40 +02:00
Erik Verbruggen
8f9e2eebe7 Added #preprocessor directive completion. 2010-05-18 17:57:49 +02:00
Roberto Raggi
35c50dcbfc Use the context created by TypeOfExpression. 2010-05-18 09:24:11 +02:00
con
1fd12ab63b Merge remote branch 'origin/2.0'
Conflicts:
	src/plugins/cpptools/cppcodecompletion.cpp
2010-05-12 17:25:40 +02:00
Thorbjørn Lindeijer
e53b5bc9a1 Fixed completion settings to also apply to the QML code completion
By moving the completion settings into the TextEditor plugin, so that
both the CppTools and the QmlJSEditor plugins can access the settings.

The user-interface to edit the settings is still in the CppTools plugin,
since we're in string freeze at the moment. It should be moved to the
TextEditor plugin later.

For now the QML completion only supports the case-sensitivity and
partial completion options, since there is no automatic insertion of
brackets.

Task-number: QTCREATORBUG-1327
Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
2010-05-11 15:11:12 +02:00
Roberto Raggi
139087ee5c Introduced Symbol::copy(otherSymbol) and removed some deprecated code. 2010-05-10 12:19:47 +02:00
Thorbjørn Lindeijer
b603e77f37 Fixed compile with g++ 4.4.3 2010-05-05 16:49:28 +02:00
Roberto Raggi
d9527680a9 Try to use the new LookupContext. 2010-05-05 16:36:46 +02:00
Roberto Raggi
66a9ef0725 Ported completeScope(), completeNamespace() and completeClass() to use the new LookupContext. 2010-05-05 16:36:45 +02:00
Roberto Raggi
32a84df5c0 Deprecated the current LookupContext. 2010-05-05 16:36:44 +02:00
Alexey Semenko
793ca97016 Add "insert space after function name" option for GNU indenting
Reviewed-by: mae
Merge-request: 133
2010-04-08 17:06:23 +02:00
hjk
9595504bda Long live the king! 2010-03-05 11:28:13 +01:00
Erik Verbruggen
8de6ccc775 Revert "Split Objective-C keyword parsing to handle the '@' separately."
This reverts commit 2a59d2ae0c.
2010-02-15 12:24:31 +01:00
Erik Verbruggen
2a59d2ae0c Split Objective-C keyword parsing to handle the '@' separately.
Because apparently, while designing the Objective-C language, somebody
thought it was a world-class idea to allow any white-space between the
'@' character and the subsequent keyword. With this fix, we now
correctly parse:
    @  dynamic
and:
    @
      selector
and:
    @"foo"
     "bar"
    @"mooze"
(This last one is 1 single string split over multiple lines.)
Wonderful, isn't it?

What we (and Clang) do not support, but what GCC supports is something
like:
   @"foo"@@  "bar"  @"mooze"  @@
which is equivalent to @"foobarmooze".
2010-02-15 09:27:00 +01:00
Roberto Raggi
1ba889a1bf Generalized the filtering of completion items. 2010-01-26 11:44:45 +01:00
Roberto Raggi
421f5323f1 Split CppCodeCompletion::startCompletion(). 2010-01-11 14:08:15 +01:00
Thorbjørn Lindeijer
3f1b45b057 Implemented first-letter case-sensitive for completion as default
By default now only the first letter is case-sensitive. It is still
possible to choose full or no case-sensitivity as well.

Task-number: QTCREATORBUG-236
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2009-12-09 19:26:34 +01:00
Roberto Raggi
f3bebd7f1b Moved Completion::getCompletion() in ICompletionCollector and made the filtering of completion items more C++ friendly. 2009-12-02 12:18:12 +01:00
Roberto Raggi
ecf40d2426 Get rid off QPair<FullySpecifiedType, Symbol *>. Use LookupItem intead. 2009-11-17 14:24:09 +01:00
Roberto Raggi
c13b8697d2 Introduced the quick fix engine 2009-11-13 16:14:38 +01:00
con
36d0d8500e Merge commit 'origin/1.3' 2009-11-09 11:36:19 +01:00
Christian Kamm
a253a69980 Do never offer signature autocompletion for constructor calls.
They should always use the function parameter tooltip.

This fixes a bug where you were offered completion for
C foo( -> C foo(int x)
if C had a constructor taking int x.

Reviewed-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
2009-11-09 10:13:17 +01:00
con
441ece365a Merge commit 'origin/1.3'
Conflicts:
	src/plugins/cpptools/cppcodecompletion.h
	src/plugins/debugger/gdb/gdbengine.cpp
	src/plugins/qmleditor/QmlEditor.pluginspec
2009-10-26 13:51:56 +01:00
Roberto Raggi
996866814a Initialize all the members of CppCodeCompletion 2009-10-21 17:05:36 +02:00
Christian Kamm
e3479d9942 Add completion for function signatures.
You now get the function parameters as a completion suggestion when
declaring or defining a function. The tooltip for function calls
is unchanged.

Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
(cherry picked from commit 202fef42ca)
2009-10-20 12:55:14 +02:00
Christian Kamm
202fef42ca Add completion for function signatures.
You now get the function parameters as a completion suggestion when
declaring or defining a function. The tooltip for function calls
is unchanged.

Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2009-10-19 14:19:28 +02:00
con
525ef4cc85 Merge remote branch 'origin/1.3'
Conflicts:
	src/plugins/cpptools/CppTools.pluginspec
	src/plugins/help/Help.pluginspec
	src/plugins/locator/Locator.pluginspec
	src/plugins/projectexplorer/ProjectExplorer.pluginspec
	src/plugins/texteditor/TextEditor.pluginspec
2009-10-16 14:40:40 +02:00
Roberto Raggi
8b514657cc Added support to complete function-call operators. 2009-10-16 12:23:16 +02:00
Erik Verbruggen
4b44fa5f4a Added Objective-C @-keywords to the completion. 2009-10-09 15:22:57 +02:00
Roberto Raggi
d43cbfbb15 Renamed `awesome' :) 2009-10-05 18:43:23 +02:00
Roberto Raggi
2d51d0b633 Removed the m_ prefix used in the public members of CompletionItem 2009-10-05 18:32:45 +02:00
hjk
93cbef8724 long live the king 2009-08-14 09:30:56 +02:00
Thorbjørn Lindeijer
47a2097341 Implemented include completion
Done-with: danimo
2009-07-23 16:49:36 +02:00
Jason McDonald
884b7af769 Update license headers and sales contact details.
Reviewed-by: Trust Me
2009-06-17 00:01:27 +10:00