diff options
-rw-r--r-- | bundles/org.eclipse.team.genericeditor.diff.extension/src/org/eclipse/team/internal/genericeditor/diff/extension/presentation/DiffPresentationReconciler.java | 16 |
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); |