Commit Graph

192 Commits

Author SHA1 Message Date
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
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
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
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
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
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
b0cc9fa4e7 Tuned the automatic preprocessor competion.
To only run if the pound/hash sign is at the start of the line.
2010-05-19 14:12:22 +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
Roberto Raggi
18490596f9 Renamed Document::findSymbolAt(). 2010-05-17 13:01:56 +02:00
Roberto Raggi
56c5c8266a Get rid off of typeid() and <typeinfo>. 2010-05-17 12:52:46 +02:00
ck
3e126d6a26 Compile fix. 2010-05-17 10:50:12 +02:00
Roberto Raggi
a600614866 Renamed classOrNamespace() and lookup/findClassOrNamespace(). 2010-05-14 13:55:24 +02:00
Roberto Raggi
3c6ad0d845 Instiate overloads of operator->(). 2010-05-14 13:55:22 +02:00
Roberto Raggi
f9a05d9ced Reimplemented resolve base expression. 2010-05-14 13:55:21 +02:00
Roberto Raggi
60f76c96e8 Improved LookupItem and get rid of some deprecated code. 2010-05-14 13:55:21 +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
Roberto Raggi
7526954e9a Removed debug info. 2010-05-10 09:57:56 +02:00
Roberto Raggi
aab9c52030 More work on template instantiation. 2010-05-10 09:57:56 +02:00
Roberto Raggi
c0429dbd2a Search for a valid class. 2010-05-06 10:36:11 +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
Thorbjørn Lindeijer
20636f529b Unified the three fake tooltip copies
Reviewed-by: mae
2010-04-15 15:08:51 +02:00
mae
0c7312e05d if a tooltip, do as tooltip do
The fake tooltip duplication is not nice.
2010-04-09 13:48:43 +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
Christian Kamm
5a7858f5ec Make sure the BackwardScanner has tokenized before asking for a string.
The problem was that for

Foo::Foo
(|)

when the user triggers completion at |, startOfLine() returns a token
that's not on the current line and not yet tokenized by that instance
of the BackwardScanner.

As a fix I explicitly ask the instance to tokenize up to the given
index.

Task-number: QTCREATORBUG-673
Reviewed-by: Roberto Raggi
2010-03-11 11:09:04 +01:00
Christian Kamm
9e75ff8ea2 Don't add the default arguments when completing function definitions.
Fixes QTCREATORBUG-787

Reviewed-by: Erik Verbruggen
2010-03-05 15:45:58 +01:00
hjk
9595504bda Long live the king! 2010-03-05 11:28:13 +01:00
Erik Verbruggen
2fee6b8a46 Fixed QTCREATORBUG-743 2010-02-22 17:34:06 +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
Friedemann Kleint
f672bff338 Fix some code scanning issues.
foreach()-Loops.
2010-02-01 14:00:07 +01:00
Roberto Raggi
1ba889a1bf Generalized the filtering of completion items. 2010-01-26 11:44:45 +01:00
Thorbjørn Lindeijer
49d511502f Fixed compile warning 2010-01-20 17:58:49 +01:00
Thorbjørn Lindeijer
f3b738bb66 Reuse local snapshot reference 2010-01-14 11:54:11 +01:00
con
7199223a6e Merge remote branch 'origin/1.3'
Conflicts:
	doc/qtcreator.qdoc
	doc/qtcreator.qdocconf
	src/app/Info.plist
	src/plugins/bineditor/BinEditor.pluginspec
	src/plugins/bookmarks/Bookmarks.pluginspec
	src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec
	src/plugins/coreplugin/Core.pluginspec
	src/plugins/coreplugin/coreconstants.h
	src/plugins/cpaster/CodePaster.pluginspec
	src/plugins/cppeditor/CppEditor.pluginspec
	src/plugins/cppeditor/cppeditor.cpp
	src/plugins/cpptools/CppTools.pluginspec
	src/plugins/cvs/CVS.pluginspec
	src/plugins/debugger/Debugger.pluginspec
	src/plugins/debugger/debuggeragents.cpp
	src/plugins/debugger/gdb/gdbengine.cpp
	src/plugins/designer/Designer.pluginspec
	src/plugins/fakevim/FakeVim.pluginspec
	src/plugins/find/Find.pluginspec
	src/plugins/genericprojectmanager/GenericProjectManager.pluginspec
	src/plugins/git/ScmGit.pluginspec
	src/plugins/helloworld/HelloWorld.pluginspec
	src/plugins/help/Help.pluginspec
	src/plugins/locator/Locator.pluginspec
	src/plugins/perforce/Perforce.pluginspec
	src/plugins/projectexplorer/ProjectExplorer.pluginspec
	src/plugins/qmleditor/QmlEditor.pluginspec
	src/plugins/qmleditor/idcollector.cpp
	src/plugins/qmleditor/idcollector.h
	src/plugins/qmleditor/parser/qmljsglobal_p.h
	src/plugins/qmleditor/qmlcodecompletion.cpp
	src/plugins/qmleditor/qmlcodeformatter.cpp
	src/plugins/qmleditor/qmlcodeformatter.h
	src/plugins/qmleditor/qmlexpressionundercursor.cpp
	src/plugins/qmleditor/qmllookupcontext.cpp
	src/plugins/qmleditor/qmlresolveexpression.cpp
	src/plugins/qmleditor/qmlsymbol.cpp
	src/plugins/qmleditor/qmlsymbol.h
	src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec
	src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec
	src/plugins/qtscripteditor/QtScriptEditor.pluginspec
	src/plugins/regexp/RegExp.pluginspec
	src/plugins/resourceeditor/ResourceEditor.pluginspec
	src/plugins/snippets/Snippets.pluginspec
	src/plugins/subversion/Subversion.pluginspec
	src/plugins/texteditor/TextEditor.pluginspec
	src/plugins/vcsbase/VCSBase.pluginspec
	src/plugins/welcome/Welcome.pluginspec
	src/shared/qml/parser/qmljsast.cpp
	src/shared/qml/parser/qmljsast_p.h
	src/shared/qml/parser/qmljsastfwd_p.h
	src/shared/qml/parser/qmljsastvisitor.cpp
	src/shared/qml/parser/qmljsastvisitor_p.h
	src/shared/qml/parser/qmljsengine_p.cpp
	src/shared/qml/parser/qmljsengine_p.h
	src/shared/qml/parser/qmljsgrammar.cpp
	src/shared/qml/parser/qmljsgrammar_p.h
	src/shared/qml/parser/qmljslexer.cpp
	src/shared/qml/parser/qmljslexer_p.h
	src/shared/qml/parser/qmljsmemorypool_p.h
	src/shared/qml/parser/qmljsnodepool_p.h
	src/shared/qml/parser/qmljsparser.cpp
	src/shared/qml/parser/qmljsparser_p.h
2010-01-12 18:02:04 +01:00