Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRolf Theunissen2019-07-18 16:56:45 -0400
committerRolf Theunissen2019-08-02 14:38:02 -0400
commit824b974c60099124aff89353d8399f49e5d93280 (patch)
tree96830819011fdcbd56a08f85960eeff599031dfb
parenta36a62d0c3fb05a9f9eed61f1d127566b83b8479 (diff)
downloadeclipse.platform.team-824b974c60099124aff89353d8399f49e5d93280.tar.gz
eclipse.platform.team-824b974c60099124aff89353d8399f49e5d93280.tar.xz
eclipse.platform.team-824b974c60099124aff89353d8399f49e5d93280.zip
button Change-Id: I38a28c6ceafcdf8eb58d34bde315b7b7f960e3ee Signed-off-by: Rolf Theunissen <rolf.theunissen@gmail.com>
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java13
-rw-r--r--bundles/org.eclipse.compare/plugin.xml12
2 files changed, 22 insertions, 3 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
index a58365d29..e3e720a09 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
@@ -286,7 +286,8 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
ActionFactory.DELETE.getId(),
ActionFactory.SELECT_ALL.getId(),
ActionFactory.FIND.getId(),
- ITextEditorActionDefinitionIds.LINE_GOTO
+ ITextEditorActionDefinitionIds.LINE_GOTO,
+ ITextEditorActionDefinitionIds.SHOW_WHITESPACE_CHARACTERS
};
private static final String[] TEXT_ACTIONS= {
MergeSourceViewer.UNDO_ID,
@@ -297,7 +298,8 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
MergeSourceViewer.DELETE_ID,
MergeSourceViewer.SELECT_ALL_ID,
MergeSourceViewer.FIND_ID,
- MergeSourceViewer.GOTO_LINE_ID
+ MergeSourceViewer.GOTO_LINE_ID,
+ ITextEditorActionDefinitionIds.SHOW_WHITESPACE_CHARACTERS
};
private static final String BUNDLE_NAME= "org.eclipse.compare.contentmergeviewer.TextMergeViewerResources"; //$NON-NLS-1$
@@ -2684,6 +2686,9 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
contributeChangeEncodingAction(viewer);
+ // showWhiteSpaceAction is added in createToolItems when fAncestor, fLeft and
+ // fRight are initialized
+
contributeDiffBackgroundListener(viewer);
return viewer;
@@ -3882,6 +3887,10 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
showWhitespaceAction = new ShowWhitespaceAction(
new MergeSourceViewer[] {fLeft, fRight, fAncestor},
new boolean[] {needsLeftPainter, needsRightPainter, needsAncestorPainter });
+ // showWhitespaceAction is registered as global action in connectGlobalActions
+ fLeft.addAction(ITextEditorActionDefinitionIds.SHOW_WHITESPACE_CHARACTERS, showWhitespaceAction);
+ fRight.addAction(ITextEditorActionDefinitionIds.SHOW_WHITESPACE_CHARACTERS, showWhitespaceAction);
+ fAncestor.addAction(ITextEditorActionDefinitionIds.SHOW_WHITESPACE_CHARACTERS, showWhitespaceAction);
fHandlerService.registerAction(showWhitespaceAction, ITextEditorActionDefinitionIds.SHOW_WHITESPACE_CHARACTERS);
toggleLineNumbersAction = new LineNumberRulerToggleAction(CompareMessages.TextMergeViewer_16,
diff --git a/bundles/org.eclipse.compare/plugin.xml b/bundles/org.eclipse.compare/plugin.xml
index cb027b7ff..754cb681c 100644
--- a/bundles/org.eclipse.compare/plugin.xml
+++ b/bundles/org.eclipse.compare/plugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<!--
- Copyright (c) 2001, 2012 IBM Corporation and others.
+ Copyright (c) 2001, 2019 IBM Corporation and others.
This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
@@ -128,6 +128,16 @@
</extension>
<extension
+ point="org.eclipse.ui.actionSetPartAssociations">
+ <actionSetPartAssociation
+ targetID="org.eclipse.ui.edit.text.actionSet.presentation">
+ <part
+ id="org.eclipse.compare.CompareEditor">
+ </part>
+ </actionSetPartAssociation>
+ </extension>
+
+ <extension
point="org.eclipse.ui.preferencePages">
<page
name="%ComparePreferencePage.name"

Back to the top