... and some of the related implementation details
Change-Id: I1f03aa5acf2d3fb2cfc2a6a7845f3d3578b0408d
Reviewed-by: David Schulz <david.schulz@digia.com>
Simplifies the code base by removing one level of unused
and unneeded abstraction.
- Merge {I,Default}AssistInterface to AssistInterface
- Merge {IAssist,Basic}ProposalItem to AssistProposalItem
- Merge {IGenericProposal,BasicProposalItemList}Model to GenericProposalModel
Change-Id: I54ee7b095427383d67a00fc1d87c3808c21d812d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
There was document(), textDocument() and baseTextDocument().
Two should be enough...
Change-Id: Id9e41c8d857c5cb3269a9fce5ab594d34448c982
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Currently we pass in some places by value, elsewhere by const ref and
for some weird reason also by const value in a lot of places. The latter
is particularly annoying, as it is also used in interfaces and therefore
forces all implementors to do the same, since leaving the "const" off is
causing compiler warnings with MSVC.
Change-Id: I65b87dc3cce0986b8a55ff6119cb752361027803
Reviewed-by: hjk <hjk121@nokiamail.com>
Also adding the possibility to insert text into the blockselection.
Task-number: QTCREATORBUG-7773
Change-Id: I7a47a1d630f769a8253ee1a2f21057820ea170d5
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
...since it does not make sense for TextEditor::QuickFix and
TextEditor::FollowSymbol.
Regarding the bug:
- The bug was exposed by having "Active completion" set to *not*
"Manual" in Options > Text Editor > Completion.
- After choosing one item from the overrides list the cursor was
positioned just right before the beginning of a function name, which
is a valid activation sequence (see CodeAssistantPrivate::process()))
As a consequence, a new proposal was requested.
Task-number: QTCREATORBUG-10345
Change-Id: Ib0d10192863fb33c0958a9afbf76ca8e7de772f8
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Immediate proposals are displayed for asynchronous providers and fragile
proposals.
The idea is to show already available results immediately. The proposal
calculated in the process runner can then replace the immediate
proposal.
Change-Id: I7903e6677c9dfeb4957eb416062fff1fb01ff23f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
...from CompletionAssistProvider, so other providers can be executed
asynchronously, too.
Change-Id: I6ec06f6d76bc2937bc272450b4e8dffd81ee868e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
... for the same function
Task-number: QTCREATORBUG-5748
Change-Id: Iadf5be76c24f95cf057c2112a8248bea2a9e20cf
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
And not from the global object pool. This way, the editors that have
different highlighters for various language dialects, or editors that
support multiple languages in a single editor, can decide themselves on
what CompletionAssistProvider to provide.
Change-Id: Ieebc4a8e7b3de6470fdb8103035aa3b8b2ba6598
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
If escape is pressed within 400ms after invoking completion,
it is popped again
Change-Id: Ibf34af22def54bc9a18d804ac9ee471f075eae96
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Also make sure that "Apply function signature change" gets to the top
of the list.
Task-number: QTCREATORBUG-9441
Change-Id: Iaf67f8ea9c99ddfc973e610f7e0f4c35b7967629
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Introduces ITextEditorDocument. This is part of a more general "use
documents instead of editors whereever possible". It will allow to move
to e.g. ITextEditor::openedTextDocumentContents() instead of
ITextEditor::openedTextEditorsContents().
Change-Id: I5ebceaa257a0d2c3e8ac4ac51b9b08b6faa42487
Reviewed-by: David Schulz <david.schulz@digia.com>
You can write definition of function, type Alt+Enter, as usual,
and select not only public but also other possible sections
like private, public slots and so on.
Change-Id: I2faefc3833c6f05c9e2e5a2a41328bcdbe17ba14
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Now the document contents (the text) is passed to the background thread,
which in turn will recreate the text document.
Change-Id: I7af47348fe162b53b8b440f1561a9919bf3c381a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Getting the #include directives ready for Qt5. This includes the
new-project wizards.
Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
The problem was that an automatically triggered 'idle' completion result
could come in while we were waiting for actual 'triggered' completion
and then the real completion result would be discarded.
To avoid that:
* Only accept proposals from the currently running completion.
* Increase the idle completion timeout to 400ms so it doesn't get
triggered during regular typing.
Change-Id: Ibb2fa8907a2b67a94e092dfdc5a48fb50be06b65
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
Even if the completion popup is already visible is should
respect the behavior expected for explicit invocation.
Change-Id: Ib4635fead060b90f677bfd7b2751a20c030f67a1
Reviewed-on: http://codereview.qt.nokia.com/571
Reviewed-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
This is necessary for the very first characters typed on the editor
in the case the activation sequence length is greater than one.
Change-Id: I9ec611f816278795b7ac3f75913fccf5a52165bf
Reviewed-on: http://codereview.qt.nokia.com/47
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This is a re-work of our completion engine. Primary goals are:
- Allow the computation to run in a separate thread so the GUI is not locked.
- Support a model-based approach. QStrings are still needed (filtering, etc), but
internal structures are free to use more efficient representations.
- Unifiy all kinds of *assist* into a more reusable and extensible framework.
- Remove unnecessary dependencies on the text editor so we have more generic
and easily "plugable" components (still things to be resolved).