From 6cca59bb7c9e1801a5789c49deb81f686c634f4f Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Mon, 16 May 2011 08:24:16 +0000 Subject: [PATCH] Bug 345809 - Quick-Outline doesn't respect user preferences on its labels Patch by Patrick Hofer --- .../cdt/internal/ui/text/COutlineInformationControl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/COutlineInformationControl.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/COutlineInformationControl.java index a0b4f58acb3..c2629ad81f9 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/COutlineInformationControl.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/COutlineInformationControl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 QNX Software Systems and others. + * Copyright (c) 2005, 2011 QNX Software Systems 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 @@ -9,6 +9,7 @@ * QNX Software Systems - initial API and implementation * Sergey Prigogin, Google * Anton Leherbauer (Wind River Systems) + * Patrick Hofer (bug #345809) *******************************************************************************/ package org.eclipse.cdt.internal.ui.text; @@ -24,6 +25,7 @@ import org.eclipse.swt.widgets.Tree; import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.core.model.ITranslationUnit; +import org.eclipse.cdt.ui.PreferenceConstants; import org.eclipse.cdt.internal.ui.editor.CContentOutlinerProvider; import org.eclipse.cdt.internal.ui.editor.LexicalSortingAction; @@ -76,7 +78,10 @@ public class COutlineInformationControl extends AbstractInformationControl { treeViewer.setContentProvider(fOutlineContentProvider); fSortingAction= new LexicalSortingAction(treeViewer, ".isChecked"); //$NON-NLS-1$ treeViewer.addFilter(new NamePatternFilter()); - treeViewer.setLabelProvider(new DecoratingCLabelProvider(new AppearanceAwareLabelProvider(TEXT_FLAGS, + long textFlags = TEXT_FLAGS; + if (PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.OUTLINE_GROUP_MEMBERS)) + textFlags = textFlags | CElementLabels.M_SIMPLE_NAME | CElementLabels.F_SIMPLE_NAME; + treeViewer.setLabelProvider(new DecoratingCLabelProvider(new AppearanceAwareLabelProvider(textFlags, IMAGE_FLAGS), true)); treeViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS); return treeViewer;