1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 09:55:29 +02:00

Show function parameters in Open Element dialog.

This commit is contained in:
Markus Schorn 2008-03-14 09:48:14 +00:00
parent 319bbd5dfb
commit 553c5a49fe
2 changed files with 11 additions and 8 deletions

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2004, 2007 IBM Corporation and others.
* Copyright (c) 2004, 2008 IBM Corporation 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
@ -96,12 +96,15 @@ public class TypeInfoLabelProvider extends LabelProvider {
}
buf.append(qualifiedName.getFullyQualifiedName());
}
if (isSet(SHOW_PARAMETERS) && typeInfo.getCElementType() == ICElement.C_FUNCTION || typeInfo.getCElementType() == ICElement.C_MACRO) {
if (typeInfo instanceof IFunctionInfo) {
IFunctionInfo functionInfo= (IFunctionInfo)typeInfo;
String[] params= functionInfo.getParameters();
if (params != null) {
buf.append(FunctionDeclaration.getParameterClause(params));
if (isSet(SHOW_PARAMETERS)) {
final int elementType = typeInfo.getCElementType();
if (elementType == ICElement.C_FUNCTION || elementType == ICElement.C_MACRO) {
if (typeInfo instanceof IFunctionInfo) {
IFunctionInfo functionInfo= (IFunctionInfo)typeInfo;
String[] params= functionInfo.getParameters();
if (params != null) {
buf.append(FunctionDeclaration.getParameterClause(params));
}
}
}
}

View file

@ -214,7 +214,7 @@ public class TypeSelectionDialog extends TwoPaneElementSelector {
private static final String SETTINGS_SHOW_LOWLEVEL = "show_lowlevel"; //$NON-NLS-1$
private static final TypeInfoLabelProvider fElementRenderer = new TypeInfoLabelProvider(
TypeInfoLabelProvider.SHOW_NAME_ONLY);
TypeInfoLabelProvider.SHOW_NAME_ONLY | TypeInfoLabelProvider.SHOW_PARAMETERS);
private static final TypeInfoLabelProvider fQualifierRenderer = new TypeInfoLabelProvider(
TypeInfoLabelProvider.SHOW_FULLY_QUALIFIED |
TypeInfoLabelProvider.SHOW_PARAMETERS |