Commit Graph

172 Commits

Author SHA1 Message Date
jkobus
48aefde7ba Move patch command out of VcsPlugin
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>
2014-05-20 11:56:40 +02:00
hjk
6e584b5b49 DocumentModel: Make interface static
Move item model implementation to private, adjust user code.

Change-Id: Ifbe94e7c7b9b1e8be1b4c531958dbd7a9413af13
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-05-13 11:48:30 +02:00
Eike Ziller
5dd8d7cd9c Editors: Move id() from editor to document.
Change-Id: Ib81076842ab1c16832224790194b001206404d64
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-03-05 16:27:52 +01:00
hjk
6c6f47f86c Core: Make IEditor::id a value member and adjust users
Change-Id: I47e457c4a1821c515cd8a740d27bfe005a0c09e6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-02-25 10:36:25 +01:00
jkobus
73cf43f323 Add DiffEditorManager, refactoring.
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>
2014-02-18 13:46:49 +01:00
Eike Ziller
3422995521 VCS editors: Fix revision markers
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>
2014-01-29 10:04:47 +01:00
Eike Ziller
355f104d0e BaseTextEditor: Remove some unnecessary indirections through widget
Change-Id: I4f71448d6788a4e553b1495b72263a004e65d8c0
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-14 09:05:06 +01:00
Eike Ziller
236ea9efb9 Merge remote-tracking branch 'origin/3.0'
Conflicts:
	share/qtcreator/debugger/dumper.cpp
	share/qtcreator/debugger/dumper_p.h
	share/qtcreator/debugger/test/main.cpp
	src/plugins/debugger/gdb/classicgdbengine.cpp
	src/plugins/debugger/gdb/pythongdbengine.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.h
	src/plugins/debugger/lldblib/guest/main.cpp
	src/plugins/debugger/lldblib/ipcengineguest.cpp
	src/plugins/debugger/lldblib/ipcengineguest.h
	src/plugins/debugger/lldblib/ipcenginehost.cpp
	src/plugins/debugger/lldblib/ipcenginehost.h
	src/plugins/debugger/lldblib/lldbenginehost.cpp
	src/plugins/debugger/lldblib/lldboptionspage.cpp
	src/plugins/qbsprojectmanager/qbsstep.cpp
	src/plugins/qbsprojectmanager/qbsstep.h
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h
	src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp
	src/plugins/qnx/blackberrycheckdevmodestep.cpp
	src/plugins/qtsupport/debugginghelper.cpp

Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
2014-01-08 11:01:06 +01:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
jkobus
0d13028440 Refactor source property
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>
2013-12-19 14:06:51 +01:00
Tobias Hunger
1b53f75d62 VcsBase: Abort commands when closing VcsBaseEditorWidget
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>
2013-10-14 15:51:23 +02:00
Orgad Shaneh
5e585b9eee Git: Support annotate revision for renamed files
Change-Id: I6993cdd6f91f29b6f4e990cc5ba332ff63f7ed9f
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-10-10 19:00:01 +02:00
Orgad Shaneh
2da85dc686 VCS: Rename diffBaseDirectory -> workingDirectory
Can have other usages than diff

Change-Id: Ieb01a88eb95503ac89b2f2c1120eddf404cdce5a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-10-10 18:59:50 +02:00
Orgad Shaneh
7b08d993bf VCS: Pass workingDirectory for annotate
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>
2013-10-10 18:59:43 +02:00
Orgad Shaneh
003e25d488 VCS: Abort previous command for the same editor
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>
2013-09-30 16:36:00 +02:00
Eike Ziller
63ff745213 Merge remote-tracking branch 'origin/2.8'
Conflicts:
	src/libs/extensionsystem/pluginmanager.cpp
	src/libs/extensionsystem/pluginspec.cpp
	src/plugins/coreplugin/basefilewizard.cpp
	src/plugins/coreplugin/coreplugin.pro
	src/plugins/coreplugin/coreplugin.qbs
	src/plugins/coreplugin/editormanager/ieditor.cpp
	src/plugins/coreplugin/externaltool.cpp
	src/plugins/coreplugin/icore.cpp
	src/plugins/cpptools/cppmodelmanager.cpp
	src/plugins/fakevim/fakevimhandler.cpp
	src/plugins/find/ifindfilter.cpp
	src/plugins/projectexplorer/buildstep.cpp
	src/plugins/projectexplorer/devicesupport/idevice.cpp
	src/plugins/projectexplorer/runconfiguration.cpp
	src/plugins/vcsbase/vcsbaseeditor.cpp
	tests/system/suite_debugger/tst_simple_analyze/test.py

