1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-19 06:55:23 +02:00

Bug 280414 - Method search doesn't work in pop-up outline view (CTRL+O) when "Group method definitions" enabled

This commit is contained in:
Anton Leherbauer 2009-08-26 07:53:56 +00:00
parent 72d12ff557
commit 09209e6efd
3 changed files with 7 additions and 4 deletions

View file

@ -93,7 +93,7 @@ public abstract class AbstractCModelOutlinePage extends Page implements IContent
/** /**
* The default label provider for the outline. * The default label provider for the outline.
*/ */
protected static class COutlineLabelProvider extends AppearanceAwareLabelProvider { public static class COutlineLabelProvider extends AppearanceAwareLabelProvider {
/** /**
* Flag whether to show member definitions with qualified or simple names. * Flag whether to show member definitions with qualified or simple names.

View file

@ -55,6 +55,7 @@ import org.eclipse.ui.IEditorPart;
import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.IParent; import org.eclipse.cdt.core.model.IParent;
import org.eclipse.cdt.core.parser.Keywords; import org.eclipse.cdt.core.parser.Keywords;
import org.eclipse.cdt.ui.CElementGrouping;
import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.ui.actions.CustomFiltersActionGroup; import org.eclipse.cdt.ui.actions.CustomFiltersActionGroup;
@ -102,7 +103,7 @@ public abstract class AbstractInformationControl extends PopupDialog implements
} }
private boolean hasUnfilteredChild(TreeViewer viewer, Object element) { private boolean hasUnfilteredChild(TreeViewer viewer, Object element) {
if (element instanceof IParent) { if (element instanceof IParent || element instanceof CElementGrouping) {
Object[] children= ((ITreeContentProvider) viewer.getContentProvider()).getChildren(element); Object[] children= ((ITreeContentProvider) viewer.getContentProvider()).getChildren(element);
for (Object element2 : children) for (Object element2 : children)
if (select(viewer, element, element2)) if (select(viewer, element, element2))

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005, 2007 QNX Software Systems and others. * Copyright (c) 2005, 2009 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -24,6 +24,8 @@ import org.eclipse.swt.widgets.Tree;
import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ITranslationUnit; import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.core.model.util.CElementBaseLabels; import org.eclipse.cdt.core.model.util.CElementBaseLabels;
import org.eclipse.cdt.internal.ui.editor.AbstractCModelOutlinePage;
import org.eclipse.cdt.internal.ui.editor.CContentOutlinerProvider; import org.eclipse.cdt.internal.ui.editor.CContentOutlinerProvider;
import org.eclipse.cdt.internal.ui.editor.LexicalSortingAction; import org.eclipse.cdt.internal.ui.editor.LexicalSortingAction;
import org.eclipse.cdt.internal.ui.util.ProblemTreeViewer; import org.eclipse.cdt.internal.ui.util.ProblemTreeViewer;
@ -75,7 +77,7 @@ public class COutlineInformationControl extends AbstractInformationControl {
fSortingAction= new LexicalSortingAction(treeViewer, ".isChecked"); //$NON-NLS-1$ fSortingAction= new LexicalSortingAction(treeViewer, ".isChecked"); //$NON-NLS-1$
treeViewer.addFilter(new NamePatternFilter()); treeViewer.addFilter(new NamePatternFilter());
treeViewer.setLabelProvider(new DecoratingCLabelProvider( treeViewer.setLabelProvider(new DecoratingCLabelProvider(
new AppearanceAwareLabelProvider(TEXT_FLAGS, IMAGE_FLAGS), true)); new AbstractCModelOutlinePage.COutlineLabelProvider(TEXT_FLAGS, IMAGE_FLAGS), true));
treeViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS); treeViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
return treeViewer; return treeViewer;
} }