1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Fix check for IVariableDeclaration.

This commit is contained in:
Alain Magloire 2003-04-01 19:11:44 +00:00
parent 5914d59aca
commit e301d1e30b

View file

@ -58,7 +58,7 @@ public class CElementLabelProvider extends LabelProvider {
if (element instanceof ICElement) {
ICElement celem= (ICElement)element;
String name;
String name = "";
switch(celem.getElementType()){
case ICElement.C_FIELD:
case ICElement.C_VARIABLE:
@ -79,7 +79,7 @@ public class CElementLabelProvider extends LabelProvider {
case ICElement.C_ENUMERATION:
if((celem.getElementName() != null) && (celem.getElementName().length() > 0)){
name = celem.getElementName();
} else {
} else if (celem instanceof IVariableDeclaration) {
IVariableDeclaration varDecl = (IVariableDeclaration) celem;
name = varDecl.getTypeName();
}