View | Details | Raw Unified | Return to bug 220641 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/pde/internal/ui/editor/text/ColorManager.java (-3 / +10 lines)
Lines 18-23 Link Here
18
import org.eclipse.jface.util.PropertyChangeEvent;
18
import org.eclipse.jface.util.PropertyChangeEvent;
19
import org.eclipse.pde.internal.ui.PDEPlugin;
19
import org.eclipse.pde.internal.ui.PDEPlugin;
20
import org.eclipse.swt.SWT;
20
import org.eclipse.swt.SWT;
21
import org.eclipse.swt.SWTException;
21
import org.eclipse.swt.graphics.Color;
22
import org.eclipse.swt.graphics.Color;
22
import org.eclipse.swt.graphics.RGB;
23
import org.eclipse.swt.graphics.RGB;
23
import org.eclipse.swt.widgets.Display;
24
import org.eclipse.swt.widgets.Display;
Lines 41-47 Link Here
41
	}
42
	}
42
43
43
	public static void initializeDefaults(IPreferenceStore store) {
44
	public static void initializeDefaults(IPreferenceStore store) {
44
		PreferenceConverter.setDefault(store, P_DEFAULT, DEFAULT);
45
		boolean highContrast = false;
46
		try {
47
			highContrast = Display.getDefault().getHighContrast();
48
		} catch (SWTException e) { // keep highContrast = false
49
		}
50
51
		PreferenceConverter.setDefault(store, P_DEFAULT, highContrast ? DEFAULT_HIGH_CONTRAST : DEFAULT);
45
		PreferenceConverter.setDefault(store, P_PROC_INSTR, PROC_INSTR);
52
		PreferenceConverter.setDefault(store, P_PROC_INSTR, PROC_INSTR);
46
		PreferenceConverter.setDefault(store, P_STRING, STRING);
53
		PreferenceConverter.setDefault(store, P_STRING, STRING);
47
		PreferenceConverter.setDefault(store, P_EXTERNALIZED_STRING, EXTERNALIZED_STRING);
54
		PreferenceConverter.setDefault(store, P_EXTERNALIZED_STRING, EXTERNALIZED_STRING);
Lines 50-57 Link Here
50
		PreferenceConverter.setDefault(store, P_HEADER_KEY, HEADER_KEY);
57
		PreferenceConverter.setDefault(store, P_HEADER_KEY, HEADER_KEY);
51
		PreferenceConverter.setDefault(store, P_HEADER_OSGI, HEADER_OSGI);
58
		PreferenceConverter.setDefault(store, P_HEADER_OSGI, HEADER_OSGI);
52
		store.setDefault(P_HEADER_OSGI + IPDEColorConstants.P_BOLD_SUFFIX, true);
59
		store.setDefault(P_HEADER_OSGI + IPDEColorConstants.P_BOLD_SUFFIX, true);
53
		PreferenceConverter.setDefault(store, P_HEADER_VALUE, HEADER_VALUE);
60
		PreferenceConverter.setDefault(store, P_HEADER_VALUE, highContrast ? HEADER_VALUE_HIGH_CONTRAST : HEADER_VALUE);
54
		PreferenceConverter.setDefault(store, P_HEADER_ATTRIBUTES, HEADER_ATTRIBUTES);
61
		PreferenceConverter.setDefault(store, P_HEADER_ATTRIBUTES, highContrast ? HEADER_ASSIGNMENT_HIGH_CONTRAST : HEADER_ATTRIBUTES);
55
		store.setDefault(P_HEADER_ATTRIBUTES + IPDEColorConstants.P_ITALIC_SUFFIX, true);
62
		store.setDefault(P_HEADER_ATTRIBUTES + IPDEColorConstants.P_ITALIC_SUFFIX, true);
56
		PreferenceConverter.setDefault(store, P_HEADER_ASSIGNMENT, HEADER_ASSIGNMENT);
63
		PreferenceConverter.setDefault(store, P_HEADER_ASSIGNMENT, HEADER_ASSIGNMENT);
57
	}
64
	}
(-)src/org/eclipse/pde/internal/ui/editor/text/IPDEColorConstants.java (-1 / +4 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2008 IBM Corporation and others.
2
 * Copyright (c) 2000, 2006 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 18-28 Link Here
18
	RGB STRING = new RGB(0, 128, 0);
18
	RGB STRING = new RGB(0, 128, 0);
19
	RGB EXTERNALIZED_STRING = new RGB(128, 0, 128);
19
	RGB EXTERNALIZED_STRING = new RGB(128, 0, 128);
20
	RGB DEFAULT = new RGB(0, 0, 0);
20
	RGB DEFAULT = new RGB(0, 0, 0);
21
	RGB DEFAULT_HIGH_CONTRAST = new RGB(255, 255, 255);
21
	RGB TAG = new RGB(0, 0, 128);
22
	RGB TAG = new RGB(0, 0, 128);
22
23
23
	RGB HEADER_KEY = new RGB(128, 0, 0);
24
	RGB HEADER_KEY = new RGB(128, 0, 0);
24
	RGB HEADER_VALUE = new RGB(0, 0, 0);
25
	RGB HEADER_VALUE = new RGB(0, 0, 0);
26
	RGB HEADER_VALUE_HIGH_CONTRAST = new RGB(255, 255, 255);
25
	RGB HEADER_ASSIGNMENT = new RGB(0, 0, 0);
27
	RGB HEADER_ASSIGNMENT = new RGB(0, 0, 0);
28
	RGB HEADER_ASSIGNMENT_HIGH_CONTRAST = new RGB(255, 255, 255);
26
	RGB HEADER_OSGI = new RGB(128, 0, 0);
29
	RGB HEADER_OSGI = new RGB(128, 0, 0);
27
	RGB HEADER_ATTRIBUTES = new RGB(128, 128, 0);
30
	RGB HEADER_ATTRIBUTES = new RGB(128, 128, 0);
28
31

Return to bug 220641