1
/*******************************************************************************
2
* Copyright (c) 2000, 2010 IBM Corporation and others.
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* http://www.eclipse.org/legal/epl-v10.html
9
* IBM Corporation - initial API and implementation
10
* Markus Schorn (Wind River Systems)
11
* Anton Leherbauer (Wind River Systems)
12
*******************************************************************************/
13
package org.eclipse.cdt.internal.ui.viewsupport;
15
import org.eclipse.jface.util.IPropertyChangeListener;
16
import org.eclipse.jface.util.PropertyChangeEvent;
18
import org.eclipse.cdt.internal.ui.viewsupport.CElementLabels;
21
* CUILabelProvider that respects settings from the Appearance preference page.
22
* Triggers a viewer update when a preference changes (currently none).
24
public class AppearanceAwareLabelProvider extends CUILabelProvider implements IPropertyChangeListener {
26
public final static long DEFAULT_TEXTFLAGS= CElementLabels.M_PARAMETER_TYPES | CElementLabels.PROJECT_POST_QUALIFIED | CElementLabels.F_APP_TYPE_SIGNATURE | CElementLabels.M_APP_RETURNTYPE;
27
public final static int DEFAULT_IMAGEFLAGS= CElementImageProvider.OVERLAY_ICONS;
30
* Constructor for AppearanceAwareLabelProvider.
32
public AppearanceAwareLabelProvider(long textFlags, int imageFlags) {
33
super(textFlags, imageFlags);
37
* Creates a labelProvider with DEFAULT_TEXTFLAGS and DEFAULT_IMAGEFLAGS
39
public AppearanceAwareLabelProvider() {
40
this(DEFAULT_TEXTFLAGS, DEFAULT_IMAGEFLAGS);
44
* @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
46
public void propertyChange(PropertyChangeEvent event) {