// Obtain or create and register interdependencies
BpmnDiPackageImpl theBpmnDiPackage = (BpmnDiPackageImpl) (EPackage.Registry.INSTANCE
.getEPackage(BpmnDiPackage.eNS_URI) instanceof BpmnDiPackageImpl ? EPackage.Registry.INSTANCE
.getEPackage(BpmnDiPackage.eNS_URI) : BpmnDiPackage.eINSTANCE);
DiPackageImpl theDiPackage = (DiPackageImpl) (EPackage.Registry.INSTANCE
.getEPackage(DiPackage.eNS_URI) instanceof DiPackageImpl ? EPackage.Registry.INSTANCE
.getEPackage(DiPackage.eNS_URI) : DiPackage.eINSTANCE);
DcPackageImpl theDcPackage = (DcPackageImpl) (EPackage.Registry.INSTANCE
.getEPackage(DcPackage.eNS_URI) instanceof DcPackageImpl ? EPackage.Registry.INSTANCE
.getEPackage(DcPackage.eNS_URI) : DcPackage.eINSTANCE);
// Load packages
theBpmn2Package.loadPackage();
// Create package meta-data objects
theBpmnDiPackage.createPackageContents();
theDiPackage.createPackageContents();
theDcPackage.createPackageContents();
// Initialize created meta-data
theBpmnDiPackage.initializePackageContents();
theDiPackage.initializePackageContents();
theDcPackage.initializePackageContents();
// Fix loaded packages
theBpmn2Package.fixPackageContents();