... to the editor factories and pass it to the document, not the widget.
Saves some code, puts fewer objects into the object pool.
Change-Id: Iaaf250af74dc4e0c62700873accbb40ba88b7d9e
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
The editor factories are already a central place to associate
hover handlers with editors, no need to retrieve them later from
the object pool again. This also allows for easy handling of
more than one active handler per editor.
Change-Id: Ie716b96f5ce6b526ee897468635e03e909d81538
Reviewed-by: David Schulz <david.schulz@digia.com>
... and some of the related implementation details
Change-Id: I1f03aa5acf2d3fb2cfc2a6a7845f3d3578b0408d
Reviewed-by: David Schulz <david.schulz@digia.com>
QmlJSEditor does not depend on QmlDesigner.
There is no reason that the settings for the Qt Quick ToolBar
are stored in the group of QmlDesigner.
This patch removes all includes of qmldesignerconstants.h in QmlJSEditor.
Change-Id: Ie692d9179e0239c3307420001547ba658911d39b
Reviewed-by: Eike Ziller <eike.ziller@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>
This was already done in all major editors and should not harm
all others.
Change-Id: I7e19d285c4b85419a9a1f9afa961addecf682eaf
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
opt-out now, for all editors created by BaseTextEditorFactories.
Change-Id: I01d0a9ff26320fcd0b84ff90ff22c747cf84b84c
Reviewed-by: hjk <hjk121@nokiamail.com>
It's taken care of by the normal factory based setup now.
Change-Id: Ia53551740cf5ef2998765ea1003ba8e7f9c30e46
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Only used there, and avoids back-links to editors.
Change-Id: I81206057ce89d42aef7febb840cf9e44b869df0e
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This reduces the use of the 'editor()' "back link" which we'd like
to phase out (and also actually simplifies the user code).
Change-Id: I8aa13e88459d4e9cf44de683e8efd189238cc684
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This removes the ones that were not to be used anymore.
The fallback in the base class is left in for now.
Change-Id: I5e7ab16497a83eff9b11deb9e1feb390757eac0e
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Merge editor files, sort #includes, namespaces.
This does not yet use the new editor construction scheme.
Change-Id: Idb1171389858c4470d7a4ec9441fb25e6d157400
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
All editors did that manually, with varying approaches. Connect once
when the document is made known to the EditorWidget instead.
Change-Id: Ib0828b08158539859f6f89c8080435a027aa06ed
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
In most cases, the *Editor constructor does not need to
access the *EditorWidget.
Change-Id: I1f5c076a0f723d5d82b398e8c250c7bd1d47eb17
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
There was document(), textDocument() and baseTextDocument().
Two should be enough...
Change-Id: Id9e41c8d857c5cb3269a9fce5ab594d34448c982
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Lifetime is coupled to the widgets, not the editor.
Change-Id: I01560bbdd6c399376d3a4184f0eb83e4153f830e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Goal is to consolidate "controller" related data in the *Editor hierarchy.
This patch introduces temporary "cross-Private" accessors dd() to
keep the patches small.
First item moved is the AutoCompleter, a glimps at long term benefits
is the simplification in the JavaEditorWidget which is now essentially
a BaseTextEditorWidget, only containing the still-wrong createEditor().
But that can only be move if the *Editors are self-contained, i.e.
keep data themselves, not indirectly through the *EditorWidgets.
Change-Id: Ia0ab90f0322bb17ac20458e6581069eed30acbaf
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
No need for most of the machinery.
Change-Id: I9078174582d83da94c6c7f20282fd3a5f1742911
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Language::Enum -> QmlDialect
* class instead of enum
* moved Language specific operations to it (from Document)
* nicer handling
QStringList -> PathsAndLanguages
* store language along with path, to perform a correct scan and improve
path handling
Change-Id: If69d35c63cfeb48aa670b51870916cd0c40f1916
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Also the updating of the model is now done only once in the document,
and delayed till an editor is visible if necessary.
Change-Id: I69b1abebc2b691b37a618db7d1f5ebbbc8e75bca
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Call the timer and its slot for what they do, not how they are
triggered. Remove unneeded function/slot.
Change-Id: I6060f0b59149eb7e5cfdf1d7ea0a993a2104f012
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This ensures that we are only highlighting once, and actually do
highlight (the previous code was trying to prevent multiple rehighlights
though doing the highlighting in the editor(s), resulting in situations
where it wouldn't rehighlight at all)
Change-Id: I18f3e72e31d8076b6d1575f1a17a3f4a101163d9
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
That avoids a complete reparse of the document when font settings
change, but in turn now requires an explicit redo of semantic
highlighting in that case.
The cpp editor part of this patch is actually still doing semantic
parsing though. This will be fixed up in a later patch.
Change-Id: I6f51a18cba6325856c96e155700eb912f6d3aad5
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Diagnostic ranges also move to document for this.
Change-Id: I82a9909abb57594cdd732448270849e6a2e3a4e0
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
There is no need to fire a timer over and over again if semantic info is
not up to date. Instead, update usages whenever cursor position changes
and semantic info is up to date, and whenever semantic info is updated.
Change-Id: If2d8fe2a0211b9d659bea5c747704380a64cc1ca
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>