diff options
author | Alexander Kurtakov | 2017-07-25 12:26:20 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2017-07-25 12:29:43 +0000 |
commit | 30c01e1e4b9f3f6feb22bf12a7248de589b24b9b (patch) | |
tree | 2416c300df9a310f20e9590706f7120dcf97a944 /org.eclipse.ui.genericeditor.examples | |
parent | 5c8cf37fee9b51ed5761d1de73d1d840d40739e7 (diff) | |
download | eclipse.platform.text-30c01e1e4b9f3f6feb22bf12a7248de589b24b9b.tar.gz eclipse.platform.text-30c01e1e4b9f3f6feb22bf12a7248de589b24b9b.tar.xz eclipse.platform.text-30c01e1e4b9f3f6feb22bf12a7248de589b24b9b.zip |
Bug 520150 - Improve .project generic editor example to use systemS4_8_0_M1I20170806-2000I20170805-1500I20170804-2000I20170802-2000I20170802-0800I20170801-2000I20170801-0800I20170731-2000I20170731-0800I20170730-2000I20170729-2000I20170728-2000I20170727-2000I20170727-0610I20170726-2000I20170725-2000
colors.
Don't define new Colors as they need disposing which is done
automatically for system colors. The colors used map exactly to BLUE and
DARK_GRAY here.
Change-Id: I81752e6f426d3efbfcc247309acb8b0155581b07
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'org.eclipse.ui.genericeditor.examples')
-rw-r--r-- | org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/BlueTagsPresentationReconciler.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/BlueTagsPresentationReconciler.java b/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/BlueTagsPresentationReconciler.java index fd2400544dc..1cfcf1eba33 100644 --- a/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/BlueTagsPresentationReconciler.java +++ b/org.eclipse.ui.genericeditor.examples/src/org/eclipse/ui/genericeditor/examples/dotproject/BlueTagsPresentationReconciler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 Red Hat Inc. and others + * Copyright (c) 2016, 2017 Red Hat Inc. and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,10 +10,6 @@ *******************************************************************************/ package org.eclipse.ui.genericeditor.examples.dotproject; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.RGB; -import org.eclipse.swt.widgets.Display; - import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.TextAttribute; import org.eclipse.jface.text.presentation.PresentationReconciler; @@ -22,11 +18,13 @@ import org.eclipse.jface.text.rules.IRule; import org.eclipse.jface.text.rules.RuleBasedScanner; import org.eclipse.jface.text.rules.SingleLineRule; import org.eclipse.jface.text.rules.Token; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Display; public class BlueTagsPresentationReconciler extends PresentationReconciler { - private final TextAttribute tagAttribute = new TextAttribute(new Color(Display.getCurrent(), new RGB(0,0, 255))); - private final TextAttribute headerAttribute = new TextAttribute(new Color(Display.getCurrent(), new RGB(128,128,128))); + private final TextAttribute tagAttribute = new TextAttribute(Display.getCurrent().getSystemColor(SWT.COLOR_BLUE)); + private final TextAttribute headerAttribute = new TextAttribute(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY)); public BlueTagsPresentationReconciler() { RuleBasedScanner scanner= new RuleBasedScanner(); |