Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAri Kast2020-07-20 00:13:49 +0000
committerAri Kast2020-08-07 00:33:40 +0000
commitc7fa061d62bdd7853035da3a76a467e9de9b4b93 (patch)
tree1b393d11c4f169856bc56ee75684ce8bac0a34ea /org.eclipse.ui.editors
parent746a67fdb4b15bee4c9e564a8807029400ac3eb2 (diff)
downloadeclipse.platform.text-c7fa061d62bdd7853035da3a76a467e9de9b4b93.tar.gz
eclipse.platform.text-c7fa061d62bdd7853035da3a76a467e9de9b4b93.tar.xz
eclipse.platform.text-c7fa061d62bdd7853035da3a76a467e9de9b4b93.zip
Bug 72773: store and navigate multiple edit history locations
This expands existing "last edit location" navigation to now store an ordered queue of multiple last edit locations. The size of the list is configurable (currently set at 15). Once the list is filled, each new location insertion evicts the oldest location to make room for the new. Thus only the last 15 edit locations are ever stored. To avoid wasting list space on multiple similar locations in close proximity to each other, similar edit locations (as determined by a parameterized proximity function) are merged to a single location. Ctrl+Q key mapping still navigates to the last edit location same as before. However, now continuing to hold ctrl and then pressing Q again begins the traversal thru history of prior edit locations. Once traversal stops, future Ctrl+Q actions are now temporarily anchored to this older historical location. M3+Ctrl+Q conversely moves the anchor forward thru edit history, so after traversing backward with Ctrl+Q, you can go forward again by repeatedly pressing Alt/Opt+Ctrl+Q. New edit locations are always inserted at the end of the queue, so that insertion order is always maintained. Insertion of a new edit location also resets the last location "anchor" back to the most recent edit, so that pressing Ctrl+Q once again brings you to the most recent edit rather than a historical one. Change-Id: I885e209b9d9300f8e6226e6cdf64616751ead944
Diffstat (limited to 'org.eclipse.ui.editors')
-rw-r--r--org.eclipse.ui.editors/icons/full/dtool16/next_edit_pos.pngbin0 -> 529 bytes
-rw-r--r--org.eclipse.ui.editors/icons/full/dtool16/next_edit_pos@2x.pngbin0 -> 1081 bytes
-rw-r--r--org.eclipse.ui.editors/icons/full/etool16/next_edit_pos.pngbin0 -> 576 bytes
-rw-r--r--org.eclipse.ui.editors/icons/full/etool16/next_edit_pos@2x.pngbin0 -> 1190 bytes
-rw-r--r--org.eclipse.ui.editors/plugin.properties2
-rw-r--r--org.eclipse.ui.editors/plugin.xml13
6 files changed, 15 insertions, 0 deletions
diff --git a/org.eclipse.ui.editors/icons/full/dtool16/next_edit_pos.png b/org.eclipse.ui.editors/icons/full/dtool16/next_edit_pos.png
new file mode 100644
index 00000000000..995f1badd96
--- /dev/null
+++ b/org.eclipse.ui.editors/icons/full/dtool16/next_edit_pos.png
Binary files differ
diff --git a/org.eclipse.ui.editors/icons/full/dtool16/next_edit_pos@2x.png b/org.eclipse.ui.editors/icons/full/dtool16/next_edit_pos@2x.png
new file mode 100644
index 00000000000..ee5c0432839
--- /dev/null
+++ b/org.eclipse.ui.editors/icons/full/dtool16/next_edit_pos@2x.png
Binary files differ
diff --git a/org.eclipse.ui.editors/icons/full/etool16/next_edit_pos.png b/org.eclipse.ui.editors/icons/full/etool16/next_edit_pos.png
new file mode 100644
index 00000000000..5fa266b0760
--- /dev/null
+++ b/org.eclipse.ui.editors/icons/full/etool16/next_edit_pos.png
Binary files differ
diff --git a/org.eclipse.ui.editors/icons/full/etool16/next_edit_pos@2x.png b/org.eclipse.ui.editors/icons/full/etool16/next_edit_pos@2x.png
new file mode 100644
index 00000000000..47c1f8a8159
--- /dev/null
+++ b/org.eclipse.ui.editors/icons/full/etool16/next_edit_pos@2x.png
Binary files differ
diff --git a/org.eclipse.ui.editors/plugin.properties b/org.eclipse.ui.editors/plugin.properties
index 42b9b6ea423..f21d49ba5e3 100644
--- a/org.eclipse.ui.editors/plugin.properties
+++ b/org.eclipse.ui.editors/plugin.properties
@@ -84,6 +84,8 @@ revisionInfo.label= Revision Information
goToLastEditPosition.label= Last Edit Lo&cation
goToLastEditPosition.tooltip= Last Edit Location
+goToNextEditPosition.label= Next Edit Lo&cation
+goToNextEditPosition.tooltip= Next Edit Location
textEditorNavigationActionSet.label= Editor Navigation
diff --git a/org.eclipse.ui.editors/plugin.xml b/org.eclipse.ui.editors/plugin.xml
index cf169c3895f..050a3d0f3d3 100644
--- a/org.eclipse.ui.editors/plugin.xml
+++ b/org.eclipse.ui.editors/plugin.xml
@@ -481,6 +481,19 @@
tooltip="%goToLastEditPosition.tooltip"
initialEnabled="false">
</action>
+ <action
+ toolbarPath="org.eclipse.ui.workbench.navigate/history.group"
+ id="org.eclipse.ui.edit.text.gotoNextEditPosition"
+ class="org.eclipse.ui.texteditor.GotoNextEditPositionAction"
+ definitionId="org.eclipse.ui.edit.text.gotoNextEditPosition"
+ disabledIcon="$nl$/icons/full/dtool16/next_edit_pos.png"
+ icon="$nl$/icons/full/etool16/next_edit_pos.png"
+ helpContextId="org.eclipse.ui.goto_next_edit_position_action_context"
+ label="%goToNextEditPosition.label"
+ menubarPath="navigate/"
+ tooltip="%goToNextEditPosition.tooltip"
+ initialEnabled="false">
+ </action>
</actionSet>
<actionSet
label="%conversionActionSet.label"

Back to the top