diff --git a/defaults/src/org/netbeans/modules/defaults/Eclipse-keybindings.xml b/defaults/src/org/netbeans/modules/defaults/Eclipse-keybindings.xml
--- a/defaults/src/org/netbeans/modules/defaults/Eclipse-keybindings.xml
+++ b/defaults/src/org/netbeans/modules/defaults/Eclipse-keybindings.xml
@@ -129,6 +129,8 @@
+
+
diff --git a/defaults/src/org/netbeans/modules/defaults/Emacs-keybindings.xml b/defaults/src/org/netbeans/modules/defaults/Emacs-keybindings.xml
--- a/defaults/src/org/netbeans/modules/defaults/Emacs-keybindings.xml
+++ b/defaults/src/org/netbeans/modules/defaults/Emacs-keybindings.xml
@@ -133,6 +133,8 @@
+
+
diff --git a/defaults/src/org/netbeans/modules/defaults/Idea-keybindings.xml b/defaults/src/org/netbeans/modules/defaults/Idea-keybindings.xml
--- a/defaults/src/org/netbeans/modules/defaults/Idea-keybindings.xml
+++ b/defaults/src/org/netbeans/modules/defaults/Idea-keybindings.xml
@@ -117,6 +117,8 @@
+
+
diff --git a/defaults/src/org/netbeans/modules/defaults/NetBeans55-keybindings.xml b/defaults/src/org/netbeans/modules/defaults/NetBeans55-keybindings.xml
--- a/defaults/src/org/netbeans/modules/defaults/NetBeans55-keybindings.xml
+++ b/defaults/src/org/netbeans/modules/defaults/NetBeans55-keybindings.xml
@@ -131,6 +131,8 @@
+
+
diff --git a/editor.lib/apichanges.xml b/editor.lib/apichanges.xml
--- a/editor.lib/apichanges.xml
+++ b/editor.lib/apichanges.xml
@@ -649,6 +649,8 @@
org.netbeans.editor.ActionFactory$RemoveWordPreviousAction: method protected void org.netbeans.editor.BaseAction.settingsChange(org.netbeans.editor.SettingsChangeEvent,java.lang.Class)
org.netbeans.editor.ActionFactory$ScrollDownAction: method protected void org.netbeans.editor.BaseAction.settingsChange(org.netbeans.editor.SettingsChangeEvent,java.lang.Class)
org.netbeans.editor.ActionFactory$ScrollUpAction: method protected void org.netbeans.editor.BaseAction.settingsChange(org.netbeans.editor.SettingsChangeEvent,java.lang.Class)
+org.netbeans.editor.ActionFactory$ScrollLeftAction: method protected void org.netbeans.editor.BaseAction.settingsChange(org.netbeans.editor.SettingsChangeEvent,java.lang.Class)
+org.netbeans.editor.ActionFactory$ScrollRightAction: method protected void org.netbeans.editor.BaseAction.settingsChange(org.netbeans.editor.SettingsChangeEvent,java.lang.Class)
org.netbeans.editor.ActionFactory$SelectIdentifierAction: method protected void org.netbeans.editor.BaseAction.settingsChange(org.netbeans.editor.SettingsChangeEvent,java.lang.Class)
org.netbeans.editor.ActionFactory$SelectNextParameterAction:method protected void org.netbeans.editor.BaseAction.settingsChange(org.netbeans.editor.SettingsChangeEvent,java.lang.Class)
org.netbeans.editor.ActionFactory$ShiftLineAction: method protected void org.netbeans.editor.BaseAction.settingsChange(org.netbeans.editor.SettingsChangeEvent,java.lang.Class)
diff --git a/editor.lib/src/org/netbeans/editor/ActionFactory.java b/editor.lib/src/org/netbeans/editor/ActionFactory.java
--- a/editor.lib/src/org/netbeans/editor/ActionFactory.java
+++ b/editor.lib/src/org/netbeans/editor/ActionFactory.java
@@ -2227,6 +2227,40 @@
}
+ @EditorActionRegistration(name = BaseKit.scrollLeftAction)
+ public static class ScrollLeftAction extends LocalBaseAction {
+
+ public ScrollLeftAction() {
+ }
+
+ public void actionPerformed(ActionEvent evt, JTextComponent target) {
+ if (target != null) {
+ EditorUI editorUI = Utilities.getEditorUI(target);
+ Rectangle bounds = editorUI.getExtentBounds();
+ bounds.x += editorUI.getTextMargin().left - editorUI.getLineHeight(); // use same step size as for vertical scrolling
+ editorUI.scrollRectToVisible(bounds, EditorUI.SCROLL_SMALLEST);
+ }
+ }
+
+ }
+
+ @EditorActionRegistration(name = BaseKit.scrollRightAction)
+ public static class ScrollRightAction extends LocalBaseAction {
+
+ public ScrollRightAction() {
+ }
+
+ public void actionPerformed(ActionEvent evt, JTextComponent target) {
+ if (target != null) {
+ EditorUI editorUI = Utilities.getEditorUI(target);
+ Rectangle bounds = editorUI.getExtentBounds();
+ bounds.x += editorUI.getTextMargin().left + editorUI.getLineHeight(); // use same step size as for vertical scrolling
+ editorUI.scrollRectToVisible(bounds, EditorUI.SCROLL_SMALLEST);
+ }
+ }
+
+ }
+
@EditorActionRegistration(name = BaseKit.insertDateTimeAction)
public static class InsertDateTimeAction extends LocalBaseAction {
diff --git a/editor.lib/src/org/netbeans/editor/BaseKit.java b/editor.lib/src/org/netbeans/editor/BaseKit.java
--- a/editor.lib/src/org/netbeans/editor/BaseKit.java
+++ b/editor.lib/src/org/netbeans/editor/BaseKit.java
@@ -304,6 +304,12 @@
/** Scroll window one line down */
public static final String scrollDownAction = "scroll-down"; // NOI18N
+ /** Scroll window one step left */
+ public static final String scrollLeftAction = "scroll-left"; // NOI18N
+
+ /** Scroll window one step right */
+ public static final String scrollRightAction = "scroll-right"; // NOI18N
+
/** Prefix of all macro-based actions */
public static final String macroActionPrefix = "macro-"; // NOI18N
diff --git a/editor.lib/src/org/netbeans/editor/Bundle.properties b/editor.lib/src/org/netbeans/editor/Bundle.properties
--- a/editor.lib/src/org/netbeans/editor/Bundle.properties
+++ b/editor.lib/src/org/netbeans/editor/Bundle.properties
@@ -145,6 +145,8 @@
scroll-down=Scroll Down
scroll-top=Scroll to Top
scroll-up=Scroll Up
+scroll-left=Scroll Left
+scroll-right=Scroll Right
select-all=Select All
select-identifier=Select Identifier
select-line=Select Line
diff --git a/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings-mac.xml b/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings-mac.xml
--- a/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings-mac.xml
+++ b/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings-mac.xml
@@ -99,6 +99,11 @@
+
+
+
+
+
diff --git a/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings.xml b/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings.xml
--- a/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings.xml
+++ b/editor/src/org/netbeans/modules/editor/resources/NetBeans-keybindings.xml
@@ -149,6 +149,10 @@
+
+
+
+