Change-Id: I11dc9e60bfc14bad4f8af747d041fc7678a07c17
2013-09-27 10:44:32 +02:00
Francois Ferrand
367cfc8419 Git: Support staging a single chunk.
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>
2013-09-26 23:10:59 +02:00
Tobias Hunger
0479abdcd7 QDoc: Fix QDoc warnings
This patch fixes ~1100 warnings from qdoc

Change-Id: Ia9555db675acbf8083b2f87d9855a62a3a34ccb9
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2013-09-26 09:56:22 +02:00
hjk
ca15d0aa95 Apply static pattern to TextEditorSetting
Change-Id: I4e6f573d893c0aa2bb4ca9812fc8db2961dac172
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-20 10:28:22 +02:00
Orgad Shaneh
9df379e0dc Git: Fix crash on diff
Task-number: QTCREATORBUG-10138
Change-Id: I7c7f054e6253c677b52a3ea24d7ace562f1ad4af
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2013-09-12 13:02:55 +02:00
Leena Miettinen
ae72d4f88a Doc: edit vcsbase docs
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>
2013-09-10 16:36:44 +02:00
hjk
aadb6f16af SessionManager: Apply 'static' pattern
Change-Id: I370f72fcf7a24216ee189979ce6b5c8bfc5f4140
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-09-05 12:28:12 +02:00
hjk
267e441af4 Apply 'static' pattern to VcsManager
Adapt user and surrounding code.

Change-Id: Id2648f82a9cbbd0ad0bfb91f6958b8cee7ea29cc
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-03 12:01:24 +02:00
hjk
4a24df38a3 EditorManager: Use static pattern, adjust surrounding code
Change-Id: I3255a0150cd9a730336456c5a9f986eb74fefbff
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-30 11:22:56 +02:00
jkobus
e8801167aa Add common interface for text formats inside syntax highlighter
Change-Id: I87f64446161a57aea0896f68e4eafacef791969b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-08-26 13:39:40 +02:00
Orgad Shaneh
0c50c5a1d3 VCS: Consolidate codec handling
Change-Id: I2c9a5031b63f0bc3e884739be680d051d7cf1ab4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-19 13:56:34 +02:00
Eike Ziller
8c2e3fd2cb Fix usage of EditorManager::editorsForFileName
And move to using the corresponding method in document model.

Change-Id: I80b12ceab8a91c5393b9c0422d660a8896ae09d8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-18 14:51:39 +02:00
Eike Ziller
bc88c0b89e VCS: Use documents instead of editors a bit more.
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>
2013-07-18 14:51:03 +02:00
Eike Ziller
7808266fca TextEditors: Remove useless duplicated (set)textCodec methods
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>
2013-07-17 09:05:41 +02:00
Eike Ziller
624d9e2c4c Move IEditor::isTemporary to IDocument
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>
2013-07-12 16:43:54 +02:00
Eike Ziller
21f63c24c7 Merge remote-tracking branch 'origin/2.8'
Conflicts:
	qtcreator.pri
	qtcreator.qbs

Change-Id: I1310d473584f1e2cd44008d45747c868103bbde1
2013-07-12 10:39:18 +02:00
Orgad Shaneh
d31efc22e8 VCS: Stop on file pattern when building a chunk
Task-number: QTCREATORBUG-9782
Change-Id: I0e50c5c2696ad9cfe4e8a56c28cb17a2ee039b4f
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-11 12:50:40 +02:00
Orgad Shaneh
51a9d5065a VCS: Support chunks without comma
Git submodule is reported as @@ -1 +1 @@

