public LabelsFactoryImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case LabelsPackage.AREA_LABEL: return createAreaLabel();
case LabelsPackage.AREA_LABEL_VALUE: return createAreaLabelValue();
case LabelsPackage.COMMON_BORDER_RELATIONSHIP_LABEL: return createCommonBorderRelationshipLabel();
case LabelsPackage.COMMON_BORDER_RELATIONSHIP_LABEL_VALUE: return createCommonBorderRelationshipLabelValue();
case LabelsPackage.POPULATION_LABEL: return createPopulationLabel();
case LabelsPackage.POPULATION_LABEL_VALUE: return createPopulationLabelValue();
case LabelsPackage.RELATIVE_PHYSICAL_RELATIONSHIP_LABEL: return createRelativePhysicalRelationshipLabel();
case LabelsPackage.RELATIVE_PHYSICAL_RELATIONSHIP_LABEL_VALUE: return createRelativePhysicalRelationshipLabelValue();
case LabelsPackage.TRANSPORT_RELATIONSHIP_LABEL: return createTransportRelationshipLabel();
case LabelsPackage.TRANSPORT_RELATIONSHIP_LABEL_VALUE: return createTransportRelationshipLabelValue();
case LabelsPackage.PHYSICAL_RELATIONSHIP_LABEL_VALUE: return createPhysicalRelationshipLabelValue();
case LabelsPackage.ROAD_TRANSPORT_RELATIONSHIP_LABEL: return createRoadTransportRelationshipLabel();
case LabelsPackage.ROAD_TRANSPORT_RELATIONSHIP_LABEL_VALUE: return createRoadTransportRelationshipLabelValue();
case LabelsPackage.EARTH_SCIENCE_LABEL: return createEarthScienceLabel();
case LabelsPackage.EARTH_SCIENCE_LABEL_VALUE: return createEarthScienceLabelValue();
case LabelsPackage.PARENT_LABEL: return createParentLabel();
case LabelsPackage.PARENT_LABEL_VALUE: return createParentLabelValue();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
Ich erhalte in Eclipse einen "Duplikat-Fehler" für den obigen Code. Eclipse unterstreicht die Zeilen "AREA_LABEL", "PARENT_LABEL" und "PARENT_LABEL_VALUE" als Duplikate, obwohl sie unterschiedlich zu sein scheinen. Ich vermute, dass dies ein Syntaxfehler ist, bin mir aber nicht sicher. Lassen Sie mich wissen, ob Sie anderen Code / Klassen benötigen. Vielen Dank.