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:
parent
5914d59aca
commit
e301d1e30b
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue