Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2007-04-23 17:29:51 +0000
committerMichael Valenta2007-04-23 17:29:51 +0000
commite28d9aa5a37af3284fac5af00a12dce5647fb0de (patch)
tree42d6f1c5f7ae4b9daf9bb2832b70883c7a030c3e /bundles
parent3377f1823d6406d36952f678d1590b637505d087 (diff)
downloadeclipse.platform.team-e28d9aa5a37af3284fac5af00a12dce5647fb0de.tar.gz
eclipse.platform.team-e28d9aa5a37af3284fac5af00a12dce5647fb0de.tar.xz
eclipse.platform.team-e28d9aa5a37af3284fac5af00a12dce5647fb0de.zip
Bug 175254 Move "Ignore White Space Where Applicable" toolbar button to merge viewer toolbar
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java17
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java3
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java17
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java3
4 files changed, 14 insertions, 26 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 f6154d1c5..04062a6fd 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
@@ -3926,6 +3926,13 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
fHandlerService.registerAction(a, "org.eclipse.compare.copyRightToLeft"); //$NON-NLS-1$
}
+ fIgnoreWhitespace= ChangePropertyAction.createIgnoreWhiteSpaceAction(getResourceBundle(), getCompareConfiguration());
+ fIgnoreWhitespace.setActionDefinitionId(ICompareUIConstants.COMMAND_IGNORE_WHITESPACE);
+ fLeft.addTextAction(fIgnoreWhitespace);
+ fRight.addTextAction(fIgnoreWhitespace);
+ fAncestor.addTextAction(fIgnoreWhitespace);
+ fHandlerService.registerAction(fIgnoreWhitespace, fIgnoreWhitespace.getActionDefinitionId());
+
showWhitespaceAction = new ShowWhitespaceAction(new MergeSourceViewer[] {
fLeft, fRight, fAncestor
});
@@ -3935,16 +3942,6 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
fLeft, fRight, fAncestor
}, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER);
fHandlerService.registerAction(toggleLineNumbersAction, ITextEditorActionDefinitionIds.LINENUMBER_TOGGLE);
-
- fIgnoreWhitespace= ChangePropertyAction.createIgnoreWhiteSpaceAction(getResourceBundle(), getCompareConfiguration());
- fIgnoreWhitespace.setActionDefinitionId(ICompareUIConstants.COMMAND_IGNORE_WHITESPACE);
- fLeft.addTextAction(fIgnoreWhitespace);
- fRight.addTextAction(fIgnoreWhitespace);
- fAncestor.addTextAction(fIgnoreWhitespace);
- // Register for key binding if we are not in an editor
- if (!(getCompareConfiguration().getContainer().getWorkbenchPart() instanceof IEditorPart)) {
- fHandlerService.registerAction(fIgnoreWhitespace, fIgnoreWhitespace.getActionDefinitionId());
- }
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java
index a1c683548..1435c3964 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java
@@ -40,7 +40,6 @@ public class CompareEditorContributor extends EditorActionBarContributor {
IWorkbenchHelpSystem helpSystem= PlatformUI.getWorkbench().getHelpSystem();
fIgnoreWhitespace= ChangePropertyAction.createIgnoreWhiteSpaceAction(bundle, null);
- fIgnoreWhitespace.setActionDefinitionId(ICompareUIConstants.COMMAND_IGNORE_WHITESPACE);
helpSystem.setHelp(fIgnoreWhitespace, ICompareContextIds.IGNORE_WHITESPACE_ACTION);
fNext= new NavigationAction(bundle, true);
@@ -105,8 +104,6 @@ public class CompareEditorContributor extends EditorActionBarContributor {
actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_NEXT_ANNOTATION, fNext);
actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_PREVIOUS_ANNOTATION, fPrevious);
- actionBars.setGlobalActionHandler(ICompareUIConstants.COMMAND_IGNORE_WHITESPACE, fIgnoreWhitespace);
-
CompareConfiguration cc= editor.getCompareConfiguration();
fIgnoreWhitespace.setCompareConfiguration(cc);
} else {
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
index f6154d1c5..04062a6fd 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
@@ -3926,6 +3926,13 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
fHandlerService.registerAction(a, "org.eclipse.compare.copyRightToLeft"); //$NON-NLS-1$
}
+ fIgnoreWhitespace= ChangePropertyAction.createIgnoreWhiteSpaceAction(getResourceBundle(), getCompareConfiguration());
+ fIgnoreWhitespace.setActionDefinitionId(ICompareUIConstants.COMMAND_IGNORE_WHITESPACE);
+ fLeft.addTextAction(fIgnoreWhitespace);
+ fRight.addTextAction(fIgnoreWhitespace);
+ fAncestor.addTextAction(fIgnoreWhitespace);
+ fHandlerService.registerAction(fIgnoreWhitespace, fIgnoreWhitespace.getActionDefinitionId());
+
showWhitespaceAction = new ShowWhitespaceAction(new MergeSourceViewer[] {
fLeft, fRight, fAncestor
});
@@ -3935,16 +3942,6 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
fLeft, fRight, fAncestor
}, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER);
fHandlerService.registerAction(toggleLineNumbersAction, ITextEditorActionDefinitionIds.LINENUMBER_TOGGLE);
-
- fIgnoreWhitespace= ChangePropertyAction.createIgnoreWhiteSpaceAction(getResourceBundle(), getCompareConfiguration());
- fIgnoreWhitespace.setActionDefinitionId(ICompareUIConstants.COMMAND_IGNORE_WHITESPACE);
- fLeft.addTextAction(fIgnoreWhitespace);
- fRight.addTextAction(fIgnoreWhitespace);
- fAncestor.addTextAction(fIgnoreWhitespace);
- // Register for key binding if we are not in an editor
- if (!(getCompareConfiguration().getContainer().getWorkbenchPart() instanceof IEditorPart)) {
- fHandlerService.registerAction(fIgnoreWhitespace, fIgnoreWhitespace.getActionDefinitionId());
- }
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java
index a1c683548..1435c3964 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java
@@ -40,7 +40,6 @@ public class CompareEditorContributor extends EditorActionBarContributor {
IWorkbenchHelpSystem helpSystem= PlatformUI.getWorkbench().getHelpSystem();
fIgnoreWhitespace= ChangePropertyAction.createIgnoreWhiteSpaceAction(bundle, null);
- fIgnoreWhitespace.setActionDefinitionId(ICompareUIConstants.COMMAND_IGNORE_WHITESPACE);
helpSystem.setHelp(fIgnoreWhitespace, ICompareContextIds.IGNORE_WHITESPACE_ACTION);
fNext= new NavigationAction(bundle, true);
@@ -105,8 +104,6 @@ public class CompareEditorContributor extends EditorActionBarContributor {
actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_NEXT_ANNOTATION, fNext);
actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_PREVIOUS_ANNOTATION, fPrevious);
- actionBars.setGlobalActionHandler(ICompareUIConstants.COMMAND_IGNORE_WHITESPACE, fIgnoreWhitespace);
-
CompareConfiguration cc= editor.getCompareConfiguration();
fIgnoreWhitespace.setCompareConfiguration(cc);
} else {

Back to the top