Commit Graph

579 Commits

Author SHA1 Message Date
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
Christian Kamm
6ee1027eaa Add missing license headers. 2010-07-09 15:47:25 +02:00
Christian Kamm
c8fae11222 C++ indenter: Fix for extending if conditions.
Task-number: QTCREATORBUG-1825
2010-07-08 13:08:03 +02:00
Christian Kamm
574afeb551 C++ indenter: Build fix for windows.
Done-with: Tobias Hunger
2010-07-08 12:31:52 +02:00
Christian Kamm
a8c5d1f84c C++ indenter: Be more careful when comparing states.
Task-number: QTCREATORBUG-1818
2010-07-08 10:18:24 +02:00
Christian Kamm
7ae3fd5a10 C++ indenter: Refactor to be independent of BaseTextDocumentLayout.
Done-with: Thomas Hartmann
2010-07-08 10:16:17 +02:00
Christian Kamm
486b23b8ef C++ indenter: Don't add continuation indent after function return type.
Task-number: QTCREATORBUG-1816
2010-07-08 08:48:36 +02:00
Christian Kamm
6078b36c9c C++ indenter: Enable class, struct, enum, namespace, using in functions.
Fixes incorrect indentation we got previously when they were used in a
statement context.
2010-07-08 08:36:34 +02:00
Christian Kamm
74ed3e8a11 C++ indenter: Add more functions to manage the indenter state. 2010-07-06 14:53:54 +02:00
Roberto Raggi
7528b2c63a Compute the dependecy table on demand. 2010-07-06 14:35:23 +02:00
Christian Kamm
bf7613d2e7 C++ indenter: Add special case rule for indenting enums.
So you now get
enum A { a = 2,
         b = 3,
       };
2010-07-06 13:54:21 +02:00
Christian Kamm
8dbbf9be92 C++ indenter: Require explicit state update requests.
This will allow much faster indenting of selected areas as the state
doesn't have to be checked again for every line.
2010-07-06 13:52:49 +02:00
Erik Verbruggen
69a74abf26 Fixed completion for doxygen comments. 2010-07-06 10:57:56 +02:00
Christian Kamm
793ef6a694 C++ indenter: Fix 'else' indentation in GNU style. 2010-07-06 09:44:35 +02:00
Erik Verbruggen
45e12ccb42 Fixed scope calculation in code completion. 2010-07-06 09:19:20 +02:00
Erik Verbruggen
5d888caeb9 Added ObjC completion for message-send expressions. 2010-07-06 09:19:20 +02:00
Bill King
c9710052bb Fix autotests so that they're compiling again. 2010-07-06 14:37:45 +10:00
Roberto Raggi
84ebb1048d Moved CheckUndefinedSymbols to the cpptools plug-in. 2010-07-05 17:35:54 +02:00
Christian Kamm
27578a6c2c C++: Use the new indenter.
Reviewed-by: Roberto Raggi
2010-07-05 13:49:12 +02:00
Christian Kamm
e48864684e C++ indenter: Store tab size and use it to calculate the column position 2010-07-05 13:49:12 +02:00
Christian Kamm
19db6c9826 C++ indenter: Make building custom styles easier, fix style issues.
Keep more information by using enter() instead of turnInto() when moving
from a *_start to *_open.
2010-07-05 13:49:12 +02:00
Christian Kamm
3100fc0b7e C++ indenter: Add support for other brace styles. 2010-07-05 13:49:12 +02:00
Roberto Raggi
3a88dc624f Fixed function-like code completion.
This was a regression introduced in 8e4fb678fd
triggersCompletion should return `true' when the token at the left of the T_LPAREN
is an identifier, a SIGNAL, a SLOT or T_GREATER (for template functions).
2010-07-05 11:06:15 +02:00
Christian Kamm
88f2e340bd C++: Introduce the new CodeFormatter.
Done-with: Erik Verbruggen
2010-07-02 16:13:12 +02:00
Erik Verbruggen
8e4fb678fd Removing SimpleToken 2010-07-02 11:18:51 +02:00
Erik Verbruggen
e3e8b1a5c0 Removed the TokenCache. 2010-07-02 11:18:51 +02:00
hjk
2f5f358ff4 Core::Context: compile hot fix for Windows. 2010-06-25 17:38:25 +02:00
hjk
c7e8b51d37 core: use a class derived from QList<int> instead of a QList<int> for Core::Context
A mostly mechanical change.

Reviewed-By: con
2010-06-25 12:58:07 +02:00
Roberto Raggi
91eff02007 Moved CppRefactoringChanges. 2010-06-22 12:13:30 +02:00
Roberto Raggi
a19f802529 Preprocess the source file. 2010-06-22 12:13:29 +02:00
Erik Verbruggen
491675559d Added snippet expansion to the C++ code completion. 2010-06-18 10:58:35 +02:00
Thorbjørn Lindeijer
a1a565b9c5 Two more columnNumber() calls that should be positionInBlock()
columnNumber() relies on text wrapping, and we're only interested in the
position of the cursor in the block.
2010-06-16 18:03:43 +02:00
Erik Verbruggen
297b281ced Added infrastructure to change multiple files at once. 2010-06-14 15:03:10 +02:00
Erik Verbruggen
e42ca194c5 Introduced token caching to prevent repetetive tokenizing.
Also removed TokenUnderCursor as it's functionality is in the token cache.

Reviewed-by: ckamm
2010-06-14 10:10:05 +02:00
con
2e10016210 Version update to match the planned version naming. 2010-06-11 16:41:11 +02:00
Roberto Raggi
f5dae8bc9f Refactored the quickfix engine. 2010-06-07 12:16:45 +02:00
Erik Verbruggen
424b9724d6 Revert "Introduced a token cache for the C++ editor."
This reverts commit c2393df023.
2010-06-04 12:37:26 +02:00
Erik Verbruggen
c2393df023 Introduced a token cache for the C++ editor.
This should speed things up a bit, because before, the line was tokenized at
least 3 times.
2010-06-04 09:36:05 +02:00
Roberto Raggi
99b2020cb3 Check the type of the token that triggered the completion. 2010-06-02 15:22:42 +02:00
Roberto Raggi
ffa66f4fb5 Fixed the global completion to include the injected class name and user types. 2010-06-02 13:59:01 +02:00
Roberto Raggi
1c078ec2a3 Ensure we keep the context around for as long as it is needed. 2010-05-31 12:37:15 +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
75bcf2bc66 Speedup global completion.
Don't sort the global completion items when we have too many of them, instead
populate the completion box in a way where local symbols are showed before
global symbols.
2010-05-27 19:00:44 +02:00
Roberto Raggi
653ca110fe Removed DeprecatedLookupContext. 2010-05-26 15:56:12 +02:00
Erik Verbruggen
54e09a1802 Changed C++ code completion to use the new LookupContext. 2010-05-26 15:51:29 +02:00
Roberto Raggi
d702119dca Revert "Sort the items lazily."
This reverts commit 13a721d985.
2010-05-26 15:14:50 +02:00
Roberto Raggi
30e1d00725 Revert "Clear the completion."
This reverts commit bb35b4d081.
2010-05-26 15:14:40 +02:00
Roberto Raggi
bb35b4d081 Clear the completion. 2010-05-26 14:47:04 +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