Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Melcher2015-01-17 11:53:16 +0000
committerSergey Prigogin2015-12-25 02:13:33 +0000
commitfdf204490c8ccb4fe2970d2bec486c502f67fff8 (patch)
tree0f3bb25f74edb608c6805d1e532e32eb98f7e867
parenta83e305abab7be90c0001e6be7cd1ead27587d92 (diff)
downloadeclipse.platform.team-fdf204490c8ccb4fe2970d2bec486c502f67fff8.tar.gz
eclipse.platform.team-fdf204490c8ccb4fe2970d2bec486c502f67fff8.tar.xz
eclipse.platform.team-fdf204490c8ccb4fe2970d2bec486c502f67fff8.zip
checked initially Change-Id: I3a4171702b82bedee70349a01a017108a1d7a70e Signed-off-by: Tobias Melcher <tobias.melcher@sap.com>
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java16
1 files changed, 13 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 32c935471..c10b0854e 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
@@ -1622,6 +1622,16 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
updateFont();
}
+ private static class LineNumberRulerToggleAction extends TextEditorPropertyAction {
+ public LineNumberRulerToggleAction(String label, MergeSourceViewer[] viewers, String preferenceKey) {
+ super(label, viewers, preferenceKey);
+ }
+
+ protected boolean toggleState(boolean checked) {
+ return true;
+ }
+ }
+
private ChainedPreferenceStore createChainedPreferenceStore() {
ArrayList stores= new ArrayList(2);
stores.add(getCompareConfiguration().getPreferenceStore());
@@ -3872,9 +3882,9 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
new boolean[] {needsLeftPainter, needsRightPainter, needsAncestorPainter });
fHandlerService.registerAction(showWhitespaceAction, ITextEditorActionDefinitionIds.SHOW_WHITESPACE_CHARACTERS);
- toggleLineNumbersAction = new TextEditorPropertyAction(CompareMessages.TextMergeViewer_16, new MergeSourceViewer[] {
- fLeft, fRight, fAncestor
- }, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER);
+ toggleLineNumbersAction = new LineNumberRulerToggleAction(CompareMessages.TextMergeViewer_16,
+ new MergeSourceViewer[] { fLeft, fRight, fAncestor },
+ AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER);
fHandlerService.registerAction(toggleLineNumbersAction, ITextEditorActionDefinitionIds.LINENUMBER_TOGGLE);
}

Back to the top