As a virtual method overload, completionAssistProvider() can return a
covariant return type. This preserves type information and eliminates
a qobject_cast<> in CppEditorWidget.
Change-Id: I3b29b0fa4e876bbcc43f628e6e0bbf4d73d3f689
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
d->m_modelManager can be used directly instead.
Change-Id: I11158ede3bb827ebed88706d0bfaab4e0f142f0a
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
d->m_modelManager is an alias to CppTools::CppModelManager::instance()
and should be used for consistency's sake.
Change-Id: I8fab163990ffb039db7900000d107c67f29a7e46
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
In preperation for supporting find usages by the language client plugin
Task-number: QTCREATORBUG-21577
Change-Id: I7a6da3a9d53478c1d486e0ddc5829c9ea09a2a20
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Make line/column label always visible, and move context drop down to the
right, so it vanishes first. Reduce the minimum size and stretch of the
outline drop down, so the context drop down doesn't vanish too early
either.
Task-number: QTCREATORBUG-15218
Task-number: QTCREATORBUG-19386
Change-Id: Ie2ced1cb62a27a0129438f5605d5711bfac50cd0
Reviewed-by: David Schulz <david.schulz@qt.io>
RefactoringEngine does not depend on CppEditorWidget
therefore we should check that the pointer is still valid
in the lambda calls.
Hopefully fixes QTCREATORBUG-20111 though this fix does not
directly address the stack trace.
Task-number: QTCREATORBUG-20111
Change-Id: I37f996de60cebe61e290fe181d75fb266f93c1c1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
The patch is mostly mechanical, but contains also a few spurious changes
from values references for some local variables, foreach -> ranged for
etc that I coulnd't resist.
Change-Id: I58f0bd972546895eb318607cbfbd7ac35caf3f23
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
processEvents is a bad way of dealing with asynchronous
requests. Use QFutureWatcher for that purpose.
Change-Id: I3839cb9db80a6d391f6af1178e96986a325b7b99
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Basically move it from CppTools to CPlusPlus
to be able to use it there.
Change-Id: I0af80f93bdc029824397ceafdf940cb86c4382b0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
... into QuickFixAssistProcessor and QmlJSQuickFixAssistProcessor,
by essentially duplicating the class, but moving the actual work to
a new a GenericProposal::createProposal(...QuickFixOperations...)
Less indirection, and less code in total.
Change-Id: I2f8cba970bf587c9cbf04321269a60ed51bfae2a
Reviewed-by: David Schulz <david.schulz@qt.io>
Link is a common class and is used across the plugins.
Change-Id: Id92e47e1b8604316ca8b970804e57abaf404ec28
Reviewed-by: David Schulz <david.schulz@qt.io>
Make its behavior closer to the builtin find/rename
Change-Id: I3730e87ca3e41677b004b98bb2e62dada5d32f22
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Provide refactoring engine for ClangCodeModel and
implement missing methods.
Change-Id: If5c913e0c5a7941cd2ced54d0fcfa4d625eadc93
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Functionality is limited to the abilities of
current index which is not updated and is
generated only at project open.
Search box temporarily doesn't allow to "Search again".
Change-Id: Id1047f27ad0aafc901f06aa51ad38ceab95eaebb
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Make model manager able to select the most functional
refactoring engine from the available ones.
Change-Id: I74031c910706fd694a0a7def022531501f1ea005
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Show the menu always immediately.
If the needed use selections are not up to date for the refactoring
actions, then trigger an async run and if that one finishes, then update
the refactoring menu. In the meanwhile, show a place holder menu item
showing on-going progress (Utils::ProgressIndicator).
Change-Id: Iae7ab37738d79c20aeb1ccda2b1781091e90fdc3
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Allows to use this header without texteditor dependency.
Change-Id: I706f42799c3ea42473a716fa9ef9f3cfbef6fdd4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Move CppRefactoringEngine to CppTools and builtin member
ownership to model manager.
Change-Id: I3e72308559fd2928229f9f25d4dd09beb3f56c34
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Move FollowSymbolUnderCursor to CppTools and
builtin member ownership to internal model manager.
Change-Id: I97a4f744ec1709ccc0b34fb67b58680973ef566f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Make this highlighting work without builtin code model
but based on the HighlightingMarks that we already have
from ClangCodeModel.
Redundant parameters are removed by this change.
Change-Id: I73b5dab46ba59d2f813236831818f0a9bc94c5bc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Existing built-in functionality is moved there.
Clang part is to be implemented later
Change-Id: I7595898495213c087243cd534b4ba1617b4c27e9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
No behavior change.
* Extract some functions
* Add some clarifying comments here and there
* Add QTC_CHECK()
* Remove QLatin1String
* foreach -> for
* Const-correctness
Change-Id: Ie6ccc987ef959c5295a4d3225aac0dbad144f91d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Create an interface to get the ability to use
another FollowSymbol implementation
Change-Id: I5802f62523ff3ee47b8a14e487adf43edcb6c9b1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
..and use it when we don't have refactoring plug-in
Change-Id: Ibe317a9728d439b9c5e05271d92a330d22eaacb9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>