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>
There are conceptually only two: one that operates a new document,
and one that shares one. Being explicit makes moving data over to
the Editor hierarchy easier. Convenience can be re-added there,
later.
Change-Id: I9b34ff26628c99ffff01201dcf99332d5e7253e9
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
This is far from correct and will not accept a wide set of valid
email addresses, but it is better than what we used to have and
so far only one person complained about that.
Task-number: QTCREATORBUG-12472
Change-Id: I0d7ed19c9811af0ce28218c40d79988d26cb588b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
It will be needed soon inside DiffEditor plugin.
Move "Patch command" setting out of Version Control | General
into Environment | General | System.
Introduce PatchTool class, which hold the patch command
setting and a method for applying patches (runPatch() - moved
from VcsBasePlugin).
Change-Id: I9de94358ccd5c6e31ac2beefc27305c5111d67bb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
Move item model implementation to private, adjust user code.
Change-Id: Ifbe94e7c7b9b1e8be1b4c531958dbd7a9413af13
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
GitDiffSwitcher operates now on IDocument.
GitDiffHandler operates now on DiffEditorController.
"source" property now attached to editor's document (VcsBasePlugin).
Change-Id: Ie2570a597b8b992ac1dc33b9179eca459c8a751a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
Resets the revisions when setting the contents of text editor documents
in general.
Task-number: QTCREATORBUG-11356
Change-Id: I4069d629d8a612d42c7deae707300d50690e2db7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Get rid of source property out of DiffEditorWidget,
attach dynamic property when it's needed instead.
Change-Id: I6641a7b55c42b4eceba78c2e28f5140b40fe0fa5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This prevents the crashes when the command signals a state change
after the managing editor was closed.
Task-number: QTCREATORBUG-10343
Change-Id: I57e34c49d5ef8b5693bec6ac0ebc9d87afa99dc9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Required for supporting renames on annotate.
The renamed file (and possibly its parent directory) doesn't exist
anymore, so it shouldn't be passed as a working directory.
Change-Id: I809e8df17c1dc5199e533b525244a668eccbcd5f
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
It is very common to have output from a previous (longer) command appear
instead of the newly created one.
For example: Open a log. Check "Show Diff" and immediately uncheck it.
If this is done fast enough (or with a high Log Count limit) the output
with the diff will appear instead of the normal log.
Change-Id: Ie64cc4a383a261f5328a4d0486eec93f73766679
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Add context menu in diff editor to stage/unstage a single chunk from the diff.
Task-number: QTCREATORBUG-5875
Change-Id: Ic244a0d84b5ed5f66b90d7fe8784fc1b8041d183
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This patch fixes ~1100 warnings from qdoc
Change-Id: Ia9555db675acbf8083b2f87d9855a62a3a34ccb9
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Remove \brief for \enum and \fn commands.
Use standard wording. Edit for style and grammar.
Change-Id: I338567241ddc7f90feaaf058dcd4dc9afdb8ca93
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
And move to using the corresponding method in document model.
Change-Id: I80b12ceab8a91c5393b9c0422d660a8896ae09d8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This patch mostly gets rid of EditorManager::openedEditors usage. The
VCS editors should have a better widget<>document separation, also to
make it possible to split/duplicate them, but that's for another time.
Change-Id: Idd92a6a4884ff69fba4f4793d182aa7ff68d79e4
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
They are duplicated from TextDocument::(set)codec. The default
implementation of the duplicated methods was just delegating to the text
document. The override of setTextCodec in QmlJsEditor was useless, since
it was only called from EditorConfiguration::configureEditor with the
ITextEditor::TextCodecFromProjectSetting flag anyhow, which made the
overridden method in QmlJsEditor be the same as the fallback.
Aside from that, the duplicated methods wouldn't have belonged to the
*editor* anyhow, but to the document.
Change-Id: Ib43c28210b6bf88726159d751a4905a1d062f80e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
It's a property of the document implementation, not of the specific
editor instance working on it.
Change-Id: I5c3dd054e21b646e2d94b891916a096d045923f8
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
That is what it actually is, wrt how Qt API calls it.
Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
QDoc does some magic with the \class and \namespaces
and \brief commands, so the following wording must be used:
"The xxx class yyy ..."
Change-Id: Id231f30e8464898b776888d5423523de404aae34
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This change
* Removes IMode::type, ModeManager::activateModeType, and
IEditor::preferredModeType, and adds IEditor::isDesignModePreferred
instead
* Adapts the mode switching code in EditorManager to handle multiple
windows, for example switching to edit mode should only happen if
the editor/view is in the main window. Otherwise the editor window
should be raised and focused
* Renames EditorManager::NoActivate --> DoNotChangeCurrentEditor
* Reverts the EditorManager::ModeSwitch logic to switch mode or
make the current editor visible by default, introducing
DoNotMakeVisible flag instead
* Fixes a few instances where EditorManager::ModeSwitch should have been
used
One non-trivial problem left: If you open a .ui file and switch to an
external editor window, edit mode is activated, because the current
editor no longer is a .ui file, which means that the design mode gets
deactivated.
Change-Id: I76c5c2391eb4090143b778fb103acff3a5a1ff41
Reviewed-by: David Schulz <david.schulz@digia.com>