Commit Graph

45 Commits

Author SHA1 Message Date
con
458a25efa9 Merge remote branch 'origin/2.0'
Conflicts:
	doc/qt-html-templates.qdocconf
	src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp
	src/plugins/qmljseditor/qmljscodecompletion.cpp
2010-06-18 16:54:37 +02:00
Thorbjørn Lindeijer
16989185df Prefer static to anonymous namespace for global functions 2010-06-16 17:43:46 +02:00
Thorbjørn Lindeijer
173cdff56c Merge branch '2.0'
Conflicts:
	src/plugins/cppeditor/cppquickfix.cpp
	src/plugins/mercurial/mercurialjobrunner.cpp
	src/plugins/subversion/subversionplugin.cpp
2010-06-15 13:22:33 +02:00
Thorbjørn Lindeijer
a6e5298591 Fixed handling of text wrapping and a text layout corner case
Due to using QTextCursor::columnNumber() instead of
QTextCursor::positionInBlock(), a lot of code would not work correctly
when used with wrapped lines.

In addition, there was an issue with columnNumber() returning 0 right
after inserting a character before the last character of a line.

Reviewed-by: mae
2010-06-15 12:25:01 +02:00
Erik Verbruggen
05639e4688 Merge branch 'origin/2.0' (early part) 2010-06-15 11:30:51 +02:00
Thorbjørn Lindeijer
6875a50d27 Don't pass QChar as const & since it's just a unsigned short
Reviewed-by: ogoffart
2010-06-14 16:10:35 +02:00
Roberto Raggi
726c3345c4 Moved qmljsmodelmanagerinterface.h 2010-06-10 11:59:27 +02:00
Christian Kamm
373bfb05e7 QmlJS: On completion, avoid adding : or . again if already present. 2010-06-10 11:33:04 +02:00
Christian Kamm
4f6dc35af8 QmlJS: Make ordering in the completion list simpler to change. 2010-06-10 11:33:04 +02:00
Christian Kamm
02cc2177a3 QmlJS: Add completion for "id:". 2010-06-10 11:33:04 +02:00
Christian Kamm
019ff9d06b QmlJS: Don't append colons when completing namespaced types.
Task-number: QTCREATORBUG-1604
2010-06-08 15:43:08 +02:00
Christian Kamm
d7747fe849 QmlJS: Trigger another completion if a completion ends with a dot. 2010-06-07 17:37:45 +02:00
Christian Kamm
3b8b6e89cc QmlJS: Autocomplete dot and colon for properties.
Reviewed-by: Roberto Raggi
2010-06-07 17:37:45 +02:00
Christian Kamm
62141475e3 QmlJS: Potentially fix hard-to-reproduce crash in JS completion.
* Context::build was potentially dangerous. Link and ScopeBuilder
  went out of scope before their results stopped being used.
* ScopeBuilder: If no function scope object was found, don't add it.

Reviewed-by: Erik Verbruggen
2010-05-19 14:23:08 +02:00
Christian Kamm
088bdb29db QmlJS: Provide good completion for PropertyChanges with a target again.
Task-number: QTCREATORBUG-1413
Reviewed-by: Erik Verbruggen
2010-05-19 11:15:57 +02:00
Christian Kamm
9b7d3e5531 QmlJSEditor: Remove 'readonly' Qml keyword from completion.
It is unused at the moment.
2010-05-19 10:40:00 +02:00
Christian Kamm
eb53e71d95 QmlJSEditor: Simplify Qml completion code. 2010-05-19 10:38:09 +02:00
Christian Kamm
28ec223314 QmlJS: Fix completion for grouped property bindings.
Task-number: QTCREATORBUG-1388
Reviewed-by: Roberto Raggi
2010-05-12 14:11:23 +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
Christian Kamm
44a155c612 QmlJS: Fix completion context when cursor is to the right of inserted ;
Done-with: Erik Verbruggen
2010-04-30 14:22:55 +02:00
Christian Kamm
0e12240613 QmlJS: Completion for enums.
Done-with: Erik Verbruggen
2010-04-29 16:05:25 +02:00
Christian Kamm
a48032b616 QmlJS: Improve completion for object bindings with 'on'.
Done-with: Erik Verbruggen
2010-04-29 16:05:25 +02:00
Christian Kamm
f48df24737 QmlJS: Improve property and Type completion in Qml object members.
Done-with: Erik Verbruggen
2010-04-29 16:05:24 +02:00
Christian Kamm
722ba33770 QmlJS: Add CompletionContextFinder to allow context sensitive completion
The plan is to use this to reduce the number of applicable
completion options, for instance for enum completion or property
names.

