Commit Graph

176 Commits

Author SHA1 Message Date
hjk
166c1f51a4 TextEditor: Pimpl TextEditorActionHandler
It's "exported API"

Change-Id: I9830ff4637a2b3191bb8a3ea83c9ce532e5ab0d9
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-07-03 10:51:06 +02:00
Christian Kandeler
93304df038 Always pass Core::Id by value.
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>
2014-07-01 11:52:08 +02:00
hjk
ea7c3c74bd TextEditor: static-ify plugin class
Change-Id: Id795b711f08c89b6066c5269c482fea5e99dd52f
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-06-27 10:46:49 +02:00
David Schulz
0d11c79418 Editor: Fix "Clean Whitespace" action.
Task-number: QTCREATORBUG-12451
Change-Id: I2e9c97d0aa9081268377b002698f7659fc39cdce
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-06-19 09:14:52 +02:00
David Schulz
714d56a381 Editor: Add actions for view page/line up/down.
Task-number: QTCREATORBUG-4994
Change-Id: Ia6ce1a01cd78dd1987404d77f6b0c0da41b4929e
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-06-02 15:07:35 +02:00
Orgad Shaneh
a64a49ffcb TextEditor: Add Uppercase/Lowercase Selection to Edit -> Advanced menu
Change-Id: I0019e53bb23ab20792216cbe6d60a8934559040e
Reviewed-by: David Schulz <david.schulz@digia.com>
2014-05-19 08:37:07 +02:00
Frantisek Vacek
fa998d2d2c Improve Copy/CutLine actions usability
This patch implements two features:
1. Reimplement CopyLine to move text cursor at the beginning of line
2. Add copy/cutLine action to Advanced Edit menu, to make it
   discoverable for editor users.

Change-Id: I0bf336ebee4dbf5afd2c759e47b1830271bd9d18
Reviewed-by: David Schulz <david.schulz@digia.com>
2014-02-26 10:26:44 +01:00
hjk
4d96fa7aba Core: Merge Find and Locator into Core plugin
Change-Id: I7053310272235d854c9f409670ff52a10a7add8b
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-14 07:43:00 +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
Eike Ziller
d80fb696ab Give TextEditorActionHandler an explicit parent and unify usage.
The action handler implicitly passed ownership to ICore, which is non-
to the action handler. We now consistently create the action handler in
the editor factory, give ownership to the editor factory, and don't hold
a reference to it.

Change-Id: I4372f8de966e3ceff87c06c5528c6b54522c1d57
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-12-12 09:59:55 +01:00
Eike Ziller
3d1b70c58e Remove the need to register editors in the action handler
The action handler already knows which editors to handle through the
context. It only needs to receive signals for updating the actions from
the current editor. So there is no need to tell the action handler about
every individual editor. This also removes some noise from the text
editor implementations.

Change-Id: I76dc5b1559cc8cf54ff313e6cdba4e789a3108aa
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-12-12 09:59:27 +01:00
Eike Ziller
b55df87a7b TextEditor: Remove "actionHack" and utilize contexts instead.
The actionHack was used to only forward actions to editors that "belong"
to that action handler instance. That is already clearly defined by the
context that the action handler is created for, so we can just use that
instead.

Change-Id: Ia4c6795c80bb281c1ed258324925f56ca7fd8150
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-12-11 16:02:07 +01:00
Eike Ziller
9b3ab11f89 Fix registering shortcut for text editor actions
Broke with f1eb9c4827 which exchanged
setDefaultKeySequence with setKeySequence

Task-number: QTCREATORBUG-10538
Change-Id: Id40bd8fd403cd586a39a19c248f59e23cf4cf8c0
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-11-04 16:03:36 +01:00
David Schulz
88c647ce68 TextEditor: Update actions after toggling read only mode.
Task-number: QTCREATORBUG-9188

Change-Id: I3448645397e7a39487f2e961728ebef924eec7f6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-10-30 09:51:07 +01:00
David Kaspar
3d2ef178f6 Qnx: Fixing Bar Descriptor XML file editor to provide editor actions
BarDescriptorEditorWidget is using TextEditorActionHandler class
to provide editor actions e.g. Undo, Redo, Cut, Copy, Paste accessible
from main menu and using shortcuts.

TextEditorActionHandler.resolveTextEditorWidget() virtual function is
added to all resolving TextEditorWidget for an Editor. This allows
to have IEditor->widget() to have non-BaseTextEditorWidget instances too.