Change-Id: Ic7a619b0f4c8eb505b75529501dcd18723de2465
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-10 12:50:16 +02:00
Eike Ziller
dd43d9908f Rename IDocument::fileName --> filePath
That is what it actually is, wrt how Qt API calls it.

Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-09 13:51:42 +02:00
Orgad Shaneh
20e9b33741 VCS: Use relative path for apply/revert chunk
Task-number: QTCREATORBUG-9715

Change-Id: I3bfaea3922ace396230ef5e215712a9f3459808b
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-03 13:34:38 +02:00
Leena Miettinen
41411165ba Doc: use standard wording in \brief commands
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>
2013-06-20 11:22:47 +02:00
Eike Ziller
7c8db79817 Switch less often to edit mode
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>
2013-06-05 09:43:14 +02:00
Orgad Shaneh
a91219c636 VCS: Fix context menu for custom editors
Change-Id: I44718dce73bbcd376d90fdf40f4bb5ab4c57443a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-03 10:40:50 +02:00
Orgad Shaneh
05a6fc48ba Git: Support change links on commit editor
Useful for commit messages with "reverts <hash>" for example.

Can later be extended for interactive rebase

Change-Id: Ibf77433ecddfacbd8d443636ddbc406bda474aa7
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-31 14:53:02 +02:00
hjk
daad8e238e Editors: Provide a base implementation for duplicate{,Supported}
Helps avoiding trivial re-implementations.

Change-Id: Iaa2e6b92503a2b9553432568c2047c28899c7ea6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-05-27 14:27:16 +02:00
Orgad Shaneh
a9d9d44494 VCS: Rename RegularCommandOutput to OtherContent
Change-Id: I37d47c79f0efaf51eb5afd1fe529aacfadff8ee1
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-24 12:29:34 +02:00
jkobus
ed1bbafad9 Fix typo inside comment
Change-Id: Ida0d5489b0c4890afd625be405a2fabdb6bc6748
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-23 11:01:19 +02:00
hjk
fe29d6a8a3 Core: Remove Core::Id(QByteArray) constructor
This was mostly used to disambiguate the char * and the QString
constructors.

Change-Id: Ib6923ef8e8c0e5d514a883e73aa001a1cd9fb534
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-04 16:47:59 +02:00
Friedemann Kleint
959a75d65e Clean headers in vcsbase-plugin.
Change-Id: Ibbfd5e0b07b2a06d17f4e3360511d7ad13b49f55
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-03-26 12:30:36 +01:00
Friedemann Kleint
281b2332d2 Fix Krazy warnings about includes/header guards in version control.
Change-Id: I75f2040e9b3dd5d9786faf2e829ec808af7f1304
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-03-12 13:56:47 +01:00
Orgad Shaneh
d1e2e20f71 Vcs: Fix crash
Task-number: QTCREATORBUG-8775

Change-Id: Id17b439202f5394b1fdb7d38c28c8048dee25d71
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-18 11:08:03 +01:00
Tobias Hunger
83d6e81d94 Vcs: Remove "waiting for data" when process fails
Task-number: QTCREATORBUG-7946

Change-Id: Ic3c3ceddd3b4bf115a1da78a5b5e5b640dbbd1f1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-02-13 12:53:21 +01:00
Oswald Buddenhagen
1fda2111d4 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
	src/plugins/qmldesigner/designercore/include/widgetqueryview.h
	src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h
	src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
	src/plugins/qnx/bardescriptormagicmatcher.h
	src/plugins/qt4projectmanager/profilekeywords.cpp
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h

Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
2013-01-31 16:25:33 +01:00
Orgad Shaneh
8f4817152c Git: Add subject to log combobox
Change-Id: Icb76ad1c0783615172d929e8cf402feaffaddbdd
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-30 10:26:58 +01:00
Orgad Shaneh
f6f822f5f6 VCS: Remove Apply/Revert Chunk when they are not applicable
Having disabled entries in a context menu without any additional
information why they are disabled is confusing

Change-Id: Idb3d5a7befe57b84adb2f7cb58b2cbc1331039ec
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-30 10:26:50 +01:00