1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix for bug 156844, IEnumeration no longer derives from IVariable

This commit is contained in:
Markus Schorn 2006-09-29 11:24:12 +00:00
parent 815f0df72f
commit a13418d58f
3 changed files with 12 additions and 12 deletions

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2005 QNX Software Systems and others.
* Copyright (c) 2000, 2006 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
@ -7,11 +7,19 @@
*
* Contributors:
* QNX Software Systems - Initial API and implementation
* Markus Schorn (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.core.model;
/**
* An Enumeration type.
*/
public interface IEnumeration extends IVariable, IParent {
public interface IEnumeration extends IParent, IDeclaration {
/**
* Return "enum"
* @throws CModelException
* @deprecated
*/
String getTypeName() throws CModelException;
}

View file

@ -7,6 +7,7 @@
*
* Contributors:
* Rational Software - Initial API and implementation
* Markus Schorn (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.internal.core.model;
@ -28,12 +29,6 @@ public class Enumeration extends SourceManipulation implements IEnumeration{
private EnumerationInfo getEnumerationInfo() throws CModelException{
return (EnumerationInfo) getElementInfo();
}
/**
* @see org.eclipse.cdt.core.model.IVariable#getInitializer()
*/
public String getInitializer() {
return null;
}
/**
* @see org.eclipse.cdt.core.model.IVariableDeclaration#getTypeName()

View file

@ -342,10 +342,7 @@ public class CIndexQueries {
return element;
}
if (element instanceof org.eclipse.cdt.core.model.IVariable) {
// bug 156844
if (!(element instanceof org.eclipse.cdt.core.model.IEnumeration)) {
return element;
}
return element;
}
try {
if (element instanceof IParent) {