Task-number: QTCREATORBUG-10040
Change-Id: I6f433fc307c13ef2b2a20c48e6473826f2619544
Reviewed-by: David Kaspar <dkaspar@blackberry.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: Tobias Nätterlund <tobias.naetterlund@kdab.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
2013-10-21 10:26:29 +02:00
David Schulz
8e281fe27b Editor: Make "Visualize Whitespace" checkable again.
Change-Id: Idb327a9ecefe5a4b55e9f0f47edfec30ae634289
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-09-16 13:54:27 +02:00
hjk
9d1cc97126 Locator: Clean up LocatorManager interface
Change-Id: Ib401b6eca8c291526268ccea4d9e7e66f08abe1c
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-09-06 13:41:33 +02:00
Nikolai Kosjar
69fc3cf03f Kill ";;" at end of statement
Change-Id: I177094f19978e07f85e42b34701d8f03cd26665e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-04 09:19:10 +02:00
hjk
eb724f3772 EditorManager: Use interface directly instead of going through ICore
In the majority of cases we were doing that anyways, having two
ways is just needlessly confusing.

Change-Id: Ied362a702c23beee528368d74df1f2aabe5807f8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-30 11:25:51 +02:00
Daniel Teske
f1eb9c4827 TextEditorActionHandler: Simplify code
Change-Id: I44f1859b6d91e20a2a15146c6587e4a51c70aa90
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-08-09 08:05:37 +02:00
Daniel Teske
67e91ce3d9 TextEditorActionHandler: Remove virtual keywords
No class derives from this, so the virtuals are not needed.

Change-Id: I251abc32cef6f4aacf39f31af1106eeebd8fe31e
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-05-15 14:58:25 +02:00
Eike Ziller
28ec7caa7b Correct some default shortcuts for Mac
This makes them align to the other "editor split" shortcuts.

Change-Id: I0b300ae495ffa17062a0a52b148f61015b965c29
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-04-26 10:31:11 +02:00
Eike Ziller
8b5b2e43eb Allow jumping to column with Locator filter.
With the line number filter with "<line>:<column>"

Change-Id: Ie8832fb1e218fe78cc40885da24716e844974924
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-04-08 12:42:31 +02:00
Friedemann Kleint
3a806d4252 Clean headers in TextEditor.
Change-Id: Ie679e7e9d0d20a0f71dcc1fcf0f7d8305eeeeced
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-03-27 07:15:31 +01:00
Leena Miettinen
ccbadb2d37 UI text: fix caps in CPP plugin actions
Use book style capitalization, which means that
prepositions less than 4 characters long are written
in lower case.

Change-Id: I6d46a2513070897929cf1a8af2943a17d8e52b2d
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-02-15 15:20:37 +01:00
David Schulz
6ef0cf1a30 Editor: Refactor Open Link in Next Split.
Cleanup code and added shortcuts and menu entries for
- open header/source in next split
- follow symbol under cursor in next split
- open declaration/definition in next split

Change-Id: I2c4347749d26669d88b7c2968f30f60710f442b1
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-02-14 09:46:16 +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
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
Orgad Shaneh
29a93998df Remove braces for single lines of conditions
#!/usr/bin/env ruby

Dir.glob('**/*.cpp') { |file|
  # skip ast (excluding paste, astpath, and canv'ast'imer)
  next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
  s = File.read(file)
  next if s.include?('qlalr')
  orig = s.dup
  s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
    res = $&
    if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
      res
    else
      res.gsub!('} else', 'else')
      res.gsub!(/\n +} *\n/m, "\n")
      res.gsub(/ *{$/, '')
    end
  }
  s.gsub!(/ *$/, '')
  File.open(file, 'wb').write(s) if s != orig
}

Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-08 10:48:18 +01:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
hjk
6a7cf405bd rename QtDebug to QDebug
More uniform.

Change-Id: I1c6057981f4c2b3170a4e69f0674fe4caf1143a2
Reviewed-by: Robert Loehning <robert.loehning@nokia.com>
2012-08-06 14:55:08 +02:00
Eike Ziller
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +02:00
Eike Ziller
b2e566662b Mac: Sanitize shortcuts.
Task-number: QTCREATORBUG-7446
Change-Id: Ibad8f06e5f65bc01dc9fca6e9d900e24c5fc55a1
Reviewed-by: Karsten Heimrich <karsten.heimrich@nokia.com>
2012-06-11 13:39:20 +02:00
Eike Ziller
3934347fe9 ActionManager API cleanup.
d-pointer instead of inheritance
static methods

Change-Id: I7b2f0c8b05ad3951e1ff26a7d4e08e195d2dd258
Reviewed-by: hjk <qthjk@ovi.com>
2012-05-25 10:08:24 +02:00
Eike Ziller
71260c3167 Mac: Avoid more Opt+<char> shortcuts.
Change-Id: I1f2ae70ed8b184be6d1467642924289af1b535a9
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-05-23 16:21:36 +02:00
Eike Ziller
1781617f8e Get rid of lots of ifdef Q_OS_MAC for shortcuts.
Using a central enum now.

