|
From: jistrawn <jis...@us...> - 2006-11-14 05:27:49
|
Update of /cvsroot/modelwizard/source/Chameleon Plugin/src/net/sourceforge/modelWizard/chameleon/exporters In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22491/src/net/sourceforge/modelWizard/chameleon/exporters Modified Files: SubModelGenerator.java Log Message: Added Class list check for Generalizations Index: SubModelGenerator.java =================================================================== RCS file: /cvsroot/modelwizard/source/Chameleon Plugin/src/net/sourceforge/modelWizard/chameleon/exporters/SubModelGenerator.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** SubModelGenerator.java 3 Nov 2006 18:16:05 -0000 1.11 --- SubModelGenerator.java 14 Nov 2006 05:27:45 -0000 1.12 *************** *** 48,51 **** --- 48,52 ---- import org.eclipse.uml2.DataType; import org.eclipse.uml2.Enumeration; + import org.eclipse.uml2.Generalization; import org.eclipse.uml2.Implementation; import org.eclipse.uml2.Interface; *************** *** 116,121 **** EObject eObject; EObject next = (EObject) i.next(); ! if (next instanceof Implementation) { ! if (!isInterfaceInSubModel((Implementation) next)) { continue; } --- 117,122 ---- EObject eObject; EObject next = (EObject) i.next(); ! if (next instanceof Implementation || next instanceof Generalization) { ! if (!isInterfaceInSubModel(next)) { continue; } *************** *** 166,172 **** } ! private boolean isInterfaceInSubModel(Implementation theElement) { ! if (classList.contains(theElement.getRealizingClassifier().getName())) { ! return true; } return false; --- 167,180 ---- } ! private boolean isInterfaceInSubModel(EObject theElement) { ! ! if (theElement instanceof Implementation) { ! if (classList.contains(((Implementation) theElement).getRealizingClassifier().getName())) { ! return true; ! } ! } else if (theElement instanceof Generalization) { ! if (classList.contains(((Generalization) theElement).getGeneral().getName())) { ! return true; ! } } return false; *************** *** 244,249 **** for (Iterator p = model.getRealModel().getPackageImports().iterator(); p.hasNext();) { PackageImport pi = (PackageImport) p.next(); ! if (!pi.getImportedPackage().eIsProxy() ! && !pList.contains(pi.getImportedPackage().eResource().getURI().toString())) { EObject o = copier.copy(pi); newModel.getPackageImports().add(o); --- 252,256 ---- for (Iterator p = model.getRealModel().getPackageImports().iterator(); p.hasNext();) { PackageImport pi = (PackageImport) p.next(); ! if (!pi.getImportedPackage().eIsProxy() && !pList.contains(pi.getImportedPackage().eResource().getURI().toString())) { EObject o = copier.copy(pi); newModel.getPackageImports().add(o); *************** *** 452,462 **** if (p.getAssociation() != null) { ! ! // remove the copying of any abstract associations (including dependencies, here...) Association assoc = p.getAssociation(); ! if(assoc.isAbstract()) { continue; } ! addDependencies(rqdElements, (Classifier) assoc, false); } --- 459,470 ---- if (p.getAssociation() != null) { ! ! // remove the copying of any abstract associations ! // (including dependencies, here...) Association assoc = p.getAssociation(); ! if (assoc.isAbstract()) { continue; } ! addDependencies(rqdElements, (Classifier) assoc, false); } |