From 4497bb5be4791e4766008c85784ceda247f0dac6 Mon Sep 17 00:00:00 2001 From: khussey Date: Fri, 21 Jan 2011 01:17:37 +0000 Subject: [323181] Regenerating based on changes in EMF for bug 287249. --- plugins/org.eclipse.uml2.uml/META-INF/MANIFEST.MF | 4 +- .../src/org/eclipse/uml2/uml/util/UMLSwitch.java | 43 ++++++++-------------- 2 files changed, 17 insertions(+), 30 deletions(-) (limited to 'plugins') diff --git a/plugins/org.eclipse.uml2.uml/META-INF/MANIFEST.MF b/plugins/org.eclipse.uml2.uml/META-INF/MANIFEST.MF index 3ac33fd0..46b86e4b 100644 --- a/plugins/org.eclipse.uml2.uml/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.uml2.uml/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.uml2.uml; singleton:=true -Bundle-Version: 3.1.100.qualifier +Bundle-Version: 3.2.0.qualifier Bundle-ClassPath: . Bundle-Activator: org.eclipse.uml2.uml.UMLPlugin$Implementation Bundle-Vendor: %providerName @@ -15,7 +15,7 @@ Export-Package: org.eclipse.uml2.uml, org.eclipse.uml2.uml.resource, org.eclipse.uml2.uml.util Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)", - org.eclipse.emf.ecore;bundle-version="[2.5.0,3.0.0)";visibility:=reexport, + org.eclipse.emf.ecore;bundle-version="[2.7.0,3.0.0)";visibility:=reexport, org.eclipse.emf.ecore.xmi;bundle-version="[2.5.0,3.0.0)";visibility:=reexport, org.eclipse.uml2.common;bundle-version="[1.5.0,2.0.0)";visibility:=reexport, org.eclipse.emf.mapping.ecore2xml;bundle-version="[2.5.0,3.0.0)" diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLSwitch.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLSwitch.java index 563be13c..5dac305a 100644 --- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLSwitch.java +++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLSwitch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2009 IBM Corporation, Embarcadero Technologies, and others. + * Copyright (c) 2005, 2010 IBM Corporation, Embarcadero Technologies, 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 @@ -8,17 +8,17 @@ * Contributors: * IBM - initial API and implementation * Kenn Hussey (Embarcadero Technologies) - 205188 + * Kenn Hussey - 323181 * - * $Id: UMLSwitch.java,v 1.19 2009/02/27 18:37:53 jbruck Exp $ + * $Id: UMLSwitch.java,v 1.20 2011/01/21 01:17:37 khussey Exp $ */ package org.eclipse.uml2.uml.util; -import java.util.List; - -import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EModelElement; import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.util.Switch; import org.eclipse.uml2.uml.Abstraction; import org.eclipse.uml2.uml.AcceptCallAction; import org.eclipse.uml2.uml.AcceptEventAction; @@ -279,7 +279,8 @@ import org.eclipse.uml2.uml.WriteVariableAction; * @see org.eclipse.uml2.uml.UMLPackage * @generated */ -public class UMLSwitch { +public class UMLSwitch + extends Switch { /** * The cached model package @@ -302,32 +303,16 @@ public class UMLSwitch { } /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * Checks whether this is a switch for the given package. * * - * @return the first non-null result returned by a caseXXX call. + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. * @generated */ - public T doSwitch(EObject theEObject) { - return doSwitch(theEObject.eClass(), theEObject); - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - protected T doSwitch(EClass theEClass, EObject theEObject) { - if (theEClass.eContainer() == modelPackage) { - return doSwitch(theEClass.getClassifierID(), theEObject); - } else { - List eSuperTypes = theEClass.getESuperTypes(); - return eSuperTypes.isEmpty() - ? defaultCase(theEObject) - : doSwitch(eSuperTypes.get(0), theEObject); - } + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; } /** @@ -337,6 +322,7 @@ public class UMLSwitch { * @return the first non-null result returned by a caseXXX call. * @generated */ + @Override protected T doSwitch(int classifierID, EObject theEObject) { switch (classifierID) { case UMLPackage.COMMENT : { @@ -9232,6 +9218,7 @@ public class UMLSwitch { * @see #doSwitch(org.eclipse.emf.ecore.EObject) * @generated */ + @Override public T defaultCase(EObject object) { return null; } -- cgit v1.2.3