Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSopot Cela2017-03-01 08:29:58 +0000
committerSopot Cela2017-03-06 11:42:57 +0000
commitbf2f6f451d18389afe24218d9b08bc5dce79773b (patch)
tree40b9589b7d0ea8a3def8c891dcb247b22bf84570
parent61c4c5b37a2f7150139e41adea50f42e8caa19b2 (diff)
downloadeclipse.platform.team-bf2f6f451d18389afe24218d9b08bc5dce79773b.tar.gz
eclipse.platform.team-bf2f6f451d18389afe24218d9b08bc5dce79773b.tar.xz
eclipse.platform.team-bf2f6f451d18389afe24218d9b08bc5dce79773b.zip
Adds bold for visual chunk and diff separation. Change-Id: Ia7d0ef5e1c6e6d33e4508e7e7673402395b7a2df Signed-off-by: Sopot Cela <scela@redhat.com>
-rw-r--r--bundles/org.eclipse.team.genericeditor.diff.extension/src/org/eclipse/team/internal/genericeditor/diff/extension/presentation/DiffPresentationReconciler.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/bundles/org.eclipse.team.genericeditor.diff.extension/src/org/eclipse/team/internal/genericeditor/diff/extension/presentation/DiffPresentationReconciler.java b/bundles/org.eclipse.team.genericeditor.diff.extension/src/org/eclipse/team/internal/genericeditor/diff/extension/presentation/DiffPresentationReconciler.java
index 9c27d1c18..f6e74dcd9 100644
--- a/bundles/org.eclipse.team.genericeditor.diff.extension/src/org/eclipse/team/internal/genericeditor/diff/extension/presentation/DiffPresentationReconciler.java
+++ b/bundles/org.eclipse.team.genericeditor.diff.extension/src/org/eclipse/team/internal/genericeditor/diff/extension/presentation/DiffPresentationReconciler.java
@@ -27,12 +27,16 @@ public class DiffPresentationReconciler extends PresentationReconciler {
Display.getCurrent().getSystemColor(SWT.COLOR_RED));
private final TextAttribute bodyAttributePlus = new TextAttribute(
Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GREEN));
+ private final TextAttribute bodyAttributeMinusBold = new TextAttribute(
+ Display.getCurrent().getSystemColor(SWT.COLOR_RED), null, SWT.BOLD);
+ private final TextAttribute bodyAttributePlusBold = new TextAttribute(
+ Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GREEN), null, SWT.BOLD);
private final TextAttribute hunkAttribute = new TextAttribute(
- Display.getCurrent().getSystemColor(SWT.COLOR_DARK_BLUE));
+ Display.getCurrent().getSystemColor(SWT.COLOR_DARK_BLUE), null, SWT.BOLD);
private final TextAttribute headerAttribute = new TextAttribute(
Display.getCurrent().getSystemColor(SWT.COLOR_DARK_MAGENTA));
private final TextAttribute indexDiffAttribute = new TextAttribute(
- Display.getCurrent().getSystemColor(SWT.COLOR_DARK_CYAN));
+ Display.getCurrent().getSystemColor(SWT.COLOR_DARK_CYAN), null, SWT.BOLD);
public DiffPresentationReconciler() {
@@ -47,13 +51,13 @@ public class DiffPresentationReconciler extends PresentationReconciler {
this.setRepairer(hdr, IDiffPartitioning.PARTITION_HEADER);
IRule[] bodyRules=new IRule[7];
- bodyRules[0] = new StartOfLineRule("+", null, new Token(bodyAttributePlus));//$NON-NLS-1$
- bodyRules[1] = new StartOfLineRule("-", null, new Token(bodyAttributeMinus));//$NON-NLS-1$
+ bodyRules[0]=new StartOfLineRule("---", null, new Token(bodyAttributeMinusBold));//$NON-NLS-1$
+ bodyRules[1]=new StartOfLineRule("+++", null, new Token(bodyAttributePlusBold));//$NON-NLS-1$
bodyRules[2] = new StartOfLineRule("@@", null, new Token(hunkAttribute));//$NON-NLS-1$
bodyRules[3]=new StartOfLineRule("diff --git", null, new Token(indexDiffAttribute));//$NON-NLS-1$
bodyRules[4]=new StartOfLineRule("index", null, new Token(indexDiffAttribute));//$NON-NLS-1$
- bodyRules[5]=new StartOfLineRule("---", null, new Token(bodyAttributeMinus));//$NON-NLS-1$
- bodyRules[6]=new StartOfLineRule("+++", null, new Token(bodyAttributePlus));//$NON-NLS-1$
+ bodyRules[5] = new StartOfLineRule("+", null, new Token(bodyAttributePlus));//$NON-NLS-1$
+ bodyRules[6] = new StartOfLineRule("-", null, new Token(bodyAttributeMinus));//$NON-NLS-1$
RuleBasedScanner scanner = new RuleBasedScanner();
scanner.setRules(bodyRules);
DefaultDamagerRepairer dr = new DefaultDamagerRepairer(scanner);

Back to the top