Change-Id: I20d88c9a3f8c62cf33e4b89a3442269f71918b06
Reviewed-by: hjk <qthjk@ovi.com>
2012-05-23 13:47:13 +02:00
Konstantin Tokarev
7ae82b9f94 Added TextEditor commands FollowSymbol and JumpToFile.
Most of editors have "jump to file" or "follow symbol" actions. This
patch reduces amount of related boilerplate code.

New actions are made optional to prevent shortcut clash (both use F2).

Change-Id: I2af580ed9d6789df25f4487ba001f3b83887c504
Reviewed-by: hjk <qthjk@ovi.com>
2012-03-28 08:38:41 +02:00
Yuchen Deng
012ff2d22a Editor: Add feature for set/unset UTF-8 BOM
Change-Id: Iec7e36b1d7a526d7fa8a8096110b91f9c4cc44f9
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-03-15 11:11:03 +01:00
Erik Verbruggen
3fa55b7ab9 Removed module names from #include directives.
Getting the #include directives ready for Qt5. This includes the
new-project wizards.

Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 16:24:46 +01:00
Adam Treat
fe9eeece40 Adds two actions to indent and unindent a selection.
Add actions to the basetexteditor to indent and unindent a selection.  These actions
are equivalent to Key_Tab and Key_BackTab respectively.  The advantage of having
actions here is the user can override them and assign any key binding they want.
Thus, I could assign Ctrl+I and Shift+Ctrl+I to them and have the same behavior
as Kate.

Change-Id: I0a305a7b45018072a78f2880ea15650ea92095a1
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-02-10 12:42:29 +01:00
hjk
2931a499e6 Long live the king!
Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-26 19:55:36 +01:00
Morten Johan Sorvig
b0cd54c1ec Replace Q_WS_MAC with Q_OS_MAC.
We want to carry over all mac-specific code paths
to Qt 5. WS_MAC is no longer set; OS_MAC is.

This change is compatible with Qt 4 builds since
OS_MAC is set whenever WS_MAC is. (OS_MAC would
also be set for the theoretical X11/Mac platform,
but that's anyway not a supported configuration
for Creator)

Change-Id: Ib25d8c4e83e7e27d911124cd48aa17fdb875923f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-01-26 11:06:12 +01:00
hjk
4a21f0c3c8 Use new static ICore interface.
Change-Id: I9b690d9b150c8d162b15370f9f8986267c9128f1
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-24 18:48:47 +01:00
Leena Miettinen
efe4a4036e UI text: fix capitalization of textactionhandler commands
Replace 'circular clipboard' (technical) with more easily
understandable 'clipboard history'.

Change-Id: I9875bfb3d46677324e30198294909ea0d91bc48a
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2012-01-03 13:25:29 +01:00
Leandro Melo
b8d9b28f1e Editor: Introduce circular clipboard
This is a clipboard within Creator only. It allows the user to paste/navigate
through the recently copied content by repeatedly triggering a shortcut (which
is by default set to Ctrl+Shift+V).

Task-number: QTCREATORBUG-146
Change-Id: Ie449ab4b304548d5037a0c877bbbc0344d654325
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-12-14 14:06:46 +01:00
Eike Ziller
85cf2b661e Merge remote-tracking branch 'origin/2.4'
Conflicts:
	src/libs/qmljs/qmljsinterpreter.cpp
	src/libs/qmljs/qmljsinterpreter.h
	src/plugins/debugger/qml/scriptconsole.cpp
	src/plugins/git/gitplugin.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas_p.h

Change-Id: Iad59c8d87c72a21c79c047e374c0ab689998af39
2011-11-11 09:46:25 +01:00
hjk
82f5573626 more Id type fixes
Change-Id: I3720946ba5485696822976567d83b4d6cb1fb283

x

Change-Id: Iab58bc34bc56371405d132315573b484a533b77c
Reviewed-by: hjk <qthjk@ovi.com>
2011-11-10 15:57:09 +01:00
hjk
31600758de all: s/info@qt.nokia.com/qt-info@nokia.com/
Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-11-03 10:33:19 +01:00
Leandro Melo
d8dedb439c Editor: Keyboard option for overriding delete word's start/end
Regular and camel-case version.

Task-number: QTCREATORBUG-5160
Change-Id: I749fbc4c768d4f11fb741fd1b9d00ddee56eb965
Reviewed-on: http://codereview.qt-project.org/5537
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2011-09-26 15:10:39 +02:00