Done-with: Erik Verbruggen
2010-04-29 16:05:24 +02:00
Thorbjørn Lindeijer
41ab8fbbf1 Moved TextEditDocumentLayout and related classes to their own file
The Parentheses, TextBlockUserData and TextEditDocumentLayout classes
and their member function implementations were spread around the
BaseTextEditor class. Moving them to their own file to make the code a
bit better organized.

Reviewed-by: mae
2010-04-26 14:42:11 +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
mae
8eedde33c5 Implement tooltips for snippets 2010-04-09 12:59:49 +02:00
Christian Kamm
c330411604 QmlJSEditor: Show snippets before other completion options.
Reviewed-by: Erik Verbruggen
2010-04-07 11:09:27 +02:00
Erik Verbruggen
7c4eb002e2 Fixed corner cases for comparison.
Reviewed-by: ckamm
2010-04-06 10:42:48 +02:00
mae
65e3017edf minor code cosmetics 2010-03-30 14:57:59 +02:00
mae
91dac9385e Re-enable snippets
Fixed colors to use the same as refactoring rename, and a few
fixes for undo and document changes outside the tab areas.

Reviewed-by: Roberto Raggi
2010-03-29 16:45:41 +02:00
Roberto Raggi
4ee8a199af Introduced Document::isQmlDocument() and Document::isJSDocument(). 2010-03-29 12:56:25 +02:00
Roberto Raggi
7c04d11f44 Automagically hide the completion box when the text under cursor matches the only item in the completion box. 2010-03-29 10:49:21 +02:00
Roberto Raggi
cbf1fe8c3a Fixed possible crash when using completion when completing code in invalid documents. 2010-03-29 10:45:18 +02:00
Christian Kamm
81e74d23a3 QmlJSEditor: Set an icon for keyword completions. 2010-03-26 14:17:03 +01:00
Christian Kamm
b2bb919e45 QmlJSEditor: Add completion for JS keywords and Qml reserved words.
Task-number: QTCREATORBUG-919
Reviewed-by: Roberto Raggi
2010-03-26 13:51:46 +01:00
Christian Kamm
9ea01cf5fb Improve Qml code model import handling.
* Fill the snapshot with files that could be imported.
* Implement package imports.

* The qmldir file is not parsed yet.

Reviewed-by: Erik Verbruggen
2010-03-18 11:25:37 +01:00
hjk
9595504bda Long live the king! 2010-03-05 11:28:13 +01:00
Christian Kamm
8d14f18ec0 Add an accessor to get the flat scope list from ScopeChain.
Done-with: Erik Verbruggen
2010-02-22 10:22:23 +01:00
Christian Kamm
08cfc8f28c Pass in the whole AST path for scope creation.
Just the declaring member isn't enough.
2010-02-22 10:22:23 +01:00
Christian Kamm
c289897351 Make QmlJS scope building more flexible.
Instead of only maintaining a flat list of scopes, actually store the
global, component chain, root object, scope object, function, id and js
scopes separately.
2010-02-22 10:22:23 +01:00
Roberto Raggi
83e40337d9 Simplified the algorithm used to compute the expression under cursor. 2010-02-15 14:54:03 +01:00
Roberto Raggi
2a63387085 Renamed qmlmodelmanager. 2010-02-15 13:49:00 +01:00
Roberto Raggi
d22610c724 Renamed qmlcodecompletion. 2010-02-15 13:39:41 +01:00