diff --git a/.metadata/.log b/.metadata/.log index c22b8a3..8d78f21 100644 --- a/.metadata/.log +++ b/.metadata/.log @@ -1577,3 +1577,686 @@ java.lang.InterruptedException at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:207) at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:220) at java.base/java.lang.Thread.run(Thread.java:829) +!SESSION 2021-10-08 13:57:43.131 ----------------------------------------------- +eclipse.buildId=4.17.0.I20200902-1800 +java.version=11.0.11 +java.vendor=Ubuntu +BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=fr_FR +Framework arguments: -product org.eclipse.epp.package.modeling.product +Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.modeling.product + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:17:45.320 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:18:25.525 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:18:59.947 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:21:02.450 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.emf.cdo.explorer 4 0 2021-10-08 14:21:06.114 +!MESSAGE InterruptedException +!STACK 0 +java.lang.InterruptedException + at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1343) + at java.base/java.util.concurrent.Semaphore.acquire(Semaphore.java:318) + at org.eclipse.net4j.util.lifecycle.Lifecycle.lock(Lifecycle.java:312) + at org.eclipse.net4j.util.lifecycle.Lifecycle.internalDeactivate(Lifecycle.java:118) + at org.eclipse.net4j.util.lifecycle.ShareableLifecycle.internalDeactivate(ShareableLifecycle.java:52) + at org.eclipse.net4j.util.lifecycle.Lifecycle.deactivate(Lifecycle.java:170) + at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:235) + at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:225) + at org.eclipse.emf.cdo.internal.explorer.bundle.OM.disposeManagers(OM.java:83) + at org.eclipse.emf.cdo.internal.explorer.bundle.OM$Activator.doStop(OM.java:136) + at org.eclipse.net4j.util.om.OSGiActivator.stop(OSGiActivator.java:92) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:871) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1) + at java.base/java.security.AccessController.doPrivileged(Native Method) + at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:863) + at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:1025) + at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:370) + at org.eclipse.osgi.container.Module.doStop(Module.java:660) + at org.eclipse.osgi.container.Module.stop(Module.java:521) + at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1886) + at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1761) + at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:275) + at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:202) + at org.eclipse.osgi.container.Module.doStop(Module.java:660) + at org.eclipse.osgi.container.Module.stop(Module.java:521) + at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:207) + at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:220) + at java.base/java.lang.Thread.run(Thread.java:829) +!SESSION 2021-10-08 14:21:08.637 ----------------------------------------------- +eclipse.buildId=4.17.0.I20200902-1800 +java.version=11.0.11 +java.vendor=Ubuntu +BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=fr_FR +Framework arguments: -product org.eclipse.epp.package.modeling.product +Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.modeling.product + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:21:43.972 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:36:10.058 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:37:09.208 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:39:50.649 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:41:04.669 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:41:59.884 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:43:25.096 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:43:48.122 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:45:07.339 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:46:01.803 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.emf.cdo.explorer 4 0 2021-10-08 14:46:19.808 +!MESSAGE InterruptedException +!STACK 0 +java.lang.InterruptedException + at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1343) + at java.base/java.util.concurrent.Semaphore.acquire(Semaphore.java:318) + at org.eclipse.net4j.util.lifecycle.Lifecycle.lock(Lifecycle.java:312) + at org.eclipse.net4j.util.lifecycle.Lifecycle.internalDeactivate(Lifecycle.java:118) + at org.eclipse.net4j.util.lifecycle.ShareableLifecycle.internalDeactivate(ShareableLifecycle.java:52) + at org.eclipse.net4j.util.lifecycle.Lifecycle.deactivate(Lifecycle.java:170) + at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:235) + at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:225) + at org.eclipse.emf.cdo.internal.explorer.bundle.OM.disposeManagers(OM.java:83) + at org.eclipse.emf.cdo.internal.explorer.bundle.OM$Activator.doStop(OM.java:136) + at org.eclipse.net4j.util.om.OSGiActivator.stop(OSGiActivator.java:92) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:871) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1) + at java.base/java.security.AccessController.doPrivileged(Native Method) + at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:863) + at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:1025) + at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:370) + at org.eclipse.osgi.container.Module.doStop(Module.java:660) + at org.eclipse.osgi.container.Module.stop(Module.java:521) + at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1886) + at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1761) + at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:275) + at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:202) + at org.eclipse.osgi.container.Module.doStop(Module.java:660) + at org.eclipse.osgi.container.Module.stop(Module.java:521) + at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:207) + at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:220) + at java.base/java.lang.Thread.run(Thread.java:829) +!SESSION 2021-10-08 14:46:25.149 ----------------------------------------------- +eclipse.buildId=4.17.0.I20200902-1800 +java.version=11.0.11 +java.vendor=Ubuntu +BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=fr_FR +Framework arguments: -product org.eclipse.epp.package.modeling.product --clean +Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.modeling.product --clean + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:46:52.625 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:50:09.004 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:52:56.839 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.emf.cdo.explorer 4 0 2021-10-08 14:53:20.011 +!MESSAGE InterruptedException +!STACK 0 +java.lang.InterruptedException + at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1343) + at java.base/java.util.concurrent.Semaphore.acquire(Semaphore.java:318) + at org.eclipse.net4j.util.lifecycle.Lifecycle.lock(Lifecycle.java:312) + at org.eclipse.net4j.util.lifecycle.Lifecycle.internalDeactivate(Lifecycle.java:118) + at org.eclipse.net4j.util.lifecycle.ShareableLifecycle.internalDeactivate(ShareableLifecycle.java:52) + at org.eclipse.net4j.util.lifecycle.Lifecycle.deactivate(Lifecycle.java:170) + at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:235) + at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:225) + at org.eclipse.emf.cdo.internal.explorer.bundle.OM.disposeManagers(OM.java:83) + at org.eclipse.emf.cdo.internal.explorer.bundle.OM$Activator.doStop(OM.java:136) + at org.eclipse.net4j.util.om.OSGiActivator.stop(OSGiActivator.java:92) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:871) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1) + at java.base/java.security.AccessController.doPrivileged(Native Method) + at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:863) + at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:1025) + at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:370) + at org.eclipse.osgi.container.Module.doStop(Module.java:660) + at org.eclipse.osgi.container.Module.stop(Module.java:521) + at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1886) + at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1761) + at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:275) + at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:202) + at org.eclipse.osgi.container.Module.doStop(Module.java:660) + at org.eclipse.osgi.container.Module.stop(Module.java:521) + at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:207) + at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:220) + at java.base/java.lang.Thread.run(Thread.java:829) +!SESSION 2021-10-08 14:53:30.253 ----------------------------------------------- +eclipse.buildId=4.17.0.I20200902-1800 +java.version=11.0.11 +java.vendor=Ubuntu +BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=fr_FR +Framework arguments: -product org.eclipse.epp.package.modeling.product +Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.modeling.product -clean + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:54:16.388 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 14:56:03.107 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.core.jobs 4 2 2021-10-08 15:03:25.408 +!MESSAGE An internal error occurred during: "Deferred Load OCL Document". +!STACK 0 +java.lang.IllegalStateException + at org.eclipse.ocl.pivot.utilities.ClassUtil.nonNullState(ClassUtil.java:282) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.getPlatformPluginURI(StandaloneProjectMap.java:1629) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceDescriptor.configureResourceSetURIResourceMap(StandaloneProjectMap.java:1597) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$AbstractResourceLoadStatus.configureResourceSetURIResourceMap(StandaloneProjectMap.java:845) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap$LoadFirstStrategy.useGeneratedResource(StandaloneProjectMap.java:734) + at org.eclipse.ocl.pivot.internal.resource.StandaloneProjectMap.useGeneratedResource(StandaloneProjectMap.java:3128) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.addExternal2AS(AbstractEnvironmentFactory.java:202) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.(Ecore2AS.java:243) + at org.eclipse.ocl.pivot.internal.ecore.es2as.Ecore2AS.getAdapter(Ecore2AS.java:90) + at org.eclipse.ocl.pivot.internal.ecore.EcoreASResourceFactory.importFromResource(EcoreASResourceFactory.java:90) + at org.eclipse.ocl.pivot.utilities.AbstractEnvironmentFactory.loadResource(AbstractEnvironmentFactory.java:831) + at org.eclipse.ocl.xtext.completeocl.utilities.CompleteOCLLoader.loadMetamodels(CompleteOCLLoader.java:100) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.processResources(LoadCompleteOCLResourceHandler.java:178) + at org.eclipse.ocl.xtext.completeocl.ui.commands.LoadCompleteOCLResourceHandler$ResourceDialog$DeferredLoadDocumentJob.run(LoadCompleteOCLResourceHandler.java:151) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.emf.cdo.explorer 4 0 2021-10-08 15:20:12.607 +!MESSAGE InterruptedException +!STACK 0 +java.lang.InterruptedException + at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1343) + at java.base/java.util.concurrent.Semaphore.acquire(Semaphore.java:318) + at org.eclipse.net4j.util.lifecycle.Lifecycle.lock(Lifecycle.java:312) + at org.eclipse.net4j.util.lifecycle.Lifecycle.internalDeactivate(Lifecycle.java:118) + at org.eclipse.net4j.util.lifecycle.ShareableLifecycle.internalDeactivate(ShareableLifecycle.java:52) + at org.eclipse.net4j.util.lifecycle.Lifecycle.deactivate(Lifecycle.java:170) + at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:235) + at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:225) + at org.eclipse.emf.cdo.internal.explorer.bundle.OM.disposeManagers(OM.java:83) + at org.eclipse.emf.cdo.internal.explorer.bundle.OM$Activator.doStop(OM.java:136) + at org.eclipse.net4j.util.om.OSGiActivator.stop(OSGiActivator.java:92) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:871) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1) + at java.base/java.security.AccessController.doPrivileged(Native Method) + at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:863) + at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:1025) + at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:370) + at org.eclipse.osgi.container.Module.doStop(Module.java:660) + at org.eclipse.osgi.container.Module.stop(Module.java:521) + at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1886) + at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1761) + at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:275) + at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:202) + at org.eclipse.osgi.container.Module.doStop(Module.java:660) + at org.eclipse.osgi.container.Module.stop(Module.java:521) + at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:207) + at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:220) + at java.base/java.lang.Thread.run(Thread.java:829) +!SESSION 2021-10-08 15:20:14.552 ----------------------------------------------- +eclipse.buildId=4.17.0.I20200902-1800 +java.version=11.0.11 +java.vendor=Ubuntu +BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=fr_FR +Framework arguments: -product org.eclipse.epp.package.modeling.product +Command-line arguments: -data file:/home/lfainsin/miniproj_idm/ -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.modeling.product -clean + +!ENTRY org.eclipse.ui.navigator 4 0 2021-10-08 15:26:02.671 +!MESSAGE Cannot find navigator content extension (using triggerPoints) for object "" parent path: "P/fr.n7.petriNet.exemple". Check that you have an expression for this object in a navigatorContent triggerPoints or enablement. + +!ENTRY org.eclipse.emf.cdo.explorer 4 0 2021-10-08 15:37:39.853 +!MESSAGE InterruptedException +!STACK 0 +java.lang.InterruptedException + at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1343) + at java.base/java.util.concurrent.Semaphore.acquire(Semaphore.java:318) + at org.eclipse.net4j.util.lifecycle.Lifecycle.lock(Lifecycle.java:312) + at org.eclipse.net4j.util.lifecycle.Lifecycle.internalDeactivate(Lifecycle.java:118) + at org.eclipse.net4j.util.lifecycle.ShareableLifecycle.internalDeactivate(ShareableLifecycle.java:52) + at org.eclipse.net4j.util.lifecycle.Lifecycle.deactivate(Lifecycle.java:170) + at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:235) + at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:225) + at org.eclipse.emf.cdo.internal.explorer.bundle.OM.disposeManagers(OM.java:83) + at org.eclipse.emf.cdo.internal.explorer.bundle.OM$Activator.doStop(OM.java:136) + at org.eclipse.net4j.util.om.OSGiActivator.stop(OSGiActivator.java:92) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:871) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1) + at java.base/java.security.AccessController.doPrivileged(Native Method) + at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:863) + at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:1025) + at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:370) + at org.eclipse.osgi.container.Module.doStop(Module.java:660) + at org.eclipse.osgi.container.Module.stop(Module.java:521) + at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1886) + at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1761) + at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:275) + at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:202) + at org.eclipse.osgi.container.Module.doStop(Module.java:660) + at org.eclipse.osgi.container.Module.stop(Module.java:521) + at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:207) + at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:220) + at java.base/java.lang.Thread.run(Thread.java:829) +!SESSION 2021-10-08 15:37:41.710 ----------------------------------------------- +eclipse.buildId=4.17.0.I20200902-1800 +java.version=11.0.11 +java.vendor=Ubuntu +BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=fr_FR +Framework arguments: -product org.eclipse.epp.package.modeling.product +Command-line arguments: -data file:/home/lfainsin/miniproj_idm/ -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.modeling.product -clean + +!ENTRY org.eclipse.emf.cdo.explorer 4 0 2021-10-08 15:39:37.481 +!MESSAGE InterruptedException +!STACK 0 +java.lang.InterruptedException + at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1343) + at java.base/java.util.concurrent.Semaphore.acquire(Semaphore.java:318) + at org.eclipse.net4j.util.lifecycle.Lifecycle.lock(Lifecycle.java:312) + at org.eclipse.net4j.util.lifecycle.Lifecycle.internalDeactivate(Lifecycle.java:118) + at org.eclipse.net4j.util.lifecycle.ShareableLifecycle.internalDeactivate(ShareableLifecycle.java:52) + at org.eclipse.net4j.util.lifecycle.Lifecycle.deactivate(Lifecycle.java:170) + at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:235) + at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:225) + at org.eclipse.emf.cdo.internal.explorer.bundle.OM.disposeManagers(OM.java:83) + at org.eclipse.emf.cdo.internal.explorer.bundle.OM$Activator.doStop(OM.java:136) + at org.eclipse.net4j.util.om.OSGiActivator.stop(OSGiActivator.java:92) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:871) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1) + at java.base/java.security.AccessController.doPrivileged(Native Method) + at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:863) + at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:1025) + at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:370) + at org.eclipse.osgi.container.Module.doStop(Module.java:660) + at org.eclipse.osgi.container.Module.stop(Module.java:521) + at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1886) + at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1761) + at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:275) + at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:202) + at org.eclipse.osgi.container.Module.doStop(Module.java:660) + at org.eclipse.osgi.container.Module.stop(Module.java:521) + at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:207) + at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:220) + at java.base/java.lang.Thread.run(Thread.java:829) +!SESSION 2021-10-08 15:39:38.875 ----------------------------------------------- +eclipse.buildId=4.17.0.I20200902-1800 +java.version=11.0.11 +java.vendor=Ubuntu +BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=fr_FR +Framework arguments: -product org.eclipse.epp.package.modeling.product +Command-line arguments: -data file:/home/lfainsin/miniproj_idm/ -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.modeling.product -clean + +!ENTRY org.eclipse.emf.cdo.explorer 4 0 2021-10-08 15:46:29.199 +!MESSAGE InterruptedException +!STACK 0 +java.lang.InterruptedException + at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1343) + at java.base/java.util.concurrent.Semaphore.acquire(Semaphore.java:318) + at org.eclipse.net4j.util.lifecycle.Lifecycle.lock(Lifecycle.java:312) + at org.eclipse.net4j.util.lifecycle.Lifecycle.internalDeactivate(Lifecycle.java:118) + at org.eclipse.net4j.util.lifecycle.ShareableLifecycle.internalDeactivate(ShareableLifecycle.java:52) + at org.eclipse.net4j.util.lifecycle.Lifecycle.deactivate(Lifecycle.java:170) + at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:235) + at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:225) + at org.eclipse.emf.cdo.internal.explorer.bundle.OM.disposeManagers(OM.java:83) + at org.eclipse.emf.cdo.internal.explorer.bundle.OM$Activator.doStop(OM.java:136) + at org.eclipse.net4j.util.om.OSGiActivator.stop(OSGiActivator.java:92) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:871) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1) + at java.base/java.security.AccessController.doPrivileged(Native Method) + at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:863) + at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:1025) + at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:370) + at org.eclipse.osgi.container.Module.doStop(Module.java:660) + at org.eclipse.osgi.container.Module.stop(Module.java:521) + at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1886) + at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1761) + at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:275) + at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:202) + at org.eclipse.osgi.container.Module.doStop(Module.java:660) + at org.eclipse.osgi.container.Module.stop(Module.java:521) + at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:207) + at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:220) + at java.base/java.lang.Thread.run(Thread.java:829) diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/0/808608179c22001c10c68e4a8bb21dd1 b/.metadata/.plugins/org.eclipse.core.resources/.history/0/808608179c22001c10c68e4a8bb21dd1 deleted file mode 100644 index 8586d94..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/0/808608179c22001c10c68e4a8bb21dd1 +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/11/e090c9073928001c1310d5f213a964e6 b/.metadata/.plugins/org.eclipse.core.resources/.history/11/e090c9073928001c1310d5f213a964e6 new file mode 100644 index 0000000..6b570f8 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/11/e090c9073928001c1310d5f213a964e6 @@ -0,0 +1,85 @@ +package simplepdl.manip; + +import java.io.IOException; +import java.util.Collections; +import java.util.Map; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; + +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlFactory; +import simplepdl.SimplepdlPackage; + +public class SimplePDLCreator { + + public static void main(String[] args) { + + // Charger le package SimplePDL afin de l'enregistrer dans le registre d'Eclipse. + SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE; + + // Enregistrer l'extension ".xmi" comme devant être ouverte à + // l'aide d'un objet "XMIResourceFactoryImpl" + Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE; + Map m = reg.getExtensionToFactoryMap(); + m.put("xmi", new XMIResourceFactoryImpl()); + + // Créer un objet resourceSetImpl qui contiendra une ressource EMF (le modèle) + ResourceSet resSet = new ResourceSetImpl(); + + // Définir la ressource (le modèle) + URI modelURI = URI.createURI("models/SimplePDLCreator_Created_Process.xmi"); + Resource resource = resSet.createResource(modelURI); + + // La fabrique pour fabriquer les éléments de SimplePDL + SimplepdlFactory myFactory = SimplepdlFactory.eINSTANCE; + + // Créer un élément Process + Process process = myFactory.createProcess(); + process.setName("Mon premier processus"); + + // Ajouter le Process dans le modèle + resource.getContents().add(process); + + // Ajouter deux WorkDefinitions + WorkDefinition wd1 = myFactory.createWorkDefinition(); + wd1.setName("Ma première WorkDefinition, quelle émotion"); + + WorkDefinition wd2 = myFactory.createWorkDefinition(); + wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); + + process.getProcessElements().add(wd1); + process.getProcessElements().add(wd2); + + // Ajouter une WorkSequence entre les deux WorkDefinitions + WorkSequence seq = myFactory.createWorkSequence(); + seq.setPredecessor(wd1); + seq.setSuccessor(wd2); + seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); + + process.getProcessElements().add(seq); + + // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions + WorkSequence seq2 = myFactory.createWorkSequence(); + seq2.setPredecessor(wd1); + seq2.setSuccessor(wd2); + seq2.setLinkType(WorkSequenceType.START_TO_START); + + process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/14/50bca4f43428001c13dca9fa1eba29d5 b/.metadata/.plugins/org.eclipse.core.resources/.history/14/50bca4f43428001c13dca9fa1eba29d5 new file mode 100644 index 0000000..e69de29 diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/19/f01f05339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/19/f01f05339822001c17faa9b6b0561c0f deleted file mode 100644 index a43c5a3..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/19/f01f05339822001c17faa9b6b0561c0f +++ /dev/null @@ -1,252 +0,0 @@ -/** - */ -package simplepdl; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.eclipse.emf.common.util.Enumerator; - -/** - * - * A representation of the literals of the enumeration 'Work Sequence Type', - * and utility methods for working with them. - * - * @see simplepdl.SimplepdlPackage#getWorkSequenceType() - * @model - * @generated - */ -public enum WorkSequenceType implements Enumerator { - /** - * The 'Start To Start' literal object. - * - * - * @see #START_TO_START_VALUE - * @generated - * @ordered - */ - START_TO_START(0, "startToStart", "startToStart"), - - /** - * The 'Finish To Start' literal object. - * - * - * @see #FINISH_TO_START_VALUE - * @generated - * @ordered - */ - FINISH_TO_START(1, "finishToStart", "finishToStart"), - - /** - * The 'Start To Finish' literal object. - * - * - * @see #START_TO_FINISH_VALUE - * @generated - * @ordered - */ - START_TO_FINISH(2, "startToFinish", "startToFinish"), - - /** - * The 'Finish To Finish' literal object. - * - * - * @see #FINISH_TO_FINISH_VALUE - * @generated - * @ordered - */ - FINISH_TO_FINISH(3, "finishToFinish", "finishToFinish"); - - /** - * The 'Start To Start' literal value. - * - * - * @see #START_TO_START - * @model name="startToStart" - * @generated - * @ordered - */ - public static final int START_TO_START_VALUE = 0; - - /** - * The 'Finish To Start' literal value. - * - * - * @see #FINISH_TO_START - * @model name="finishToStart" - * @generated - * @ordered - */ - public static final int FINISH_TO_START_VALUE = 1; - - /** - * The 'Start To Finish' literal value. - * - * - * @see #START_TO_FINISH - * @model name="startToFinish" - * @generated - * @ordered - */ - public static final int START_TO_FINISH_VALUE = 2; - - /** - * The 'Finish To Finish' literal value. - * - * - * @see #FINISH_TO_FINISH - * @model name="finishToFinish" - * @generated - * @ordered - */ - public static final int FINISH_TO_FINISH_VALUE = 3; - - /** - * An array of all the 'Work Sequence Type' enumerators. - * - * - * @generated - */ - private static final WorkSequenceType[] VALUES_ARRAY = - new WorkSequenceType[] { - START_TO_START, - FINISH_TO_START, - START_TO_FINISH, - FINISH_TO_FINISH, - }; - - /** - * A public read-only list of all the 'Work Sequence Type' enumerators. - * - * - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the 'Work Sequence Type' literal with the specified literal value. - * - * - * @param literal the literal. - * @return the matching enumerator or null. - * @generated - */ - public static WorkSequenceType get(String literal) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - WorkSequenceType result = VALUES_ARRAY[i]; - if (result.toString().equals(literal)) { - return result; - } - } - return null; - } - - /** - * Returns the 'Work Sequence Type' literal with the specified name. - * - * - * @param name the name. - * @return the matching enumerator or null. - * @generated - */ - public static WorkSequenceType getByName(String name) { - for (int i = 0; i < VALUES_ARRAY.length; ++i) { - WorkSequenceType result = VALUES_ARRAY[i]; - if (result.getName().equals(name)) { - return result; - } - } - return null; - } - - /** - * Returns the 'Work Sequence Type' literal with the specified integer value. - * - * - * @param value the integer value. - * @return the matching enumerator or null. - * @generated - */ - public static WorkSequenceType get(int value) { - switch (value) { - case START_TO_START_VALUE: return START_TO_START; - case FINISH_TO_START_VALUE: return FINISH_TO_START; - case START_TO_FINISH_VALUE: return START_TO_FINISH; - case FINISH_TO_FINISH_VALUE: return FINISH_TO_FINISH; - } - return null; - } - - /** - * - * - * @generated - */ - private final int value; - - /** - * - * - * @generated - */ - private final String name; - - /** - * - * - * @generated - */ - private final String literal; - - /** - * Only this class can construct instances. - * - * - * @generated - */ - private WorkSequenceType(int value, String name, String literal) { - this.value = value; - this.name = name; - this.literal = literal; - } - - /** - * - * - * @generated - */ - public int getValue() { - return value; - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public String getLiteral() { - return literal; - } - - /** - * Returns the literal value of the enumerator, which is its string representation. - * - * - * @generated - */ - @Override - public String toString() { - return literal; - } - -} //WorkSequenceType diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1a/303cfad39b22001c10fba84a9f2208e9 b/.metadata/.plugins/org.eclipse.core.resources/.history/1a/303cfad39b22001c10fba84a9f2208e9 deleted file mode 100644 index 3ad0196..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/1a/303cfad39b22001c10fba84a9f2208e9 +++ /dev/null @@ -1,872 +0,0 @@ -/** - */ -package simplepdl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -/** - * - * The Package for the model. - * It contains accessors for the meta objects to represent - *
    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each operation of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * @see simplepdl.SimplepdlFactory - * @model kind="package" - * @generated - */ -public interface SimplepdlPackage extends EPackage { - /** - * The package name. - * - * - * @generated - */ - String eNAME = "simplepdl"; - - /** - * The package namespace URI. - * - * - * @generated - */ - String eNS_URI = "http://simplepdl"; - - /** - * The package namespace name. - * - * - * @generated - */ - String eNS_PREFIX = "simplepdl"; - - /** - * The singleton instance of the package. - * - * - * @generated - */ - SimplepdlPackage eINSTANCE = simplepdl.impl.SimplepdlPackageImpl.init(); - - /** - * The meta object id for the '{@link simplepdl.impl.ProcessElementImpl Process Element}' class. - * - * - * @see simplepdl.impl.ProcessElementImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getProcessElement() - * @generated - */ - int PROCESS_ELEMENT = 0; - - /** - * The number of structural features of the 'Process Element' class. - * - * - * @generated - * @ordered - */ - int PROCESS_ELEMENT_FEATURE_COUNT = 0; - - /** - * The number of operations of the 'Process Element' class. - * - * - * @generated - * @ordered - */ - int PROCESS_ELEMENT_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link simplepdl.impl.WorkDefinitionImpl Work Definition}' class. - * - * - * @see simplepdl.impl.WorkDefinitionImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getWorkDefinition() - * @generated - */ - int WORK_DEFINITION = 1; - - /** - * The feature id for the 'Links To Predecessors' reference list. - * - * - * @generated - * @ordered - */ - int WORK_DEFINITION__LINKS_TO_PREDECESSORS = PROCESS_ELEMENT_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Links To Successors' reference list. - * - * - * @generated - * @ordered - */ - int WORK_DEFINITION__LINKS_TO_SUCCESSORS = PROCESS_ELEMENT_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int WORK_DEFINITION__NAME = PROCESS_ELEMENT_FEATURE_COUNT + 2; - - /** - * The feature id for the 'Requests' reference list. - * - * - * @generated - * @ordered - */ - int WORK_DEFINITION__REQUESTS = PROCESS_ELEMENT_FEATURE_COUNT + 3; - - /** - * The number of structural features of the 'Work Definition' class. - * - * - * @generated - * @ordered - */ - int WORK_DEFINITION_FEATURE_COUNT = PROCESS_ELEMENT_FEATURE_COUNT + 4; - - /** - * The number of operations of the 'Work Definition' class. - * - * - * @generated - * @ordered - */ - int WORK_DEFINITION_OPERATION_COUNT = PROCESS_ELEMENT_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link simplepdl.impl.WorkSequenceImpl Work Sequence}' class. - * - * - * @see simplepdl.impl.WorkSequenceImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getWorkSequence() - * @generated - */ - int WORK_SEQUENCE = 2; - - /** - * The feature id for the 'Link Type' attribute. - * - * - * @generated - * @ordered - */ - int WORK_SEQUENCE__LINK_TYPE = PROCESS_ELEMENT_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Predecessor' reference. - * - * - * @generated - * @ordered - */ - int WORK_SEQUENCE__PREDECESSOR = PROCESS_ELEMENT_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Successor' reference. - * - * - * @generated - * @ordered - */ - int WORK_SEQUENCE__SUCCESSOR = PROCESS_ELEMENT_FEATURE_COUNT + 2; - - /** - * The number of structural features of the 'Work Sequence' class. - * - * - * @generated - * @ordered - */ - int WORK_SEQUENCE_FEATURE_COUNT = PROCESS_ELEMENT_FEATURE_COUNT + 3; - - /** - * The number of operations of the 'Work Sequence' class. - * - * - * @generated - * @ordered - */ - int WORK_SEQUENCE_OPERATION_COUNT = PROCESS_ELEMENT_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link simplepdl.impl.GuidanceImpl Guidance}' class. - * - * - * @see simplepdl.impl.GuidanceImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getGuidance() - * @generated - */ - int GUIDANCE = 3; - - /** - * The feature id for the 'Text' attribute. - * - * - * @generated - * @ordered - */ - int GUIDANCE__TEXT = PROCESS_ELEMENT_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Elements' reference list. - * - * - * @generated - * @ordered - */ - int GUIDANCE__ELEMENTS = PROCESS_ELEMENT_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Guidance' class. - * - * - * @generated - * @ordered - */ - int GUIDANCE_FEATURE_COUNT = PROCESS_ELEMENT_FEATURE_COUNT + 2; - - /** - * The number of operations of the 'Guidance' class. - * - * - * @generated - * @ordered - */ - int GUIDANCE_OPERATION_COUNT = PROCESS_ELEMENT_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link simplepdl.impl.ProcessImpl Process}' class. - * - * - * @see simplepdl.impl.ProcessImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getProcess() - * @generated - */ - int PROCESS = 4; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int PROCESS__NAME = 0; - - /** - * The feature id for the 'Process Elements' containment reference list. - * - * - * @generated - * @ordered - */ - int PROCESS__PROCESS_ELEMENTS = 1; - - /** - * The number of structural features of the 'Process' class. - * - * - * @generated - * @ordered - */ - int PROCESS_FEATURE_COUNT = 2; - - /** - * The number of operations of the 'Process' class. - * - * - * @generated - * @ordered - */ - int PROCESS_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link simplepdl.impl.RequestImpl Request}' class. - * - * - * @see simplepdl.impl.RequestImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getRequest() - * @generated - */ - int REQUEST = 5; - - /** - * The feature id for the 'Quantity' attribute. - * - * - * @generated - * @ordered - */ - int REQUEST__QUANTITY = 0; - - /** - * The feature id for the 'Target' reference. - * - * - * @generated - * @ordered - */ - int REQUEST__TARGET = 1; - - /** - * The number of structural features of the 'Request' class. - * - * - * @generated - * @ordered - */ - int REQUEST_FEATURE_COUNT = 2; - - /** - * The number of operations of the 'Request' class. - * - * - * @generated - * @ordered - */ - int REQUEST_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link simplepdl.impl.ResourceImpl Resource}' class. - * - * - * @see simplepdl.impl.ResourceImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getResource() - * @generated - */ - int RESOURCE = 6; - - /** - * The feature id for the 'Quantity' attribute. - * - * - * @generated - * @ordered - */ - int RESOURCE__QUANTITY = PROCESS_ELEMENT_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int RESOURCE__NAME = PROCESS_ELEMENT_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Resource' class. - * - * - * @generated - * @ordered - */ - int RESOURCE_FEATURE_COUNT = PROCESS_ELEMENT_FEATURE_COUNT + 2; - - /** - * The number of operations of the 'Resource' class. - * - * - * @generated - * @ordered - */ - int RESOURCE_OPERATION_COUNT = PROCESS_ELEMENT_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link simplepdl.WorkSequenceType Work Sequence Type}' enum. - * - * - * @see simplepdl.WorkSequenceType - * @see simplepdl.impl.SimplepdlPackageImpl#getWorkSequenceType() - * @generated - */ - int WORK_SEQUENCE_TYPE = 7; - - - /** - * Returns the meta object for class '{@link simplepdl.ProcessElement Process Element}'. - * - * - * @return the meta object for class 'Process Element'. - * @see simplepdl.ProcessElement - * @generated - */ - EClass getProcessElement(); - - /** - * Returns the meta object for class '{@link simplepdl.WorkDefinition Work Definition}'. - * - * - * @return the meta object for class 'Work Definition'. - * @see simplepdl.WorkDefinition - * @generated - */ - EClass getWorkDefinition(); - - /** - * Returns the meta object for the reference list '{@link simplepdl.WorkDefinition#getLinksToPredecessors Links To Predecessors}'. - * - * - * @return the meta object for the reference list 'Links To Predecessors'. - * @see simplepdl.WorkDefinition#getLinksToPredecessors() - * @see #getWorkDefinition() - * @generated - */ - EReference getWorkDefinition_LinksToPredecessors(); - - /** - * Returns the meta object for the reference list '{@link simplepdl.WorkDefinition#getLinksToSuccessors Links To Successors}'. - * - * - * @return the meta object for the reference list 'Links To Successors'. - * @see simplepdl.WorkDefinition#getLinksToSuccessors() - * @see #getWorkDefinition() - * @generated - */ - EReference getWorkDefinition_LinksToSuccessors(); - - /** - * Returns the meta object for the attribute '{@link simplepdl.WorkDefinition#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see simplepdl.WorkDefinition#getName() - * @see #getWorkDefinition() - * @generated - */ - EAttribute getWorkDefinition_Name(); - - /** - * Returns the meta object for the reference list '{@link simplepdl.WorkDefinition#getRequests Requests}'. - * - * - * @return the meta object for the reference list 'Requests'. - * @see simplepdl.WorkDefinition#getRequests() - * @see #getWorkDefinition() - * @generated - */ - EReference getWorkDefinition_Requests(); - - /** - * Returns the meta object for class '{@link simplepdl.WorkSequence Work Sequence}'. - * - * - * @return the meta object for class 'Work Sequence'. - * @see simplepdl.WorkSequence - * @generated - */ - EClass getWorkSequence(); - - /** - * Returns the meta object for the attribute '{@link simplepdl.WorkSequence#getLinkType Link Type}'. - * - * - * @return the meta object for the attribute 'Link Type'. - * @see simplepdl.WorkSequence#getLinkType() - * @see #getWorkSequence() - * @generated - */ - EAttribute getWorkSequence_LinkType(); - - /** - * Returns the meta object for the reference '{@link simplepdl.WorkSequence#getPredecessor Predecessor}'. - * - * - * @return the meta object for the reference 'Predecessor'. - * @see simplepdl.WorkSequence#getPredecessor() - * @see #getWorkSequence() - * @generated - */ - EReference getWorkSequence_Predecessor(); - - /** - * Returns the meta object for the reference '{@link simplepdl.WorkSequence#getSuccessor Successor}'. - * - * - * @return the meta object for the reference 'Successor'. - * @see simplepdl.WorkSequence#getSuccessor() - * @see #getWorkSequence() - * @generated - */ - EReference getWorkSequence_Successor(); - - /** - * Returns the meta object for class '{@link simplepdl.Guidance Guidance}'. - * - * - * @return the meta object for class 'Guidance'. - * @see simplepdl.Guidance - * @generated - */ - EClass getGuidance(); - - /** - * Returns the meta object for the attribute '{@link simplepdl.Guidance#getText Text}'. - * - * - * @return the meta object for the attribute 'Text'. - * @see simplepdl.Guidance#getText() - * @see #getGuidance() - * @generated - */ - EAttribute getGuidance_Text(); - - /** - * Returns the meta object for the reference list '{@link simplepdl.Guidance#getElements Elements}'. - * - * - * @return the meta object for the reference list 'Elements'. - * @see simplepdl.Guidance#getElements() - * @see #getGuidance() - * @generated - */ - EReference getGuidance_Elements(); - - /** - * Returns the meta object for class '{@link simplepdl.Process Process}'. - * - * - * @return the meta object for class 'Process'. - * @see simplepdl.Process - * @generated - */ - EClass getProcess(); - - /** - * Returns the meta object for the attribute '{@link simplepdl.Process#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see simplepdl.Process#getName() - * @see #getProcess() - * @generated - */ - EAttribute getProcess_Name(); - - /** - * Returns the meta object for the containment reference list '{@link simplepdl.Process#getProcessElements Process Elements}'. - * - * - * @return the meta object for the containment reference list 'Process Elements'. - * @see simplepdl.Process#getProcessElements() - * @see #getProcess() - * @generated - */ - EReference getProcess_ProcessElements(); - - /** - * Returns the meta object for class '{@link simplepdl.Request Request}'. - * - * - * @return the meta object for class 'Request'. - * @see simplepdl.Request - * @generated - */ - EClass getRequest(); - - /** - * Returns the meta object for the attribute '{@link simplepdl.Request#getQuantity Quantity}'. - * - * - * @return the meta object for the attribute 'Quantity'. - * @see simplepdl.Request#getQuantity() - * @see #getRequest() - * @generated - */ - EAttribute getRequest_Quantity(); - - /** - * Returns the meta object for the reference '{@link simplepdl.Request#getTarget Target}'. - * - * - * @return the meta object for the reference 'Target'. - * @see simplepdl.Request#getTarget() - * @see #getRequest() - * @generated - */ - EReference getRequest_Target(); - - /** - * Returns the meta object for class '{@link simplepdl.Resource Resource}'. - * - * - * @return the meta object for class 'Resource'. - * @see simplepdl.Resource - * @generated - */ - EClass getResource(); - - /** - * Returns the meta object for the attribute '{@link simplepdl.Resource#getQuantity Quantity}'. - * - * - * @return the meta object for the attribute 'Quantity'. - * @see simplepdl.Resource#getQuantity() - * @see #getResource() - * @generated - */ - EAttribute getResource_Quantity(); - - /** - * Returns the meta object for the attribute '{@link simplepdl.Resource#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see simplepdl.Resource#getName() - * @see #getResource() - * @generated - */ - EAttribute getResource_Name(); - - /** - * Returns the meta object for enum '{@link simplepdl.WorkSequenceType Work Sequence Type}'. - * - * - * @return the meta object for enum 'Work Sequence Type'. - * @see simplepdl.WorkSequenceType - * @generated - */ - EEnum getWorkSequenceType(); - - /** - * Returns the factory that creates the instances of the model. - * - * - * @return the factory that creates the instances of the model. - * @generated - */ - SimplepdlFactory getSimplepdlFactory(); - - /** - * - * Defines literals for the meta objects that represent - *
    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each operation of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * @generated - */ - interface Literals { - /** - * The meta object literal for the '{@link simplepdl.impl.ProcessElementImpl Process Element}' class. - * - * - * @see simplepdl.impl.ProcessElementImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getProcessElement() - * @generated - */ - EClass PROCESS_ELEMENT = eINSTANCE.getProcessElement(); - - /** - * The meta object literal for the '{@link simplepdl.impl.WorkDefinitionImpl Work Definition}' class. - * - * - * @see simplepdl.impl.WorkDefinitionImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getWorkDefinition() - * @generated - */ - EClass WORK_DEFINITION = eINSTANCE.getWorkDefinition(); - - /** - * The meta object literal for the 'Links To Predecessors' reference list feature. - * - * - * @generated - */ - EReference WORK_DEFINITION__LINKS_TO_PREDECESSORS = eINSTANCE.getWorkDefinition_LinksToPredecessors(); - - /** - * The meta object literal for the 'Links To Successors' reference list feature. - * - * - * @generated - */ - EReference WORK_DEFINITION__LINKS_TO_SUCCESSORS = eINSTANCE.getWorkDefinition_LinksToSuccessors(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute WORK_DEFINITION__NAME = eINSTANCE.getWorkDefinition_Name(); - - /** - * The meta object literal for the 'Requests' reference list feature. - * - * - * @generated - */ - EReference WORK_DEFINITION__REQUESTS = eINSTANCE.getWorkDefinition_Requests(); - - /** - * The meta object literal for the '{@link simplepdl.impl.WorkSequenceImpl Work Sequence}' class. - * - * - * @see simplepdl.impl.WorkSequenceImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getWorkSequence() - * @generated - */ - EClass WORK_SEQUENCE = eINSTANCE.getWorkSequence(); - - /** - * The meta object literal for the 'Link Type' attribute feature. - * - * - * @generated - */ - EAttribute WORK_SEQUENCE__LINK_TYPE = eINSTANCE.getWorkSequence_LinkType(); - - /** - * The meta object literal for the 'Predecessor' reference feature. - * - * - * @generated - */ - EReference WORK_SEQUENCE__PREDECESSOR = eINSTANCE.getWorkSequence_Predecessor(); - - /** - * The meta object literal for the 'Successor' reference feature. - * - * - * @generated - */ - EReference WORK_SEQUENCE__SUCCESSOR = eINSTANCE.getWorkSequence_Successor(); - - /** - * The meta object literal for the '{@link simplepdl.impl.GuidanceImpl Guidance}' class. - * - * - * @see simplepdl.impl.GuidanceImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getGuidance() - * @generated - */ - EClass GUIDANCE = eINSTANCE.getGuidance(); - - /** - * The meta object literal for the 'Text' attribute feature. - * - * - * @generated - */ - EAttribute GUIDANCE__TEXT = eINSTANCE.getGuidance_Text(); - - /** - * The meta object literal for the 'Elements' reference list feature. - * - * - * @generated - */ - EReference GUIDANCE__ELEMENTS = eINSTANCE.getGuidance_Elements(); - - /** - * The meta object literal for the '{@link simplepdl.impl.ProcessImpl Process}' class. - * - * - * @see simplepdl.impl.ProcessImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getProcess() - * @generated - */ - EClass PROCESS = eINSTANCE.getProcess(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute PROCESS__NAME = eINSTANCE.getProcess_Name(); - - /** - * The meta object literal for the 'Process Elements' containment reference list feature. - * - * - * @generated - */ - EReference PROCESS__PROCESS_ELEMENTS = eINSTANCE.getProcess_ProcessElements(); - - /** - * The meta object literal for the '{@link simplepdl.impl.RequestImpl Request}' class. - * - * - * @see simplepdl.impl.RequestImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getRequest() - * @generated - */ - EClass REQUEST = eINSTANCE.getRequest(); - - /** - * The meta object literal for the 'Quantity' attribute feature. - * - * - * @generated - */ - EAttribute REQUEST__QUANTITY = eINSTANCE.getRequest_Quantity(); - - /** - * The meta object literal for the 'Target' reference feature. - * - * - * @generated - */ - EReference REQUEST__TARGET = eINSTANCE.getRequest_Target(); - - /** - * The meta object literal for the '{@link simplepdl.impl.ResourceImpl Resource}' class. - * - * - * @see simplepdl.impl.ResourceImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getResource() - * @generated - */ - EClass RESOURCE = eINSTANCE.getResource(); - - /** - * The meta object literal for the 'Quantity' attribute feature. - * - * - * @generated - */ - EAttribute RESOURCE__QUANTITY = eINSTANCE.getResource_Quantity(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute RESOURCE__NAME = eINSTANCE.getResource_Name(); - - /** - * The meta object literal for the '{@link simplepdl.WorkSequenceType Work Sequence Type}' enum. - * - * - * @see simplepdl.WorkSequenceType - * @see simplepdl.impl.SimplepdlPackageImpl#getWorkSequenceType() - * @generated - */ - EEnum WORK_SEQUENCE_TYPE = eINSTANCE.getWorkSequenceType(); - - } - -} //SimplepdlPackage diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1e/90ca75d59922001c1dcfb9656cd69315 b/.metadata/.plugins/org.eclipse.core.resources/.history/1e/90ca75d59922001c1dcfb9656cd69315 deleted file mode 100644 index 234554c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/1e/90ca75d59922001c1dcfb9656cd69315 +++ /dev/null @@ -1,185 +0,0 @@ -/** - */ -package simplepdl.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ViewerNotification; - -import simplepdl.SimplepdlPackage; -import simplepdl.WorkSequence; -import simplepdl.WorkSequenceType; - -/** - * This is the item provider adapter for a {@link simplepdl.WorkSequence} object. - * - * - * @generated - */ -public class WorkSequenceItemProvider extends ProcessElementItemProvider { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public WorkSequenceItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addLinkTypePropertyDescriptor(object); - addPredecessorPropertyDescriptor(object); - addSuccessorPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Link Type feature. - * - * - * @generated - */ - protected void addLinkTypePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_linkType_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_linkType_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__LINK_TYPE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Predecessor feature. - * - * - * @generated - */ - protected void addPredecessorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_predecessor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_predecessor_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__PREDECESSOR, - true, - false, - true, - null, - null, - null)); - } - - /** - * This adds a property descriptor for the Successor feature. - * - * - * @generated - */ - protected void addSuccessorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_successor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_successor_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__SUCCESSOR, - true, - false, - true, - null, - null, - null)); - } - - /** - * This returns WorkSequence.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/WorkSequence")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - WorkSequence ws = (WorkSequence) object; - WorkSequenceType labelValue = ws.getLinkType(); - String label = "--" + (labelValue == null ? "?" : labelValue.toString()) + "-->"; - String previous = ws.getPredecessor() == null ? "?" : ws.getPredecessor().getName(); - String next = ws.getSuccessor() == null ? "?" : ws.getSuccessor().getName(); - return label == null || label.length() == 0 ? - getString("_UI_WorkSequence_type") : - getString("_UI_WorkSequence_type") + " " + previous + " " + label + " " + next; - } - - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(WorkSequence.class)) { - case SimplepdlPackage.WORK_SEQUENCE__LINK_TYPE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - case SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR: - case SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR: - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/21/40b998f53428001c13dca9fa1eba29d5 b/.metadata/.plugins/org.eclipse.core.resources/.history/21/40b998f53428001c13dca9fa1eba29d5 new file mode 100644 index 0000000..2b9489f --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/21/40b998f53428001c13dca9fa1eba29d5 @@ -0,0 +1,28 @@ +import 'SimplePDL.ecore' + +package simplepdl + +context Process +inv warningSeverity: false +inv withMessage('Explicit message in process ' + self.name + ' (withMessage)'): false + +context Process +inv validName('Invalid name: ' + self.name): + self.name.matches('[A-Za-z_][A-Za-z0-9_]*') + +context ProcessElement +def: process(): Process = + Process.allInstances() + ->select(p | p.processElements->includes(self)) + ->asSequence()->first() + +context WorkSequence +inv successorAndPredecessorInSameProcess('Activities not in the same process : ' + + self.predecessor.name + ' in ' + self.predecessor.process().name+ ' and ' + + self.successor.name + ' in ' + self.successor.process().name + ): + self.process() = self.successor.process() + and self.process() = self.predecessor.process() + + +endpackage \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/50/90b6d6ecdc25001c15a9d70b555b4809 b/.metadata/.plugins/org.eclipse.core.resources/.history/24/702cabc93c28001c1451a142d5f09209 similarity index 64% rename from .metadata/.plugins/org.eclipse.core.resources/.history/50/90b6d6ecdc25001c15a9d70b555b4809 rename to .metadata/.plugins/org.eclipse.core.resources/.history/24/702cabc93c28001c1451a142d5f09209 index d884e02..b172813 100644 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/50/90b6d6ecdc25001c15a9d70b555b4809 +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/24/702cabc93c28001c1451a142d5f09209 @@ -1,6 +1,6 @@ /** */ -package simplepdl.provider; +package petrinet.provider; import java.util.Collection; @@ -22,16 +22,17 @@ import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ItemProviderAdapter; import org.eclipse.emf.edit.provider.ViewerNotification; -import simplepdl.Request; -import simplepdl.SimplepdlPackage; +import petrinet.Arc; +import petrinet.PetrinetPackage; +import petrinet.Place; /** - * This is the item provider adapter for a {@link simplepdl.Request} object. + * This is the item provider adapter for a {@link petrinet.Arc} object. * * * @generated */ -public class RequestItemProvider +public class ArcItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, @@ -45,7 +46,7 @@ public class RequestItemProvider * * @generated */ - public RequestItemProvider(AdapterFactory adapterFactory) { + public ArcItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } @@ -60,26 +61,27 @@ public class RequestItemProvider if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); - addQuantityPropertyDescriptor(object); - addTargetPropertyDescriptor(object); + addPoidsPropertyDescriptor(object); + addSortantPropertyDescriptor(object); + addCiblePropertyDescriptor(object); } return itemPropertyDescriptors; } /** - * This adds a property descriptor for the Quantity feature. + * This adds a property descriptor for the Poids feature. * * * @generated */ - protected void addQuantityPropertyDescriptor(Object object) { + protected void addPoidsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_Request_quantity_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Request_quantity_feature", "_UI_Request_type"), - SimplepdlPackage.Literals.REQUEST__QUANTITY, + getString("_UI_Arc_poids_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arc_poids_feature", "_UI_Arc_type"), + PetrinetPackage.Literals.ARC__POIDS, true, false, false, @@ -89,19 +91,41 @@ public class RequestItemProvider } /** - * This adds a property descriptor for the Target feature. + * This adds a property descriptor for the Sortant feature. * * * @generated */ - protected void addTargetPropertyDescriptor(Object object) { + protected void addSortantPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_Request_target_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Request_target_feature", "_UI_Request_type"), - SimplepdlPackage.Literals.REQUEST__TARGET, + getString("_UI_Arc_sortant_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arc_sortant_feature", "_UI_Arc_type"), + PetrinetPackage.Literals.ARC__SORTANT, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Cible feature. + * + * + * @generated + */ + protected void addCiblePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Arc_cible_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arc_cible_feature", "_UI_Arc_type"), + PetrinetPackage.Literals.ARC__CIBLE, true, false, true, @@ -111,14 +135,14 @@ public class RequestItemProvider } /** - * This returns Request.gif. + * This returns Arc.gif. * * * @generated */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/Request")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/Arc")); } /** @@ -129,8 +153,12 @@ public class RequestItemProvider */ @Override public String getText(Object object) { - Request request = (Request)object; - return getString("_UI_Request_type") + " --" + request.getQuantity() + "--> " + request.getTarget().getName(); + boolean sortant = ((Arc)object).isSortant(); + int poids = ((Arc)object).getPoids(); + String cible = ((Arc)object).getCible().getName(); + return sortant ? + "--" + poids + "-->" + cible : + "<--" + poids + "--" + cible; } @@ -145,8 +173,9 @@ public class RequestItemProvider public void notifyChanged(Notification notification) { updateChildren(notification); - switch (notification.getFeatureID(Request.class)) { - case SimplepdlPackage.REQUEST__QUANTITY: + switch (notification.getFeatureID(Arc.class)) { + case PetrinetPackage.ARC__POIDS: + case PetrinetPackage.ARC__SORTANT: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } @@ -173,7 +202,7 @@ public class RequestItemProvider */ @Override public ResourceLocator getResourceLocator() { - return SimplePDLEditPlugin.INSTANCE; + return PetriNetEditPlugin.INSTANCE; } } diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/24/f0b1f32a9822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/24/f0b1f32a9822001c17faa9b6b0561c0f deleted file mode 100644 index c9270e2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/24/f0b1f32a9822001c17faa9b6b0561c0f +++ /dev/null @@ -1,636 +0,0 @@ -/** - */ -package simplepdl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -/** - * - * The Package for the model. - * It contains accessors for the meta objects to represent - *
    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each operation of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * @see simplepdl.SimplepdlFactory - * @model kind="package" - * @generated - */ -public interface SimplepdlPackage extends EPackage { - /** - * The package name. - * - * - * @generated - */ - String eNAME = "simplepdl"; - - /** - * The package namespace URI. - * - * - * @generated - */ - String eNS_URI = "http://simplepdl"; - - /** - * The package namespace name. - * - * - * @generated - */ - String eNS_PREFIX = "simplepdl"; - - /** - * The singleton instance of the package. - * - * - * @generated - */ - SimplepdlPackage eINSTANCE = simplepdl.impl.SimplepdlPackageImpl.init(); - - /** - * The meta object id for the '{@link simplepdl.impl.ProcessElementImpl Process Element}' class. - * - * - * @see simplepdl.impl.ProcessElementImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getProcessElement() - * @generated - */ - int PROCESS_ELEMENT = 0; - - /** - * The number of structural features of the 'Process Element' class. - * - * - * @generated - * @ordered - */ - int PROCESS_ELEMENT_FEATURE_COUNT = 0; - - /** - * The number of operations of the 'Process Element' class. - * - * - * @generated - * @ordered - */ - int PROCESS_ELEMENT_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link simplepdl.impl.WorkDefinitionImpl Work Definition}' class. - * - * - * @see simplepdl.impl.WorkDefinitionImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getWorkDefinition() - * @generated - */ - int WORK_DEFINITION = 1; - - /** - * The feature id for the 'Links To Predecessors' reference list. - * - * - * @generated - * @ordered - */ - int WORK_DEFINITION__LINKS_TO_PREDECESSORS = PROCESS_ELEMENT_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Links To Successors' reference list. - * - * - * @generated - * @ordered - */ - int WORK_DEFINITION__LINKS_TO_SUCCESSORS = PROCESS_ELEMENT_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int WORK_DEFINITION__NAME = PROCESS_ELEMENT_FEATURE_COUNT + 2; - - /** - * The number of structural features of the 'Work Definition' class. - * - * - * @generated - * @ordered - */ - int WORK_DEFINITION_FEATURE_COUNT = PROCESS_ELEMENT_FEATURE_COUNT + 3; - - /** - * The number of operations of the 'Work Definition' class. - * - * - * @generated - * @ordered - */ - int WORK_DEFINITION_OPERATION_COUNT = PROCESS_ELEMENT_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link simplepdl.impl.WorkSequenceImpl Work Sequence}' class. - * - * - * @see simplepdl.impl.WorkSequenceImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getWorkSequence() - * @generated - */ - int WORK_SEQUENCE = 2; - - /** - * The feature id for the 'Link Type' attribute. - * - * - * @generated - * @ordered - */ - int WORK_SEQUENCE__LINK_TYPE = PROCESS_ELEMENT_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Predecessor' reference. - * - * - * @generated - * @ordered - */ - int WORK_SEQUENCE__PREDECESSOR = PROCESS_ELEMENT_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Successor' reference. - * - * - * @generated - * @ordered - */ - int WORK_SEQUENCE__SUCCESSOR = PROCESS_ELEMENT_FEATURE_COUNT + 2; - - /** - * The number of structural features of the 'Work Sequence' class. - * - * - * @generated - * @ordered - */ - int WORK_SEQUENCE_FEATURE_COUNT = PROCESS_ELEMENT_FEATURE_COUNT + 3; - - /** - * The number of operations of the 'Work Sequence' class. - * - * - * @generated - * @ordered - */ - int WORK_SEQUENCE_OPERATION_COUNT = PROCESS_ELEMENT_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link simplepdl.impl.GuidanceImpl Guidance}' class. - * - * - * @see simplepdl.impl.GuidanceImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getGuidance() - * @generated - */ - int GUIDANCE = 3; - - /** - * The feature id for the 'Text' attribute. - * - * - * @generated - * @ordered - */ - int GUIDANCE__TEXT = PROCESS_ELEMENT_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Elements' reference list. - * - * - * @generated - * @ordered - */ - int GUIDANCE__ELEMENTS = PROCESS_ELEMENT_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Guidance' class. - * - * - * @generated - * @ordered - */ - int GUIDANCE_FEATURE_COUNT = PROCESS_ELEMENT_FEATURE_COUNT + 2; - - /** - * The number of operations of the 'Guidance' class. - * - * - * @generated - * @ordered - */ - int GUIDANCE_OPERATION_COUNT = PROCESS_ELEMENT_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link simplepdl.impl.ProcessImpl Process}' class. - * - * - * @see simplepdl.impl.ProcessImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getProcess() - * @generated - */ - int PROCESS = 4; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int PROCESS__NAME = 0; - - /** - * The feature id for the 'Process Elements' containment reference list. - * - * - * @generated - * @ordered - */ - int PROCESS__PROCESS_ELEMENTS = 1; - - /** - * The number of structural features of the 'Process' class. - * - * - * @generated - * @ordered - */ - int PROCESS_FEATURE_COUNT = 2; - - /** - * The number of operations of the 'Process' class. - * - * - * @generated - * @ordered - */ - int PROCESS_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link simplepdl.WorkSequenceType Work Sequence Type}' enum. - * - * - * @see simplepdl.WorkSequenceType - * @see simplepdl.impl.SimplepdlPackageImpl#getWorkSequenceType() - * @generated - */ - int WORK_SEQUENCE_TYPE = 5; - - - /** - * Returns the meta object for class '{@link simplepdl.ProcessElement Process Element}'. - * - * - * @return the meta object for class 'Process Element'. - * @see simplepdl.ProcessElement - * @generated - */ - EClass getProcessElement(); - - /** - * Returns the meta object for class '{@link simplepdl.WorkDefinition Work Definition}'. - * - * - * @return the meta object for class 'Work Definition'. - * @see simplepdl.WorkDefinition - * @generated - */ - EClass getWorkDefinition(); - - /** - * Returns the meta object for the reference list '{@link simplepdl.WorkDefinition#getLinksToPredecessors Links To Predecessors}'. - * - * - * @return the meta object for the reference list 'Links To Predecessors'. - * @see simplepdl.WorkDefinition#getLinksToPredecessors() - * @see #getWorkDefinition() - * @generated - */ - EReference getWorkDefinition_LinksToPredecessors(); - - /** - * Returns the meta object for the reference list '{@link simplepdl.WorkDefinition#getLinksToSuccessors Links To Successors}'. - * - * - * @return the meta object for the reference list 'Links To Successors'. - * @see simplepdl.WorkDefinition#getLinksToSuccessors() - * @see #getWorkDefinition() - * @generated - */ - EReference getWorkDefinition_LinksToSuccessors(); - - /** - * Returns the meta object for the attribute '{@link simplepdl.WorkDefinition#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see simplepdl.WorkDefinition#getName() - * @see #getWorkDefinition() - * @generated - */ - EAttribute getWorkDefinition_Name(); - - /** - * Returns the meta object for class '{@link simplepdl.WorkSequence Work Sequence}'. - * - * - * @return the meta object for class 'Work Sequence'. - * @see simplepdl.WorkSequence - * @generated - */ - EClass getWorkSequence(); - - /** - * Returns the meta object for the attribute '{@link simplepdl.WorkSequence#getLinkType Link Type}'. - * - * - * @return the meta object for the attribute 'Link Type'. - * @see simplepdl.WorkSequence#getLinkType() - * @see #getWorkSequence() - * @generated - */ - EAttribute getWorkSequence_LinkType(); - - /** - * Returns the meta object for the reference '{@link simplepdl.WorkSequence#getPredecessor Predecessor}'. - * - * - * @return the meta object for the reference 'Predecessor'. - * @see simplepdl.WorkSequence#getPredecessor() - * @see #getWorkSequence() - * @generated - */ - EReference getWorkSequence_Predecessor(); - - /** - * Returns the meta object for the reference '{@link simplepdl.WorkSequence#getSuccessor Successor}'. - * - * - * @return the meta object for the reference 'Successor'. - * @see simplepdl.WorkSequence#getSuccessor() - * @see #getWorkSequence() - * @generated - */ - EReference getWorkSequence_Successor(); - - /** - * Returns the meta object for class '{@link simplepdl.Guidance Guidance}'. - * - * - * @return the meta object for class 'Guidance'. - * @see simplepdl.Guidance - * @generated - */ - EClass getGuidance(); - - /** - * Returns the meta object for the attribute '{@link simplepdl.Guidance#getText Text}'. - * - * - * @return the meta object for the attribute 'Text'. - * @see simplepdl.Guidance#getText() - * @see #getGuidance() - * @generated - */ - EAttribute getGuidance_Text(); - - /** - * Returns the meta object for the reference list '{@link simplepdl.Guidance#getElements Elements}'. - * - * - * @return the meta object for the reference list 'Elements'. - * @see simplepdl.Guidance#getElements() - * @see #getGuidance() - * @generated - */ - EReference getGuidance_Elements(); - - /** - * Returns the meta object for class '{@link simplepdl.Process Process}'. - * - * - * @return the meta object for class 'Process'. - * @see simplepdl.Process - * @generated - */ - EClass getProcess(); - - /** - * Returns the meta object for the attribute '{@link simplepdl.Process#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see simplepdl.Process#getName() - * @see #getProcess() - * @generated - */ - EAttribute getProcess_Name(); - - /** - * Returns the meta object for the containment reference list '{@link simplepdl.Process#getProcessElements Process Elements}'. - * - * - * @return the meta object for the containment reference list 'Process Elements'. - * @see simplepdl.Process#getProcessElements() - * @see #getProcess() - * @generated - */ - EReference getProcess_ProcessElements(); - - /** - * Returns the meta object for enum '{@link simplepdl.WorkSequenceType Work Sequence Type}'. - * - * - * @return the meta object for enum 'Work Sequence Type'. - * @see simplepdl.WorkSequenceType - * @generated - */ - EEnum getWorkSequenceType(); - - /** - * Returns the factory that creates the instances of the model. - * - * - * @return the factory that creates the instances of the model. - * @generated - */ - SimplepdlFactory getSimplepdlFactory(); - - /** - * - * Defines literals for the meta objects that represent - *
    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each operation of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * @generated - */ - interface Literals { - /** - * The meta object literal for the '{@link simplepdl.impl.ProcessElementImpl Process Element}' class. - * - * - * @see simplepdl.impl.ProcessElementImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getProcessElement() - * @generated - */ - EClass PROCESS_ELEMENT = eINSTANCE.getProcessElement(); - - /** - * The meta object literal for the '{@link simplepdl.impl.WorkDefinitionImpl Work Definition}' class. - * - * - * @see simplepdl.impl.WorkDefinitionImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getWorkDefinition() - * @generated - */ - EClass WORK_DEFINITION = eINSTANCE.getWorkDefinition(); - - /** - * The meta object literal for the 'Links To Predecessors' reference list feature. - * - * - * @generated - */ - EReference WORK_DEFINITION__LINKS_TO_PREDECESSORS = eINSTANCE.getWorkDefinition_LinksToPredecessors(); - - /** - * The meta object literal for the 'Links To Successors' reference list feature. - * - * - * @generated - */ - EReference WORK_DEFINITION__LINKS_TO_SUCCESSORS = eINSTANCE.getWorkDefinition_LinksToSuccessors(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute WORK_DEFINITION__NAME = eINSTANCE.getWorkDefinition_Name(); - - /** - * The meta object literal for the '{@link simplepdl.impl.WorkSequenceImpl Work Sequence}' class. - * - * - * @see simplepdl.impl.WorkSequenceImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getWorkSequence() - * @generated - */ - EClass WORK_SEQUENCE = eINSTANCE.getWorkSequence(); - - /** - * The meta object literal for the 'Link Type' attribute feature. - * - * - * @generated - */ - EAttribute WORK_SEQUENCE__LINK_TYPE = eINSTANCE.getWorkSequence_LinkType(); - - /** - * The meta object literal for the 'Predecessor' reference feature. - * - * - * @generated - */ - EReference WORK_SEQUENCE__PREDECESSOR = eINSTANCE.getWorkSequence_Predecessor(); - - /** - * The meta object literal for the 'Successor' reference feature. - * - * - * @generated - */ - EReference WORK_SEQUENCE__SUCCESSOR = eINSTANCE.getWorkSequence_Successor(); - - /** - * The meta object literal for the '{@link simplepdl.impl.GuidanceImpl Guidance}' class. - * - * - * @see simplepdl.impl.GuidanceImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getGuidance() - * @generated - */ - EClass GUIDANCE = eINSTANCE.getGuidance(); - - /** - * The meta object literal for the 'Text' attribute feature. - * - * - * @generated - */ - EAttribute GUIDANCE__TEXT = eINSTANCE.getGuidance_Text(); - - /** - * The meta object literal for the 'Elements' reference list feature. - * - * - * @generated - */ - EReference GUIDANCE__ELEMENTS = eINSTANCE.getGuidance_Elements(); - - /** - * The meta object literal for the '{@link simplepdl.impl.ProcessImpl Process}' class. - * - * - * @see simplepdl.impl.ProcessImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getProcess() - * @generated - */ - EClass PROCESS = eINSTANCE.getProcess(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute PROCESS__NAME = eINSTANCE.getProcess_Name(); - - /** - * The meta object literal for the 'Process Elements' containment reference list feature. - * - * - * @generated - */ - EReference PROCESS__PROCESS_ELEMENTS = eINSTANCE.getProcess_ProcessElements(); - - /** - * The meta object literal for the '{@link simplepdl.WorkSequenceType Work Sequence Type}' enum. - * - * - * @see simplepdl.WorkSequenceType - * @see simplepdl.impl.SimplepdlPackageImpl#getWorkSequenceType() - * @generated - */ - EEnum WORK_SEQUENCE_TYPE = eINSTANCE.getWorkSequenceType(); - - } - -} //SimplepdlPackage diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5f/508f2e94f425001c1bd4a5e084302d35 b/.metadata/.plugins/org.eclipse.core.resources/.history/25/103a99093428001c13dca9fa1eba29d5 similarity index 97% rename from .metadata/.plugins/org.eclipse.core.resources/.history/5f/508f2e94f425001c1bd4a5e084302d35 rename to .metadata/.plugins/org.eclipse.core.resources/.history/25/103a99093428001c13dca9fa1eba29d5 index 3deab2f..b78d233 100644 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/5f/508f2e94f425001c1bd4a5e084302d35 +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/25/103a99093428001c13dca9fa1eba29d5 @@ -7,7 +7,7 @@ + eType="#//Flèche" containment="true"/> diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/29/00dae74f9c22001c10c68e4a8bb21dd1 b/.metadata/.plugins/org.eclipse.core.resources/.history/29/00dae74f9c22001c10c68e4a8bb21dd1 deleted file mode 100644 index 401dc9e..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/29/00dae74f9c22001c10c68e4a8bb21dd1 +++ /dev/null @@ -1,201 +0,0 @@ -/** - */ -package simplepdl.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ViewerNotification; - -import simplepdl.SimplepdlPackage; -import simplepdl.WorkDefinition; - -/** - * This is the item provider adapter for a {@link simplepdl.WorkDefinition} object. - * - * - * @generated - */ -public class WorkDefinitionItemProvider extends ProcessElementItemProvider { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public WorkDefinitionItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addLinksToPredecessorsPropertyDescriptor(object); - addLinksToSuccessorsPropertyDescriptor(object); - addNamePropertyDescriptor(object); - addRequestsPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Links To Predecessors feature. - * - * - * @generated - */ - protected void addLinksToPredecessorsPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkDefinition_linksToPredecessors_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkDefinition_linksToPredecessors_feature", "_UI_WorkDefinition_type"), - SimplepdlPackage.Literals.WORK_DEFINITION__LINKS_TO_PREDECESSORS, - true, - false, - true, - null, - null, - null)); - } - - /** - * This adds a property descriptor for the Links To Successors feature. - * - * - * @generated - */ - protected void addLinksToSuccessorsPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkDefinition_linksToSuccessors_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkDefinition_linksToSuccessors_feature", "_UI_WorkDefinition_type"), - SimplepdlPackage.Literals.WORK_DEFINITION__LINKS_TO_SUCCESSORS, - true, - false, - true, - null, - null, - null)); - } - - /** - * This adds a property descriptor for the Name feature. - * - * - * @generated - */ - protected void addNamePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkDefinition_name_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkDefinition_name_feature", "_UI_WorkDefinition_type"), - SimplepdlPackage.Literals.WORK_DEFINITION__NAME, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Requests feature. - * - * - * @generated - */ - protected void addRequestsPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkDefinition_requests_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkDefinition_requests_feature", "_UI_WorkDefinition_type"), - SimplepdlPackage.Literals.WORK_DEFINITION__REQUESTS, - true, - false, - true, - null, - null, - null)); - } - - /** - * This returns WorkDefinition.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/WorkDefinition")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - String label = ((WorkDefinition)object).getName(); - return label == null || label.length() == 0 ? - getString("_UI_WorkDefinition_type") : - getString("_UI_WorkDefinition_type") + " " + label; - } - - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(WorkDefinition.class)) { - case SimplepdlPackage.WORK_DEFINITION__NAME: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2a/601484d13328001c13dca9fa1eba29d5 b/.metadata/.plugins/org.eclipse.core.resources/.history/2a/601484d13328001c13dca9fa1eba29d5 new file mode 100644 index 0000000..b93b232 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/2a/601484d13328001c13dca9fa1eba29d5 @@ -0,0 +1,3 @@ + + diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2e/701a2c539a22001c12b4fa86d0abfe24 b/.metadata/.plugins/org.eclipse.core.resources/.history/2e/701a2c539a22001c12b4fa86d0abfe24 deleted file mode 100644 index 990b3e2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2e/701a2c539a22001c12b4fa86d0abfe24 +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2f/90ef1c183528001c13dca9fa1eba29d5 b/.metadata/.plugins/org.eclipse.core.resources/.history/2f/90ef1c183528001c13dca9fa1eba29d5 new file mode 100644 index 0000000..2b9489f --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/2f/90ef1c183528001c13dca9fa1eba29d5 @@ -0,0 +1,28 @@ +import 'SimplePDL.ecore' + +package simplepdl + +context Process +inv warningSeverity: false +inv withMessage('Explicit message in process ' + self.name + ' (withMessage)'): false + +context Process +inv validName('Invalid name: ' + self.name): + self.name.matches('[A-Za-z_][A-Za-z0-9_]*') + +context ProcessElement +def: process(): Process = + Process.allInstances() + ->select(p | p.processElements->includes(self)) + ->asSequence()->first() + +context WorkSequence +inv successorAndPredecessorInSameProcess('Activities not in the same process : ' + + self.predecessor.name + ' in ' + self.predecessor.process().name+ ' and ' + + self.successor.name + ' in ' + self.successor.process().name + ): + self.process() = self.successor.process() + and self.process() = self.predecessor.process() + + +endpackage \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2f/f00d382b9822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/2f/f00d382b9822001c17faa9b6b0561c0f deleted file mode 100644 index b291620..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2f/f00d382b9822001c17faa9b6b0561c0f +++ /dev/null @@ -1,39 +0,0 @@ -/** - */ -package simplepdl.impl; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; - -import simplepdl.ProcessElement; -import simplepdl.SimplepdlPackage; - -/** - * - * An implementation of the model object 'Process Element'. - * - * - * @generated - */ -public class ProcessElementImpl extends MinimalEObjectImpl.Container implements ProcessElement { - /** - * - * - * @generated - */ - protected ProcessElementImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return SimplepdlPackage.Literals.PROCESS_ELEMENT; - } - -} //ProcessElementImpl diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/34/502708779422001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/34/502708779422001c17faa9b6b0561c0f deleted file mode 100644 index 484b8fa..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/34/502708779422001c17faa9b6b0561c0f +++ /dev/null @@ -1,1545 +0,0 @@ - - - - SimplePDL.ecore - SimplePDL.genmodel - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - bold - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/34/c0c8ff329822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/34/c0c8ff329822001c17faa9b6b0561c0f deleted file mode 100644 index 7457b4c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/34/c0c8ff329822001c17faa9b6b0561c0f +++ /dev/null @@ -1,61 +0,0 @@ -/** - */ -package simplepdl; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Process'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link simplepdl.Process#getName Name}
  • - *
  • {@link simplepdl.Process#getProcessElements Process Elements}
  • - *
- * - * @see simplepdl.SimplepdlPackage#getProcess() - * @model - * @generated - */ -public interface Process extends EObject { - /** - * Returns the value of the 'Name' attribute. - * - * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see simplepdl.SimplepdlPackage#getProcess_Name() - * @model required="true" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link simplepdl.Process#getName Name}' attribute. - * - * - * @param value the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Returns the value of the 'Process Elements' containment reference list. - * The list contents are of type {@link simplepdl.ProcessElement}. - * - * - * @return the value of the 'Process Elements' containment reference list. - * @see simplepdl.SimplepdlPackage#getProcess_ProcessElements() - * @model containment="true" - * @generated - */ - EList getProcessElements(); - -} // Process diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/35/90a8ff5c3128001c1e2bddb0f1b33239 b/.metadata/.plugins/org.eclipse.core.resources/.history/35/90a8ff5c3128001c1e2bddb0f1b33239 new file mode 100644 index 0000000..52d193d --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/35/90a8ff5c3128001c1e2bddb0f1b33239 @@ -0,0 +1,50 @@ +import 'SimplePDL.ecore' + +package simplepdl + +context Process +inv warningSeverity: false +inv withMessage('Explicit message in process ' + self.name + ' (withMessage)'): false +--inv errorSeverity: null + +context Process +inv validName('Invalid name: ' + self.name): + self.name.matches('[A-Za-z_][A-Za-z0-9_]*') + +context ProcessElement +def: process(): Process = + Process.allInstances() + ->select(p | p.processElements->includes(self)) + ->asSequence()->first() + +context WorkSequence +inv successorAndPredecessorInSameProcess('Activities not in the same process : ' + + self.predecessor.name + ' in ' + self.predecessor.process().name+ ' and ' + + self.successor.name + ' in ' + self.successor.process().name + ): + self.process() = self.successor.process() + and self.process() = self.predecessor.process() + +context Process +inv uniqNames: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w1, w2 | w1 = w2 or w1.name <> w2.name) + +context WorkSequence +inv notReflexive: self.predecessor <> self.successor + +context Process +inv nameMin2Char: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w | w.name.matches('..+')) + +context Process +inv weirdName: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w | not w.name.matches('([0-9]*|[a-zA-Z]*|_*)')) + + +endpackage \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/36/100f13fd9c22001c118def180044d1da b/.metadata/.plugins/org.eclipse.core.resources/.history/36/100f13fd9c22001c118def180044d1da deleted file mode 100644 index 2f81f37..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/36/100f13fd9c22001c118def180044d1da +++ /dev/null @@ -1,182 +0,0 @@ -/** - */ -package simplepdl.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ViewerNotification; - -import simplepdl.SimplepdlPackage; -import simplepdl.WorkSequence; -import simplepdl.WorkSequenceType; - -/** - * This is the item provider adapter for a {@link simplepdl.WorkSequence} object. - * - * - * @generated - */ -public class WorkSequenceItemProvider extends ProcessElementItemProvider { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public WorkSequenceItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addLinkTypePropertyDescriptor(object); - addPredecessorPropertyDescriptor(object); - addSuccessorPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Link Type feature. - * - * - * @generated - */ - protected void addLinkTypePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_linkType_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_linkType_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__LINK_TYPE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Predecessor feature. - * - * - * @generated - */ - protected void addPredecessorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_predecessor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_predecessor_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__PREDECESSOR, - true, - false, - true, - null, - null, - null)); - } - - /** - * This adds a property descriptor for the Successor feature. - * - * - * @generated - */ - protected void addSuccessorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_successor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_successor_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__SUCCESSOR, - true, - false, - true, - null, - null, - null)); - } - - /** - * This returns WorkSequence.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/WorkSequence")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - WorkSequenceType labelValue = ((WorkSequence)object).getLinkType(); - String label = labelValue == null ? null : labelValue.toString(); - return label == null || label.length() == 0 ? - getString("_UI_WorkSequence_type") : - getString("_UI_WorkSequence_type") + " " + label; - } - - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(WorkSequence.class)) { - case SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR: - case SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR: - case SimplepdlPackage.WORK_SEQUENCE__LINK_TYPE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4/00dda87c3228001c13dca9fa1eba29d5 b/.metadata/.plugins/org.eclipse.core.resources/.history/4/00dda87c3228001c13dca9fa1eba29d5 new file mode 100644 index 0000000..381a3d8 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/4/00dda87c3228001c13dca9fa1eba29d5 @@ -0,0 +1,49 @@ +import 'SimplePDL.ecore' + +package simplepdl + +context Process +inv warningSeverity: false +inv withMessage('Explicit message in process ' + self.name + ' (withMessage)'): false +--inv errorSeverity: null + +context Process +inv validName('Invalid name: ' + self.name): + self.name.matches('[A-Za-z_][A-Za-z0-9_]*') + +context ProcessElement +def: process(): Process = + Process.allInstances() + ->select(p | p.processElements->includes(self)) + ->asSequence()->first() + +context WorkSequence +inv successorAndPredecessorInSameProcess('Activities not in the same process : ' + + self.predecessor.name + ' in ' + self.predecessor.process().name+ ' and ' + + self.successor.name + ' in ' + self.successor.process().name + ): + self.process() = self.successor.process() + and self.process() = self.predecessor.process() + +context Process +inv uniqNames: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w1, w2 | w1 = w2 or w1.name <> w2.name) + +context WorkSequence +inv notReflexive: self.predecessor <> self.successor + +context Process +inv nameMin2Char: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w | w.name.matches('..+')) + +context Process +inv weirdName: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w | not w.name.matches('([0-9]*|[a-zA-Z]*|_*)')) + +endpackage \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/44/509e66e8f425001c1bd4a5e084302d35 b/.metadata/.plugins/org.eclipse.core.resources/.history/44/509e66e8f425001c1bd4a5e084302d35 deleted file mode 100644 index 309d716..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/44/509e66e8f425001c1bd4a5e084302d35 +++ /dev/null @@ -1,668 +0,0 @@ - - - - petriNet.ecore - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - - bold - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - - bold - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - italic - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4c/10500a339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/4c/10500a339822001c17faa9b6b0561c0f deleted file mode 100644 index 4489022..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4c/10500a339822001c17faa9b6b0561c0f +++ /dev/null @@ -1,225 +0,0 @@ -/** - */ -package simplepdl.impl; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; - -import simplepdl.Request; -import simplepdl.Resource; -import simplepdl.SimplepdlPackage; - -/** - * - * An implementation of the model object 'Request'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link simplepdl.impl.RequestImpl#getQuantity Quantity}
  • - *
  • {@link simplepdl.impl.RequestImpl#getTarget Target}
  • - *
- * - * @generated - */ -public class RequestImpl extends MinimalEObjectImpl.Container implements Request { - /** - * The default value of the '{@link #getQuantity() Quantity}' attribute. - * - * - * @see #getQuantity() - * @generated - * @ordered - */ - protected static final int QUANTITY_EDEFAULT = 0; - - /** - * The cached value of the '{@link #getQuantity() Quantity}' attribute. - * - * - * @see #getQuantity() - * @generated - * @ordered - */ - protected int quantity = QUANTITY_EDEFAULT; - - /** - * The cached value of the '{@link #getTarget() Target}' reference. - * - * - * @see #getTarget() - * @generated - * @ordered - */ - protected Resource target; - - /** - * - * - * @generated - */ - protected RequestImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return SimplepdlPackage.Literals.REQUEST; - } - - /** - * - * - * @generated - */ - public int getQuantity() { - return quantity; - } - - /** - * - * - * @generated - */ - public void setQuantity(int newQuantity) { - int oldQuantity = quantity; - quantity = newQuantity; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.REQUEST__QUANTITY, oldQuantity, quantity)); - } - - /** - * - * - * @generated - */ - public Resource getTarget() { - if (target != null && target.eIsProxy()) { - InternalEObject oldTarget = (InternalEObject)target; - target = (Resource)eResolveProxy(oldTarget); - if (target != oldTarget) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, SimplepdlPackage.REQUEST__TARGET, oldTarget, target)); - } - } - return target; - } - - /** - * - * - * @generated - */ - public Resource basicGetTarget() { - return target; - } - - /** - * - * - * @generated - */ - public void setTarget(Resource newTarget) { - Resource oldTarget = target; - target = newTarget; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.REQUEST__TARGET, oldTarget, target)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SimplepdlPackage.REQUEST__QUANTITY: - return getQuantity(); - case SimplepdlPackage.REQUEST__TARGET: - if (resolve) return getTarget(); - return basicGetTarget(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case SimplepdlPackage.REQUEST__QUANTITY: - setQuantity((Integer)newValue); - return; - case SimplepdlPackage.REQUEST__TARGET: - setTarget((Resource)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case SimplepdlPackage.REQUEST__QUANTITY: - setQuantity(QUANTITY_EDEFAULT); - return; - case SimplepdlPackage.REQUEST__TARGET: - setTarget((Resource)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case SimplepdlPackage.REQUEST__QUANTITY: - return quantity != QUANTITY_EDEFAULT; - case SimplepdlPackage.REQUEST__TARGET: - return target != null; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuilder result = new StringBuilder(super.toString()); - result.append(" (quantity: "); - result.append(quantity); - result.append(')'); - return result.toString(); - } - -} //RequestImpl diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/50/60bc0a2b9822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/50/60bc0a2b9822001c17faa9b6b0561c0f deleted file mode 100644 index 515c360..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/50/60bc0a2b9822001c17faa9b6b0561c0f +++ /dev/null @@ -1,391 +0,0 @@ -/** - */ -package simplepdl.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -import org.eclipse.emf.ecore.impl.EPackageImpl; - -import simplepdl.Guidance; -import simplepdl.ProcessElement; -import simplepdl.SimplepdlFactory; -import simplepdl.SimplepdlPackage; -import simplepdl.WorkDefinition; -import simplepdl.WorkSequence; -import simplepdl.WorkSequenceType; - -/** - * - * An implementation of the model Package. - * - * @generated - */ -public class SimplepdlPackageImpl extends EPackageImpl implements SimplepdlPackage { - /** - * - * - * @generated - */ - private EClass processElementEClass = null; - - /** - * - * - * @generated - */ - private EClass workDefinitionEClass = null; - - /** - * - * - * @generated - */ - private EClass workSequenceEClass = null; - - /** - * - * - * @generated - */ - private EClass guidanceEClass = null; - - /** - * - * - * @generated - */ - private EClass processEClass = null; - - /** - * - * - * @generated - */ - private EEnum workSequenceTypeEEnum = null; - - /** - * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - *

Note: the correct way to create the package is via the static - * factory method {@link #init init()}, which also performs - * initialization of the package, or returns the registered package, - * if one already exists. - * - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see simplepdl.SimplepdlPackage#eNS_URI - * @see #init() - * @generated - */ - private SimplepdlPackageImpl() { - super(eNS_URI, SimplepdlFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - * - *

This method is used to initialize {@link SimplepdlPackage#eINSTANCE} when that field is accessed. - * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static SimplepdlPackage init() { - if (isInited) return (SimplepdlPackage)EPackage.Registry.INSTANCE.getEPackage(SimplepdlPackage.eNS_URI); - - // Obtain or create and register package - Object registeredSimplepdlPackage = EPackage.Registry.INSTANCE.get(eNS_URI); - SimplepdlPackageImpl theSimplepdlPackage = registeredSimplepdlPackage instanceof SimplepdlPackageImpl ? (SimplepdlPackageImpl)registeredSimplepdlPackage : new SimplepdlPackageImpl(); - - isInited = true; - - // Create package meta-data objects - theSimplepdlPackage.createPackageContents(); - - // Initialize created meta-data - theSimplepdlPackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theSimplepdlPackage.freeze(); - - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(SimplepdlPackage.eNS_URI, theSimplepdlPackage); - return theSimplepdlPackage; - } - - /** - * - * - * @generated - */ - public EClass getProcessElement() { - return processElementEClass; - } - - /** - * - * - * @generated - */ - public EClass getWorkDefinition() { - return workDefinitionEClass; - } - - /** - * - * - * @generated - */ - public EReference getWorkDefinition_LinksToPredecessors() { - return (EReference)workDefinitionEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getWorkDefinition_LinksToSuccessors() { - return (EReference)workDefinitionEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getWorkDefinition_Name() { - return (EAttribute)workDefinitionEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getWorkSequence() { - return workSequenceEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getWorkSequence_LinkType() { - return (EAttribute)workSequenceEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getWorkSequence_Predecessor() { - return (EReference)workSequenceEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getWorkSequence_Successor() { - return (EReference)workSequenceEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getGuidance() { - return guidanceEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getGuidance_Text() { - return (EAttribute)guidanceEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getGuidance_Elements() { - return (EReference)guidanceEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getProcess() { - return processEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getProcess_Name() { - return (EAttribute)processEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getProcess_ProcessElements() { - return (EReference)processEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EEnum getWorkSequenceType() { - return workSequenceTypeEEnum; - } - - /** - * - * - * @generated - */ - public SimplepdlFactory getSimplepdlFactory() { - return (SimplepdlFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - processElementEClass = createEClass(PROCESS_ELEMENT); - - workDefinitionEClass = createEClass(WORK_DEFINITION); - createEReference(workDefinitionEClass, WORK_DEFINITION__LINKS_TO_PREDECESSORS); - createEReference(workDefinitionEClass, WORK_DEFINITION__LINKS_TO_SUCCESSORS); - createEAttribute(workDefinitionEClass, WORK_DEFINITION__NAME); - - workSequenceEClass = createEClass(WORK_SEQUENCE); - createEAttribute(workSequenceEClass, WORK_SEQUENCE__LINK_TYPE); - createEReference(workSequenceEClass, WORK_SEQUENCE__PREDECESSOR); - createEReference(workSequenceEClass, WORK_SEQUENCE__SUCCESSOR); - - guidanceEClass = createEClass(GUIDANCE); - createEAttribute(guidanceEClass, GUIDANCE__TEXT); - createEReference(guidanceEClass, GUIDANCE__ELEMENTS); - - processEClass = createEClass(PROCESS); - createEAttribute(processEClass, PROCESS__NAME); - createEReference(processEClass, PROCESS__PROCESS_ELEMENTS); - - // Create enums - workSequenceTypeEEnum = createEEnum(WORK_SEQUENCE_TYPE); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Create type parameters - - // Set bounds for type parameters - - // Add supertypes to classes - workDefinitionEClass.getESuperTypes().add(this.getProcessElement()); - workSequenceEClass.getESuperTypes().add(this.getProcessElement()); - guidanceEClass.getESuperTypes().add(this.getProcessElement()); - - // Initialize classes, features, and operations; add parameters - initEClass(processElementEClass, ProcessElement.class, "ProcessElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(workDefinitionEClass, WorkDefinition.class, "WorkDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getWorkDefinition_LinksToPredecessors(), this.getWorkSequence(), this.getWorkSequence_Successor(), "linksToPredecessors", null, 0, -1, WorkDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getWorkDefinition_LinksToSuccessors(), this.getWorkSequence(), this.getWorkSequence_Predecessor(), "linksToSuccessors", null, 0, -1, WorkDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getWorkDefinition_Name(), ecorePackage.getEString(), "name", null, 1, 1, WorkDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(workSequenceEClass, WorkSequence.class, "WorkSequence", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getWorkSequence_LinkType(), this.getWorkSequenceType(), "linkType", null, 1, 1, WorkSequence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getWorkSequence_Predecessor(), this.getWorkDefinition(), this.getWorkDefinition_LinksToSuccessors(), "predecessor", null, 1, 1, WorkSequence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getWorkSequence_Successor(), this.getWorkDefinition(), this.getWorkDefinition_LinksToPredecessors(), "successor", null, 1, 1, WorkSequence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(guidanceEClass, Guidance.class, "Guidance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getGuidance_Text(), ecorePackage.getEString(), "text", null, 1, 1, Guidance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getGuidance_Elements(), this.getProcessElement(), null, "elements", null, 0, -1, Guidance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(processEClass, simplepdl.Process.class, "Process", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getProcess_Name(), ecorePackage.getEString(), "name", null, 1, 1, simplepdl.Process.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getProcess_ProcessElements(), this.getProcessElement(), null, "processElements", null, 0, -1, simplepdl.Process.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - // Initialize enums and add enum literals - initEEnum(workSequenceTypeEEnum, WorkSequenceType.class, "WorkSequenceType"); - addEEnumLiteral(workSequenceTypeEEnum, WorkSequenceType.START_TO_START); - addEEnumLiteral(workSequenceTypeEEnum, WorkSequenceType.FINISH_TO_START); - addEEnumLiteral(workSequenceTypeEEnum, WorkSequenceType.START_TO_FINISH); - addEEnumLiteral(workSequenceTypeEEnum, WorkSequenceType.FINISH_TO_FINISH); - - // Create resource - createResource(eNS_URI); - } - -} //SimplepdlPackageImpl diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/53/e02745d49b22001c10fba84a9f2208e9 b/.metadata/.plugins/org.eclipse.core.resources/.history/53/e02745d49b22001c10fba84a9f2208e9 deleted file mode 100644 index 97521a3..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/53/e02745d49b22001c10fba84a9f2208e9 +++ /dev/null @@ -1,310 +0,0 @@ -/** - */ -package simplepdl.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import org.eclipse.emf.ecore.util.EObjectResolvingEList; -import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; -import org.eclipse.emf.ecore.util.InternalEList; - -import simplepdl.Request; -import simplepdl.SimplepdlPackage; -import simplepdl.WorkDefinition; -import simplepdl.WorkSequence; - -/** - * - * An implementation of the model object 'Work Definition'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link simplepdl.impl.WorkDefinitionImpl#getLinksToPredecessors Links To Predecessors}
  • - *
  • {@link simplepdl.impl.WorkDefinitionImpl#getLinksToSuccessors Links To Successors}
  • - *
  • {@link simplepdl.impl.WorkDefinitionImpl#getName Name}
  • - *
  • {@link simplepdl.impl.WorkDefinitionImpl#getRequests Requests}
  • - *
- * - * @generated - */ -public class WorkDefinitionImpl extends ProcessElementImpl implements WorkDefinition { - /** - * The cached value of the '{@link #getLinksToPredecessors() Links To Predecessors}' reference list. - * - * - * @see #getLinksToPredecessors() - * @generated - * @ordered - */ - protected EList linksToPredecessors; - - /** - * The cached value of the '{@link #getLinksToSuccessors() Links To Successors}' reference list. - * - * - * @see #getLinksToSuccessors() - * @generated - * @ordered - */ - protected EList linksToSuccessors; - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The cached value of the '{@link #getRequests() Requests}' reference list. - * - * - * @see #getRequests() - * @generated - * @ordered - */ - protected EList requests; - - /** - * - * - * @generated - */ - protected WorkDefinitionImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return SimplepdlPackage.Literals.WORK_DEFINITION; - } - - /** - * - * - * @generated - */ - public EList getLinksToPredecessors() { - if (linksToPredecessors == null) { - linksToPredecessors = new EObjectWithInverseResolvingEList(WorkSequence.class, this, SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS, SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR); - } - return linksToPredecessors; - } - - /** - * - * - * @generated - */ - public EList getLinksToSuccessors() { - if (linksToSuccessors == null) { - linksToSuccessors = new EObjectWithInverseResolvingEList(WorkSequence.class, this, SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS, SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR); - } - return linksToSuccessors; - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.WORK_DEFINITION__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public EList getRequests() { - if (requests == null) { - requests = new EObjectResolvingEList(Request.class, this, SimplepdlPackage.WORK_DEFINITION__REQUESTS); - } - return requests; - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS: - return ((InternalEList)(InternalEList)getLinksToPredecessors()).basicAdd(otherEnd, msgs); - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS: - return ((InternalEList)(InternalEList)getLinksToSuccessors()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS: - return ((InternalEList)getLinksToPredecessors()).basicRemove(otherEnd, msgs); - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS: - return ((InternalEList)getLinksToSuccessors()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS: - return getLinksToPredecessors(); - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS: - return getLinksToSuccessors(); - case SimplepdlPackage.WORK_DEFINITION__NAME: - return getName(); - case SimplepdlPackage.WORK_DEFINITION__REQUESTS: - return getRequests(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS: - getLinksToPredecessors().clear(); - getLinksToPredecessors().addAll((Collection)newValue); - return; - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS: - getLinksToSuccessors().clear(); - getLinksToSuccessors().addAll((Collection)newValue); - return; - case SimplepdlPackage.WORK_DEFINITION__NAME: - setName((String)newValue); - return; - case SimplepdlPackage.WORK_DEFINITION__REQUESTS: - getRequests().clear(); - getRequests().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS: - getLinksToPredecessors().clear(); - return; - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS: - getLinksToSuccessors().clear(); - return; - case SimplepdlPackage.WORK_DEFINITION__NAME: - setName(NAME_EDEFAULT); - return; - case SimplepdlPackage.WORK_DEFINITION__REQUESTS: - getRequests().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS: - return linksToPredecessors != null && !linksToPredecessors.isEmpty(); - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS: - return linksToSuccessors != null && !linksToSuccessors.isEmpty(); - case SimplepdlPackage.WORK_DEFINITION__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case SimplepdlPackage.WORK_DEFINITION__REQUESTS: - return requests != null && !requests.isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuilder result = new StringBuilder(super.toString()); - result.append(" (name: "); - result.append(name); - result.append(')'); - return result.toString(); - } - -} //WorkDefinitionImpl diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/53/e04b0c339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/53/e04b0c339822001c17faa9b6b0561c0f deleted file mode 100644 index e434be3..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/53/e04b0c339822001c17faa9b6b0561c0f +++ /dev/null @@ -1,489 +0,0 @@ -/** - */ -package simplepdl.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -import org.eclipse.emf.ecore.impl.EPackageImpl; - -import simplepdl.Guidance; -import simplepdl.ProcessElement; -import simplepdl.Request; -import simplepdl.Resource; -import simplepdl.SimplepdlFactory; -import simplepdl.SimplepdlPackage; -import simplepdl.WorkDefinition; -import simplepdl.WorkSequence; -import simplepdl.WorkSequenceType; - -/** - * - * An implementation of the model Package. - * - * @generated - */ -public class SimplepdlPackageImpl extends EPackageImpl implements SimplepdlPackage { - /** - * - * - * @generated - */ - private EClass processElementEClass = null; - - /** - * - * - * @generated - */ - private EClass workDefinitionEClass = null; - - /** - * - * - * @generated - */ - private EClass workSequenceEClass = null; - - /** - * - * - * @generated - */ - private EClass guidanceEClass = null; - - /** - * - * - * @generated - */ - private EClass processEClass = null; - - /** - * - * - * @generated - */ - private EClass requestEClass = null; - - /** - * - * - * @generated - */ - private EClass resourceEClass = null; - - /** - * - * - * @generated - */ - private EEnum workSequenceTypeEEnum = null; - - /** - * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - *

Note: the correct way to create the package is via the static - * factory method {@link #init init()}, which also performs - * initialization of the package, or returns the registered package, - * if one already exists. - * - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see simplepdl.SimplepdlPackage#eNS_URI - * @see #init() - * @generated - */ - private SimplepdlPackageImpl() { - super(eNS_URI, SimplepdlFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - * - *

This method is used to initialize {@link SimplepdlPackage#eINSTANCE} when that field is accessed. - * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static SimplepdlPackage init() { - if (isInited) return (SimplepdlPackage)EPackage.Registry.INSTANCE.getEPackage(SimplepdlPackage.eNS_URI); - - // Obtain or create and register package - Object registeredSimplepdlPackage = EPackage.Registry.INSTANCE.get(eNS_URI); - SimplepdlPackageImpl theSimplepdlPackage = registeredSimplepdlPackage instanceof SimplepdlPackageImpl ? (SimplepdlPackageImpl)registeredSimplepdlPackage : new SimplepdlPackageImpl(); - - isInited = true; - - // Create package meta-data objects - theSimplepdlPackage.createPackageContents(); - - // Initialize created meta-data - theSimplepdlPackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theSimplepdlPackage.freeze(); - - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(SimplepdlPackage.eNS_URI, theSimplepdlPackage); - return theSimplepdlPackage; - } - - /** - * - * - * @generated - */ - public EClass getProcessElement() { - return processElementEClass; - } - - /** - * - * - * @generated - */ - public EClass getWorkDefinition() { - return workDefinitionEClass; - } - - /** - * - * - * @generated - */ - public EReference getWorkDefinition_LinksToPredecessors() { - return (EReference)workDefinitionEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getWorkDefinition_LinksToSuccessors() { - return (EReference)workDefinitionEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getWorkDefinition_Name() { - return (EAttribute)workDefinitionEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getWorkDefinition_Requests() { - return (EReference)workDefinitionEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EClass getWorkSequence() { - return workSequenceEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getWorkSequence_LinkType() { - return (EAttribute)workSequenceEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getWorkSequence_Predecessor() { - return (EReference)workSequenceEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getWorkSequence_Successor() { - return (EReference)workSequenceEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getGuidance() { - return guidanceEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getGuidance_Text() { - return (EAttribute)guidanceEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getGuidance_Elements() { - return (EReference)guidanceEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getProcess() { - return processEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getProcess_Name() { - return (EAttribute)processEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getProcess_ProcessElements() { - return (EReference)processEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getRequest() { - return requestEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getRequest_Quantity() { - return (EAttribute)requestEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getRequest_Target() { - return (EReference)requestEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getResource() { - return resourceEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getResource_Quantity() { - return (EAttribute)resourceEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getResource_Name() { - return (EAttribute)resourceEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EEnum getWorkSequenceType() { - return workSequenceTypeEEnum; - } - - /** - * - * - * @generated - */ - public SimplepdlFactory getSimplepdlFactory() { - return (SimplepdlFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - processElementEClass = createEClass(PROCESS_ELEMENT); - - workDefinitionEClass = createEClass(WORK_DEFINITION); - createEReference(workDefinitionEClass, WORK_DEFINITION__LINKS_TO_PREDECESSORS); - createEReference(workDefinitionEClass, WORK_DEFINITION__LINKS_TO_SUCCESSORS); - createEAttribute(workDefinitionEClass, WORK_DEFINITION__NAME); - createEReference(workDefinitionEClass, WORK_DEFINITION__REQUESTS); - - workSequenceEClass = createEClass(WORK_SEQUENCE); - createEAttribute(workSequenceEClass, WORK_SEQUENCE__LINK_TYPE); - createEReference(workSequenceEClass, WORK_SEQUENCE__PREDECESSOR); - createEReference(workSequenceEClass, WORK_SEQUENCE__SUCCESSOR); - - guidanceEClass = createEClass(GUIDANCE); - createEAttribute(guidanceEClass, GUIDANCE__TEXT); - createEReference(guidanceEClass, GUIDANCE__ELEMENTS); - - processEClass = createEClass(PROCESS); - createEAttribute(processEClass, PROCESS__NAME); - createEReference(processEClass, PROCESS__PROCESS_ELEMENTS); - - requestEClass = createEClass(REQUEST); - createEAttribute(requestEClass, REQUEST__QUANTITY); - createEReference(requestEClass, REQUEST__TARGET); - - resourceEClass = createEClass(RESOURCE); - createEAttribute(resourceEClass, RESOURCE__QUANTITY); - createEAttribute(resourceEClass, RESOURCE__NAME); - - // Create enums - workSequenceTypeEEnum = createEEnum(WORK_SEQUENCE_TYPE); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Create type parameters - - // Set bounds for type parameters - - // Add supertypes to classes - workDefinitionEClass.getESuperTypes().add(this.getProcessElement()); - workSequenceEClass.getESuperTypes().add(this.getProcessElement()); - guidanceEClass.getESuperTypes().add(this.getProcessElement()); - resourceEClass.getESuperTypes().add(this.getProcessElement()); - - // Initialize classes, features, and operations; add parameters - initEClass(processElementEClass, ProcessElement.class, "ProcessElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(workDefinitionEClass, WorkDefinition.class, "WorkDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getWorkDefinition_LinksToPredecessors(), this.getWorkSequence(), this.getWorkSequence_Successor(), "linksToPredecessors", null, 0, -1, WorkDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getWorkDefinition_LinksToSuccessors(), this.getWorkSequence(), this.getWorkSequence_Predecessor(), "linksToSuccessors", null, 0, -1, WorkDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getWorkDefinition_Name(), ecorePackage.getEString(), "name", null, 1, 1, WorkDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getWorkDefinition_Requests(), this.getRequest(), null, "requests", null, 0, -1, WorkDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(workSequenceEClass, WorkSequence.class, "WorkSequence", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getWorkSequence_LinkType(), this.getWorkSequenceType(), "linkType", null, 1, 1, WorkSequence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getWorkSequence_Predecessor(), this.getWorkDefinition(), this.getWorkDefinition_LinksToSuccessors(), "predecessor", null, 1, 1, WorkSequence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getWorkSequence_Successor(), this.getWorkDefinition(), this.getWorkDefinition_LinksToPredecessors(), "successor", null, 1, 1, WorkSequence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(guidanceEClass, Guidance.class, "Guidance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getGuidance_Text(), ecorePackage.getEString(), "text", null, 1, 1, Guidance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getGuidance_Elements(), this.getProcessElement(), null, "elements", null, 0, -1, Guidance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(processEClass, simplepdl.Process.class, "Process", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getProcess_Name(), ecorePackage.getEString(), "name", null, 1, 1, simplepdl.Process.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getProcess_ProcessElements(), this.getProcessElement(), null, "processElements", null, 0, -1, simplepdl.Process.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(requestEClass, Request.class, "Request", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getRequest_Quantity(), ecorePackage.getEInt(), "quantity", null, 1, 1, Request.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getRequest_Target(), this.getResource(), null, "target", null, 1, 1, Request.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(resourceEClass, Resource.class, "Resource", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getResource_Quantity(), ecorePackage.getEInt(), "quantity", null, 1, 1, Resource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getResource_Name(), ecorePackage.getEString(), "name", null, 1, 1, Resource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - // Initialize enums and add enum literals - initEEnum(workSequenceTypeEEnum, WorkSequenceType.class, "WorkSequenceType"); - addEEnumLiteral(workSequenceTypeEEnum, WorkSequenceType.START_TO_START); - addEEnumLiteral(workSequenceTypeEEnum, WorkSequenceType.FINISH_TO_START); - addEEnumLiteral(workSequenceTypeEEnum, WorkSequenceType.START_TO_FINISH); - addEEnumLiteral(workSequenceTypeEEnum, WorkSequenceType.FINISH_TO_FINISH); - - // Create resource - createResource(eNS_URI); - } - -} //SimplepdlPackageImpl diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5f/f02b75389422001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/5f/f02b75389422001c17faa9b6b0561c0f deleted file mode 100644 index aaee8c6..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/5f/f02b75389422001c17faa9b6b0561c0f +++ /dev/null @@ -1,1542 +0,0 @@ - - - - SimplePDL.ecore - SimplePDL.genmodel - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - bold - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/61/90736fb33b28001c1451a142d5f09209 b/.metadata/.plugins/org.eclipse.core.resources/.history/61/90736fb33b28001c1451a142d5f09209 new file mode 100644 index 0000000..c5fad44 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/61/90736fb33b28001c1451a142d5f09209 @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/63/d05388e53428001c13dca9fa1eba29d5 b/.metadata/.plugins/org.eclipse.core.resources/.history/63/d05388e53428001c13dca9fa1eba29d5 new file mode 100644 index 0000000..87a9243 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/63/d05388e53428001c13dca9fa1eba29d5 @@ -0,0 +1,48 @@ +import 'SimplePDL.ecore' + +package simplepdl + +context Process +inv warningSeverity: false +inv withMessage('Explicit message in process ' + self.name + ' (withMessage)'): false + +context Process +inv validName('Invalid name: ' + self.name): + self.name.matches('[A-Za-z_][A-Za-z0-9_]*') + +context ProcessElement +def: process(): Process = + Process.allInstances() + ->select(p | p.processElements->includes(self)) + ->asSequence()->first() + +context WorkSequence +inv successorAndPredecessorInSameProcess('Activities not in the same process : ' + + self.predecessor.name + ' in ' + self.predecessor.process().name+ ' and ' + + self.successor.name + ' in ' + self.successor.process().name + ): + self.process() = self.successor.process() + and self.process() = self.predecessor.process() + +context Process +inv uniqNames: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w1, w2 | w1 = w2 or w1.name <> w2.name) + +context WorkSequence +inv notReflexive: self.predecessor <> self.successor + +context Process +inv nameMin2Char: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w | w.name.matches('..+')) + +context Process +inv weirdName: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w | not w.name.matches('([0-9]*|[a-zA-Z]*|_*)')) + +endpackage \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/64/108c00339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/64/108c00339822001c17faa9b6b0561c0f deleted file mode 100644 index f7efba5..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/64/108c00339822001c17faa9b6b0561c0f +++ /dev/null @@ -1,69 +0,0 @@ -/** - */ -package simplepdl; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Request'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link simplepdl.Request#getQuantity Quantity}
  • - *
  • {@link simplepdl.Request#getTarget Target}
  • - *
- * - * @see simplepdl.SimplepdlPackage#getRequest() - * @model - * @generated - */ -public interface Request extends EObject { - /** - * Returns the value of the 'Quantity' attribute. - * - * - * @return the value of the 'Quantity' attribute. - * @see #setQuantity(int) - * @see simplepdl.SimplepdlPackage#getRequest_Quantity() - * @model required="true" - * @generated - */ - int getQuantity(); - - /** - * Sets the value of the '{@link simplepdl.Request#getQuantity Quantity}' attribute. - * - * - * @param value the new value of the 'Quantity' attribute. - * @see #getQuantity() - * @generated - */ - void setQuantity(int value); - - /** - * Returns the value of the 'Target' reference. - * - * - * @return the value of the 'Target' reference. - * @see #setTarget(Resource) - * @see simplepdl.SimplepdlPackage#getRequest_Target() - * @model required="true" - * @generated - */ - Resource getTarget(); - - /** - * Sets the value of the '{@link simplepdl.Request#getTarget Target}' reference. - * - * - * @param value the new value of the 'Target' reference. - * @see #getTarget() - * @generated - */ - void setTarget(Resource value); - -} // Request diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/66/c03902339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/66/c03902339822001c17faa9b6b0561c0f deleted file mode 100644 index e53df0d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/66/c03902339822001c17faa9b6b0561c0f +++ /dev/null @@ -1,89 +0,0 @@ -/** - */ -package simplepdl; - -import org.eclipse.emf.common.util.EList; - -/** - * - * A representation of the model object 'Work Definition'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link simplepdl.WorkDefinition#getLinksToPredecessors Links To Predecessors}
  • - *
  • {@link simplepdl.WorkDefinition#getLinksToSuccessors Links To Successors}
  • - *
  • {@link simplepdl.WorkDefinition#getName Name}
  • - *
  • {@link simplepdl.WorkDefinition#getRequests Requests}
  • - *
- * - * @see simplepdl.SimplepdlPackage#getWorkDefinition() - * @model - * @generated - */ -public interface WorkDefinition extends ProcessElement { - /** - * Returns the value of the 'Links To Predecessors' reference list. - * The list contents are of type {@link simplepdl.WorkSequence}. - * It is bidirectional and its opposite is '{@link simplepdl.WorkSequence#getSuccessor Successor}'. - * - * - * @return the value of the 'Links To Predecessors' reference list. - * @see simplepdl.SimplepdlPackage#getWorkDefinition_LinksToPredecessors() - * @see simplepdl.WorkSequence#getSuccessor - * @model opposite="successor" - * @generated - */ - EList getLinksToPredecessors(); - - /** - * Returns the value of the 'Links To Successors' reference list. - * The list contents are of type {@link simplepdl.WorkSequence}. - * It is bidirectional and its opposite is '{@link simplepdl.WorkSequence#getPredecessor Predecessor}'. - * - * - * @return the value of the 'Links To Successors' reference list. - * @see simplepdl.SimplepdlPackage#getWorkDefinition_LinksToSuccessors() - * @see simplepdl.WorkSequence#getPredecessor - * @model opposite="predecessor" - * @generated - */ - EList getLinksToSuccessors(); - - /** - * Returns the value of the 'Name' attribute. - * - * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see simplepdl.SimplepdlPackage#getWorkDefinition_Name() - * @model required="true" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link simplepdl.WorkDefinition#getName Name}' attribute. - * - * - * @param value the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Returns the value of the 'Requests' reference list. - * The list contents are of type {@link simplepdl.Request}. - * - * - * @return the value of the 'Requests' reference list. - * @see simplepdl.SimplepdlPackage#getWorkDefinition_Requests() - * @model - * @generated - */ - EList getRequests(); - -} // WorkDefinition diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/69/50120ed49b22001c10fba84a9f2208e9 b/.metadata/.plugins/org.eclipse.core.resources/.history/69/50120ed49b22001c10fba84a9f2208e9 deleted file mode 100644 index e434be3..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/69/50120ed49b22001c10fba84a9f2208e9 +++ /dev/null @@ -1,489 +0,0 @@ -/** - */ -package simplepdl.impl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -import org.eclipse.emf.ecore.impl.EPackageImpl; - -import simplepdl.Guidance; -import simplepdl.ProcessElement; -import simplepdl.Request; -import simplepdl.Resource; -import simplepdl.SimplepdlFactory; -import simplepdl.SimplepdlPackage; -import simplepdl.WorkDefinition; -import simplepdl.WorkSequence; -import simplepdl.WorkSequenceType; - -/** - * - * An implementation of the model Package. - * - * @generated - */ -public class SimplepdlPackageImpl extends EPackageImpl implements SimplepdlPackage { - /** - * - * - * @generated - */ - private EClass processElementEClass = null; - - /** - * - * - * @generated - */ - private EClass workDefinitionEClass = null; - - /** - * - * - * @generated - */ - private EClass workSequenceEClass = null; - - /** - * - * - * @generated - */ - private EClass guidanceEClass = null; - - /** - * - * - * @generated - */ - private EClass processEClass = null; - - /** - * - * - * @generated - */ - private EClass requestEClass = null; - - /** - * - * - * @generated - */ - private EClass resourceEClass = null; - - /** - * - * - * @generated - */ - private EEnum workSequenceTypeEEnum = null; - - /** - * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - *

Note: the correct way to create the package is via the static - * factory method {@link #init init()}, which also performs - * initialization of the package, or returns the registered package, - * if one already exists. - * - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see simplepdl.SimplepdlPackage#eNS_URI - * @see #init() - * @generated - */ - private SimplepdlPackageImpl() { - super(eNS_URI, SimplepdlFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - * - *

This method is used to initialize {@link SimplepdlPackage#eINSTANCE} when that field is accessed. - * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static SimplepdlPackage init() { - if (isInited) return (SimplepdlPackage)EPackage.Registry.INSTANCE.getEPackage(SimplepdlPackage.eNS_URI); - - // Obtain or create and register package - Object registeredSimplepdlPackage = EPackage.Registry.INSTANCE.get(eNS_URI); - SimplepdlPackageImpl theSimplepdlPackage = registeredSimplepdlPackage instanceof SimplepdlPackageImpl ? (SimplepdlPackageImpl)registeredSimplepdlPackage : new SimplepdlPackageImpl(); - - isInited = true; - - // Create package meta-data objects - theSimplepdlPackage.createPackageContents(); - - // Initialize created meta-data - theSimplepdlPackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theSimplepdlPackage.freeze(); - - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(SimplepdlPackage.eNS_URI, theSimplepdlPackage); - return theSimplepdlPackage; - } - - /** - * - * - * @generated - */ - public EClass getProcessElement() { - return processElementEClass; - } - - /** - * - * - * @generated - */ - public EClass getWorkDefinition() { - return workDefinitionEClass; - } - - /** - * - * - * @generated - */ - public EReference getWorkDefinition_LinksToPredecessors() { - return (EReference)workDefinitionEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getWorkDefinition_LinksToSuccessors() { - return (EReference)workDefinitionEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getWorkDefinition_Name() { - return (EAttribute)workDefinitionEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getWorkDefinition_Requests() { - return (EReference)workDefinitionEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EClass getWorkSequence() { - return workSequenceEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getWorkSequence_LinkType() { - return (EAttribute)workSequenceEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getWorkSequence_Predecessor() { - return (EReference)workSequenceEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getWorkSequence_Successor() { - return (EReference)workSequenceEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getGuidance() { - return guidanceEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getGuidance_Text() { - return (EAttribute)guidanceEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getGuidance_Elements() { - return (EReference)guidanceEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getProcess() { - return processEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getProcess_Name() { - return (EAttribute)processEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getProcess_ProcessElements() { - return (EReference)processEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getRequest() { - return requestEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getRequest_Quantity() { - return (EAttribute)requestEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getRequest_Target() { - return (EReference)requestEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getResource() { - return resourceEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getResource_Quantity() { - return (EAttribute)resourceEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getResource_Name() { - return (EAttribute)resourceEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EEnum getWorkSequenceType() { - return workSequenceTypeEEnum; - } - - /** - * - * - * @generated - */ - public SimplepdlFactory getSimplepdlFactory() { - return (SimplepdlFactory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is - * guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - processElementEClass = createEClass(PROCESS_ELEMENT); - - workDefinitionEClass = createEClass(WORK_DEFINITION); - createEReference(workDefinitionEClass, WORK_DEFINITION__LINKS_TO_PREDECESSORS); - createEReference(workDefinitionEClass, WORK_DEFINITION__LINKS_TO_SUCCESSORS); - createEAttribute(workDefinitionEClass, WORK_DEFINITION__NAME); - createEReference(workDefinitionEClass, WORK_DEFINITION__REQUESTS); - - workSequenceEClass = createEClass(WORK_SEQUENCE); - createEAttribute(workSequenceEClass, WORK_SEQUENCE__LINK_TYPE); - createEReference(workSequenceEClass, WORK_SEQUENCE__PREDECESSOR); - createEReference(workSequenceEClass, WORK_SEQUENCE__SUCCESSOR); - - guidanceEClass = createEClass(GUIDANCE); - createEAttribute(guidanceEClass, GUIDANCE__TEXT); - createEReference(guidanceEClass, GUIDANCE__ELEMENTS); - - processEClass = createEClass(PROCESS); - createEAttribute(processEClass, PROCESS__NAME); - createEReference(processEClass, PROCESS__PROCESS_ELEMENTS); - - requestEClass = createEClass(REQUEST); - createEAttribute(requestEClass, REQUEST__QUANTITY); - createEReference(requestEClass, REQUEST__TARGET); - - resourceEClass = createEClass(RESOURCE); - createEAttribute(resourceEClass, RESOURCE__QUANTITY); - createEAttribute(resourceEClass, RESOURCE__NAME); - - // Create enums - workSequenceTypeEEnum = createEEnum(WORK_SEQUENCE_TYPE); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This - * method is guarded to have no affect on any invocation but its first. - * - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Create type parameters - - // Set bounds for type parameters - - // Add supertypes to classes - workDefinitionEClass.getESuperTypes().add(this.getProcessElement()); - workSequenceEClass.getESuperTypes().add(this.getProcessElement()); - guidanceEClass.getESuperTypes().add(this.getProcessElement()); - resourceEClass.getESuperTypes().add(this.getProcessElement()); - - // Initialize classes, features, and operations; add parameters - initEClass(processElementEClass, ProcessElement.class, "ProcessElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - - initEClass(workDefinitionEClass, WorkDefinition.class, "WorkDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getWorkDefinition_LinksToPredecessors(), this.getWorkSequence(), this.getWorkSequence_Successor(), "linksToPredecessors", null, 0, -1, WorkDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getWorkDefinition_LinksToSuccessors(), this.getWorkSequence(), this.getWorkSequence_Predecessor(), "linksToSuccessors", null, 0, -1, WorkDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getWorkDefinition_Name(), ecorePackage.getEString(), "name", null, 1, 1, WorkDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getWorkDefinition_Requests(), this.getRequest(), null, "requests", null, 0, -1, WorkDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(workSequenceEClass, WorkSequence.class, "WorkSequence", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getWorkSequence_LinkType(), this.getWorkSequenceType(), "linkType", null, 1, 1, WorkSequence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getWorkSequence_Predecessor(), this.getWorkDefinition(), this.getWorkDefinition_LinksToSuccessors(), "predecessor", null, 1, 1, WorkSequence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getWorkSequence_Successor(), this.getWorkDefinition(), this.getWorkDefinition_LinksToPredecessors(), "successor", null, 1, 1, WorkSequence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(guidanceEClass, Guidance.class, "Guidance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getGuidance_Text(), ecorePackage.getEString(), "text", null, 1, 1, Guidance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getGuidance_Elements(), this.getProcessElement(), null, "elements", null, 0, -1, Guidance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(processEClass, simplepdl.Process.class, "Process", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getProcess_Name(), ecorePackage.getEString(), "name", null, 1, 1, simplepdl.Process.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getProcess_ProcessElements(), this.getProcessElement(), null, "processElements", null, 0, -1, simplepdl.Process.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(requestEClass, Request.class, "Request", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getRequest_Quantity(), ecorePackage.getEInt(), "quantity", null, 1, 1, Request.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getRequest_Target(), this.getResource(), null, "target", null, 1, 1, Request.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(resourceEClass, Resource.class, "Resource", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getResource_Quantity(), ecorePackage.getEInt(), "quantity", null, 1, 1, Resource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getResource_Name(), ecorePackage.getEString(), "name", null, 1, 1, Resource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - // Initialize enums and add enum literals - initEEnum(workSequenceTypeEEnum, WorkSequenceType.class, "WorkSequenceType"); - addEEnumLiteral(workSequenceTypeEEnum, WorkSequenceType.START_TO_START); - addEEnumLiteral(workSequenceTypeEEnum, WorkSequenceType.FINISH_TO_START); - addEEnumLiteral(workSequenceTypeEEnum, WorkSequenceType.START_TO_FINISH); - addEEnumLiteral(workSequenceTypeEEnum, WorkSequenceType.FINISH_TO_FINISH); - - // Create resource - createResource(eNS_URI); - } - -} //SimplepdlPackageImpl diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7/309232f79922001c1dcfb9656cd69315 b/.metadata/.plugins/org.eclipse.core.resources/.history/7/309232f79922001c1dcfb9656cd69315 deleted file mode 100644 index dcf0d50..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7/309232f79922001c1dcfb9656cd69315 +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/74/f0d15bee3728001c1310d5f213a964e6 b/.metadata/.plugins/org.eclipse.core.resources/.history/74/f0d15bee3728001c1310d5f213a964e6 new file mode 100644 index 0000000..530148c --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/74/f0d15bee3728001c1310d5f213a964e6 @@ -0,0 +1,85 @@ +package simplepdl.manip; + +import java.io.IOException; +import java.util.Collections; +import java.util.Map; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; + +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlFactory; +import simplepdl.SimplepdlPackage; + +public class SimplePDLCreator { + + public static void main(String[] args) { + + // Charger le package SimplePDL afin de l'enregistrer dans le registre d'Eclipse. + SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE; + + // Enregistrer l'extension ".xmi" comme devant être ouverte à + // l'aide d'un objet "XMIResourceFactoryImpl" + Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE; + Map m = reg.getExtensionToFactoryMap(); + m.put("xmi", new XMIResourceFactoryImpl()); + + // Créer un objet resourceSetImpl qui contiendra une ressource EMF (le modèle) + ResourceSet resSet = new ResourceSetImpl(); + + // Définir la ressource (le modèle) + URI modelURI = URI.createURI("models/SimplePDLCreator_Created_Process.xmi"); + Resource resource = resSet.createResource(modelURI); + + // La fabrique pour fabriquer les éléments de SimplePDL + SimplepdlFactory myFactory = SimplepdlFactory.eINSTANCE; + + // Créer un élément Process + Process process = myFactory.createProcess(); + process.setName("Mon premier processus"); + + // Ajouter le Process dans le modèle + resource.getContents().add(process); + + // Ajouter deux WorkDefinitions + WorkDefinition wd1 = myFactory.createWorkDefinition(); + wd1.setName("Ma première WorkDefinition, quelle émotion (ntm fdp)"); + + WorkDefinition wd2 = myFactory.createWorkDefinition(); + wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); + + process.getProcessElements().add(wd1); + process.getProcessElements().add(wd2); + + // Ajouter une WorkSequence entre les deux WorkDefinitions + WorkSequence seq = myFactory.createWorkSequence(); + seq.setPredecessor(wd1); + seq.setSuccessor(wd2); + seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); + + process.getProcessElements().add(seq); + + // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions + WorkSequence seq2 = myFactory.createWorkSequence(); + seq2.setPredecessor(wd1); + seq2.setSuccessor(wd2); + seq2.setLinkType(WorkSequenceType.START_TO_START); + + process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a5/b02913339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/7a/a07a42813828001c1310d5f213a964e6 similarity index 100% rename from .metadata/.plugins/org.eclipse.core.resources/.history/a5/b02913339822001c17faa9b6b0561c0f rename to .metadata/.plugins/org.eclipse.core.resources/.history/7a/a07a42813828001c1310d5f213a964e6 diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7c/e039bf7e3228001c13dca9fa1eba29d5 b/.metadata/.plugins/org.eclipse.core.resources/.history/7c/e039bf7e3228001c13dca9fa1eba29d5 new file mode 100644 index 0000000..381a3d8 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/7c/e039bf7e3228001c13dca9fa1eba29d5 @@ -0,0 +1,49 @@ +import 'SimplePDL.ecore' + +package simplepdl + +context Process +inv warningSeverity: false +inv withMessage('Explicit message in process ' + self.name + ' (withMessage)'): false +--inv errorSeverity: null + +context Process +inv validName('Invalid name: ' + self.name): + self.name.matches('[A-Za-z_][A-Za-z0-9_]*') + +context ProcessElement +def: process(): Process = + Process.allInstances() + ->select(p | p.processElements->includes(self)) + ->asSequence()->first() + +context WorkSequence +inv successorAndPredecessorInSameProcess('Activities not in the same process : ' + + self.predecessor.name + ' in ' + self.predecessor.process().name+ ' and ' + + self.successor.name + ' in ' + self.successor.process().name + ): + self.process() = self.successor.process() + and self.process() = self.predecessor.process() + +context Process +inv uniqNames: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w1, w2 | w1 = w2 or w1.name <> w2.name) + +context WorkSequence +inv notReflexive: self.predecessor <> self.successor + +context Process +inv nameMin2Char: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w | w.name.matches('..+')) + +context Process +inv weirdName: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w | not w.name.matches('([0-9]*|[a-zA-Z]*|_*)')) + +endpackage \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7f/b069ee4f9c22001c10c68e4a8bb21dd1 b/.metadata/.plugins/org.eclipse.core.resources/.history/7f/b069ee4f9c22001c10c68e4a8bb21dd1 deleted file mode 100644 index 680995f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7f/b069ee4f9c22001c10c68e4a8bb21dd1 +++ /dev/null @@ -1,185 +0,0 @@ -/** - */ -package simplepdl.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ViewerNotification; - -import simplepdl.SimplepdlPackage; -import simplepdl.WorkSequence; -import simplepdl.WorkSequenceType; - -/** - * This is the item provider adapter for a {@link simplepdl.WorkSequence} object. - * - * - * @generated - */ -public class WorkSequenceItemProvider extends ProcessElementItemProvider { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public WorkSequenceItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addLinkTypePropertyDescriptor(object); - addPredecessorPropertyDescriptor(object); - addSuccessorPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Link Type feature. - * - * - * @generated - */ - protected void addLinkTypePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_linkType_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_linkType_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__LINK_TYPE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Predecessor feature. - * - * - * @generated - */ - protected void addPredecessorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_predecessor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_predecessor_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__PREDECESSOR, - true, - false, - true, - null, - null, - null)); - } - - /** - * This adds a property descriptor for the Successor feature. - * - * - * @generated - */ - protected void addSuccessorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_successor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_successor_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__SUCCESSOR, - true, - false, - true, - null, - null, - null)); - } - - /** - * This returns WorkSequence.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/WorkSequence")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - WorkSequence ws = (WorkSequence) object; - WorkSequenceType labelValue = ws.getLinkType(); - String label = "--" + (labelValue == null ? "?" : labelValue.toString()) + "-->"; - String previous = ws.getPredecessor() == null ? "?" : ws.getPredecessor().getName(); - String next = ws.getSuccessor() == null ? "?" : ws.getSuccessor().getName(); - return label == null || label.length() == 0 ? - getString("_UI_WorkSequence_type") : - getString("_UI_WorkSequence_type") + " " + previous + " " + label + " " + next; - } - - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(WorkSequence.class)) { - case SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR: - case SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR: - case SimplepdlPackage.WORK_SEQUENCE__LINK_TYPE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8/005f34d49b22001c10fba84a9f2208e9 b/.metadata/.plugins/org.eclipse.core.resources/.history/8/005f34d49b22001c10fba84a9f2208e9 deleted file mode 100644 index e53df0d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/8/005f34d49b22001c10fba84a9f2208e9 +++ /dev/null @@ -1,89 +0,0 @@ -/** - */ -package simplepdl; - -import org.eclipse.emf.common.util.EList; - -/** - * - * A representation of the model object 'Work Definition'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link simplepdl.WorkDefinition#getLinksToPredecessors Links To Predecessors}
  • - *
  • {@link simplepdl.WorkDefinition#getLinksToSuccessors Links To Successors}
  • - *
  • {@link simplepdl.WorkDefinition#getName Name}
  • - *
  • {@link simplepdl.WorkDefinition#getRequests Requests}
  • - *
- * - * @see simplepdl.SimplepdlPackage#getWorkDefinition() - * @model - * @generated - */ -public interface WorkDefinition extends ProcessElement { - /** - * Returns the value of the 'Links To Predecessors' reference list. - * The list contents are of type {@link simplepdl.WorkSequence}. - * It is bidirectional and its opposite is '{@link simplepdl.WorkSequence#getSuccessor Successor}'. - * - * - * @return the value of the 'Links To Predecessors' reference list. - * @see simplepdl.SimplepdlPackage#getWorkDefinition_LinksToPredecessors() - * @see simplepdl.WorkSequence#getSuccessor - * @model opposite="successor" - * @generated - */ - EList getLinksToPredecessors(); - - /** - * Returns the value of the 'Links To Successors' reference list. - * The list contents are of type {@link simplepdl.WorkSequence}. - * It is bidirectional and its opposite is '{@link simplepdl.WorkSequence#getPredecessor Predecessor}'. - * - * - * @return the value of the 'Links To Successors' reference list. - * @see simplepdl.SimplepdlPackage#getWorkDefinition_LinksToSuccessors() - * @see simplepdl.WorkSequence#getPredecessor - * @model opposite="predecessor" - * @generated - */ - EList getLinksToSuccessors(); - - /** - * Returns the value of the 'Name' attribute. - * - * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see simplepdl.SimplepdlPackage#getWorkDefinition_Name() - * @model required="true" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link simplepdl.WorkDefinition#getName Name}' attribute. - * - * - * @param value the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Returns the value of the 'Requests' reference list. - * The list contents are of type {@link simplepdl.Request}. - * - * - * @return the value of the 'Requests' reference list. - * @see simplepdl.SimplepdlPackage#getWorkDefinition_Requests() - * @model - * @generated - */ - EList getRequests(); - -} // WorkDefinition diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8/607ceef19622001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/8/607ceef19622001c17faa9b6b0561c0f deleted file mode 100644 index 6139856..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/8/607ceef19622001c17faa9b6b0561c0f +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/90/e0e3bbbd9d22001c118def180044d1da b/.metadata/.plugins/org.eclipse.core.resources/.history/84/d03cfc073d28001c1804aa3181391e8a similarity index 65% rename from .metadata/.plugins/org.eclipse.core.resources/.history/90/e0e3bbbd9d22001c118def180044d1da rename to .metadata/.plugins/org.eclipse.core.resources/.history/84/d03cfc073d28001c1804aa3181391e8a index 64711a0..63d0b45 100644 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/90/e0e3bbbd9d22001c118def180044d1da +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/84/d03cfc073d28001c1804aa3181391e8a @@ -1,6 +1,6 @@ /** */ -package simplepdl.provider; +package petrinet.provider; import java.util.Collection; @@ -22,16 +22,16 @@ import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ItemProviderAdapter; import org.eclipse.emf.edit.provider.ViewerNotification; -import simplepdl.Request; -import simplepdl.SimplepdlPackage; +import petrinet.Arc; +import petrinet.PetrinetPackage; /** - * This is the item provider adapter for a {@link simplepdl.Request} object. + * This is the item provider adapter for a {@link petrinet.Arc} object. * * * @generated */ -public class RequestItemProvider +public class ArcItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, @@ -45,7 +45,7 @@ public class RequestItemProvider * * @generated */ - public RequestItemProvider(AdapterFactory adapterFactory) { + public ArcItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } @@ -60,26 +60,27 @@ public class RequestItemProvider if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); - addQuantityPropertyDescriptor(object); - addTargetPropertyDescriptor(object); + addPoidsPropertyDescriptor(object); + addSortantPropertyDescriptor(object); + addCiblePropertyDescriptor(object); } return itemPropertyDescriptors; } /** - * This adds a property descriptor for the Quantity feature. + * This adds a property descriptor for the Poids feature. * * * @generated */ - protected void addQuantityPropertyDescriptor(Object object) { + protected void addPoidsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_Request_quantity_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Request_quantity_feature", "_UI_Request_type"), - SimplepdlPackage.Literals.REQUEST__QUANTITY, + getString("_UI_Arc_poids_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arc_poids_feature", "_UI_Arc_type"), + PetrinetPackage.Literals.ARC__POIDS, true, false, false, @@ -89,19 +90,41 @@ public class RequestItemProvider } /** - * This adds a property descriptor for the Target feature. + * This adds a property descriptor for the Sortant feature. * * * @generated */ - protected void addTargetPropertyDescriptor(Object object) { + protected void addSortantPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_Request_target_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Request_target_feature", "_UI_Request_type"), - SimplepdlPackage.Literals.REQUEST__TARGET, + getString("_UI_Arc_sortant_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arc_sortant_feature", "_UI_Arc_type"), + PetrinetPackage.Literals.ARC__SORTANT, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Cible feature. + * + * + * @generated + */ + protected void addCiblePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Arc_cible_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arc_cible_feature", "_UI_Arc_type"), + PetrinetPackage.Literals.ARC__CIBLE, true, false, true, @@ -111,14 +134,14 @@ public class RequestItemProvider } /** - * This returns Request.gif. + * This returns Arc.gif. * * * @generated */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/Request")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/Arc")); } /** @@ -129,8 +152,12 @@ public class RequestItemProvider */ @Override public String getText(Object object) { - Request request = (Request)object; - return getString("_UI_Request_type") + " - " + request.getQuantity() + "-> " + request.getTarget().getName(); + boolean sortant = ((Arc)object).isSortant(); + int poids = ((Arc)object).getPoids(); + String cible = ((Arc)object).getCible().getName(); + return sortant ? + "--" + poids + "-->" + cible : + "<--" + poids + "--" + cible; } @@ -145,8 +172,9 @@ public class RequestItemProvider public void notifyChanged(Notification notification) { updateChildren(notification); - switch (notification.getFeatureID(Request.class)) { - case SimplepdlPackage.REQUEST__QUANTITY: + switch (notification.getFeatureID(Arc.class)) { + case PetrinetPackage.ARC__POIDS: + case PetrinetPackage.ARC__SORTANT: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } @@ -173,7 +201,7 @@ public class RequestItemProvider */ @Override public ResourceLocator getResourceLocator() { - return SimplePDLEditPlugin.INSTANCE; + return PetriNetEditPlugin.INSTANCE; } } diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/86/f0ae02339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/86/f0ae02339822001c17faa9b6b0561c0f deleted file mode 100644 index 51755aa..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/86/f0ae02339822001c17faa9b6b0561c0f +++ /dev/null @@ -1,98 +0,0 @@ -/** - */ -package simplepdl; - - -/** - * - * A representation of the model object 'Work Sequence'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link simplepdl.WorkSequence#getLinkType Link Type}
  • - *
  • {@link simplepdl.WorkSequence#getPredecessor Predecessor}
  • - *
  • {@link simplepdl.WorkSequence#getSuccessor Successor}
  • - *
- * - * @see simplepdl.SimplepdlPackage#getWorkSequence() - * @model - * @generated - */ -public interface WorkSequence extends ProcessElement { - /** - * Returns the value of the 'Link Type' attribute. - * The literals are from the enumeration {@link simplepdl.WorkSequenceType}. - * - * - * @return the value of the 'Link Type' attribute. - * @see simplepdl.WorkSequenceType - * @see #setLinkType(WorkSequenceType) - * @see simplepdl.SimplepdlPackage#getWorkSequence_LinkType() - * @model required="true" - * @generated - */ - WorkSequenceType getLinkType(); - - /** - * Sets the value of the '{@link simplepdl.WorkSequence#getLinkType Link Type}' attribute. - * - * - * @param value the new value of the 'Link Type' attribute. - * @see simplepdl.WorkSequenceType - * @see #getLinkType() - * @generated - */ - void setLinkType(WorkSequenceType value); - - /** - * Returns the value of the 'Predecessor' reference. - * It is bidirectional and its opposite is '{@link simplepdl.WorkDefinition#getLinksToSuccessors Links To Successors}'. - * - * - * @return the value of the 'Predecessor' reference. - * @see #setPredecessor(WorkDefinition) - * @see simplepdl.SimplepdlPackage#getWorkSequence_Predecessor() - * @see simplepdl.WorkDefinition#getLinksToSuccessors - * @model opposite="linksToSuccessors" required="true" - * @generated - */ - WorkDefinition getPredecessor(); - - /** - * Sets the value of the '{@link simplepdl.WorkSequence#getPredecessor Predecessor}' reference. - * - * - * @param value the new value of the 'Predecessor' reference. - * @see #getPredecessor() - * @generated - */ - void setPredecessor(WorkDefinition value); - - /** - * Returns the value of the 'Successor' reference. - * It is bidirectional and its opposite is '{@link simplepdl.WorkDefinition#getLinksToPredecessors Links To Predecessors}'. - * - * - * @return the value of the 'Successor' reference. - * @see #setSuccessor(WorkDefinition) - * @see simplepdl.SimplepdlPackage#getWorkSequence_Successor() - * @see simplepdl.WorkDefinition#getLinksToPredecessors - * @model opposite="linksToPredecessors" required="true" - * @generated - */ - WorkDefinition getSuccessor(); - - /** - * Sets the value of the '{@link simplepdl.WorkSequence#getSuccessor Successor}' reference. - * - * - * @param value the new value of the 'Successor' reference. - * @see #getSuccessor() - * @generated - */ - void setSuccessor(WorkDefinition value); - -} // WorkSequence diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/89/a09faa009b22001c10fba84a9f2208e9 b/.metadata/.plugins/org.eclipse.core.resources/.history/89/a09faa009b22001c10fba84a9f2208e9 deleted file mode 100644 index b932dcf..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/89/a09faa009b22001c10fba84a9f2208e9 +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8d/30cf1d2b9822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/8d/30cf1d2b9822001c17faa9b6b0561c0f deleted file mode 100644 index 6008938..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/8d/30cf1d2b9822001c17faa9b6b0561c0f +++ /dev/null @@ -1,196 +0,0 @@ -/** - */ -package simplepdl.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; - -import org.eclipse.emf.ecore.impl.EFactoryImpl; - -import org.eclipse.emf.ecore.plugin.EcorePlugin; - -import simplepdl.Guidance; -import simplepdl.ProcessElement; -import simplepdl.SimplepdlFactory; -import simplepdl.SimplepdlPackage; -import simplepdl.WorkDefinition; -import simplepdl.WorkSequence; -import simplepdl.WorkSequenceType; - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class SimplepdlFactoryImpl extends EFactoryImpl implements SimplepdlFactory { - /** - * Creates the default factory implementation. - * - * - * @generated - */ - public static SimplepdlFactory init() { - try { - SimplepdlFactory theSimplepdlFactory = (SimplepdlFactory)EPackage.Registry.INSTANCE.getEFactory(SimplepdlPackage.eNS_URI); - if (theSimplepdlFactory != null) { - return theSimplepdlFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new SimplepdlFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * - * @generated - */ - public SimplepdlFactoryImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case SimplepdlPackage.PROCESS_ELEMENT: return createProcessElement(); - case SimplepdlPackage.WORK_DEFINITION: return createWorkDefinition(); - case SimplepdlPackage.WORK_SEQUENCE: return createWorkSequence(); - case SimplepdlPackage.GUIDANCE: return createGuidance(); - case SimplepdlPackage.PROCESS: return createProcess(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - @Override - public Object createFromString(EDataType eDataType, String initialValue) { - switch (eDataType.getClassifierID()) { - case SimplepdlPackage.WORK_SEQUENCE_TYPE: - return createWorkSequenceTypeFromString(eDataType, initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - @Override - public String convertToString(EDataType eDataType, Object instanceValue) { - switch (eDataType.getClassifierID()) { - case SimplepdlPackage.WORK_SEQUENCE_TYPE: - return convertWorkSequenceTypeToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public ProcessElement createProcessElement() { - ProcessElementImpl processElement = new ProcessElementImpl(); - return processElement; - } - - /** - * - * - * @generated - */ - public WorkDefinition createWorkDefinition() { - WorkDefinitionImpl workDefinition = new WorkDefinitionImpl(); - return workDefinition; - } - - /** - * - * - * @generated - */ - public WorkSequence createWorkSequence() { - WorkSequenceImpl workSequence = new WorkSequenceImpl(); - return workSequence; - } - - /** - * - * - * @generated - */ - public Guidance createGuidance() { - GuidanceImpl guidance = new GuidanceImpl(); - return guidance; - } - - /** - * - * - * @generated - */ - public simplepdl.Process createProcess() { - ProcessImpl process = new ProcessImpl(); - return process; - } - - /** - * - * - * @generated - */ - public WorkSequenceType createWorkSequenceTypeFromString(EDataType eDataType, String initialValue) { - WorkSequenceType result = WorkSequenceType.get(initialValue); - if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); - return result; - } - - /** - * - * - * @generated - */ - public String convertWorkSequenceTypeToString(EDataType eDataType, Object instanceValue) { - return instanceValue == null ? null : instanceValue.toString(); - } - - /** - * - * - * @generated - */ - public SimplepdlPackage getSimplepdlPackage() { - return (SimplepdlPackage)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - @Deprecated - public static SimplepdlPackage getPackage() { - return SimplepdlPackage.eINSTANCE; - } - -} //SimplepdlFactoryImpl diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8f/70acb8283228001c1e2bddb0f1b33239 b/.metadata/.plugins/org.eclipse.core.resources/.history/8f/70acb8283228001c1e2bddb0f1b33239 new file mode 100644 index 0000000..53f300f --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/8f/70acb8283228001c1e2bddb0f1b33239 @@ -0,0 +1,319 @@ + + + + developpement.simplepdl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + bold + + + + + + + + + + + bold + + + + + + + + + + + bold + + + + + + + + + + + bold + + + + + + + + + + + bold + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/9/60b6a45c9622001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/9/60b6a45c9622001c17faa9b6b0561c0f deleted file mode 100644 index 86958ef..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.history/9/60b6a45c9622001c17faa9b6b0561c0f and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/91/505cf8ce9422001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/91/505cf8ce9422001c17faa9b6b0561c0f deleted file mode 100644 index 665bc90..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/91/505cf8ce9422001c17faa9b6b0561c0f +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/98/400101339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/98/400101339822001c17faa9b6b0561c0f deleted file mode 100644 index 5947a8a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/98/400101339822001c17faa9b6b0561c0f +++ /dev/null @@ -1,68 +0,0 @@ -/** - */ -package simplepdl; - - -/** - * - * A representation of the model object 'Resource'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link simplepdl.Resource#getQuantity Quantity}
  • - *
  • {@link simplepdl.Resource#getName Name}
  • - *
- * - * @see simplepdl.SimplepdlPackage#getResource() - * @model - * @generated - */ -public interface Resource extends ProcessElement { - /** - * Returns the value of the 'Quantity' attribute. - * - * - * @return the value of the 'Quantity' attribute. - * @see #setQuantity(int) - * @see simplepdl.SimplepdlPackage#getResource_Quantity() - * @model required="true" - * @generated - */ - int getQuantity(); - - /** - * Sets the value of the '{@link simplepdl.Resource#getQuantity Quantity}' attribute. - * - * - * @param value the new value of the 'Quantity' attribute. - * @see #getQuantity() - * @generated - */ - void setQuantity(int value); - - /** - * Returns the value of the 'Name' attribute. - * - * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see simplepdl.SimplepdlPackage#getResource_Name() - * @model required="true" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link simplepdl.Resource#getName Name}' attribute. - * - * - * @param value the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - -} // Resource diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/98/a0eb01339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/98/a0eb01339822001c17faa9b6b0561c0f deleted file mode 100644 index 3ad0196..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/98/a0eb01339822001c17faa9b6b0561c0f +++ /dev/null @@ -1,872 +0,0 @@ -/** - */ -package simplepdl; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; - -/** - * - * The Package for the model. - * It contains accessors for the meta objects to represent - *
    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each operation of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * @see simplepdl.SimplepdlFactory - * @model kind="package" - * @generated - */ -public interface SimplepdlPackage extends EPackage { - /** - * The package name. - * - * - * @generated - */ - String eNAME = "simplepdl"; - - /** - * The package namespace URI. - * - * - * @generated - */ - String eNS_URI = "http://simplepdl"; - - /** - * The package namespace name. - * - * - * @generated - */ - String eNS_PREFIX = "simplepdl"; - - /** - * The singleton instance of the package. - * - * - * @generated - */ - SimplepdlPackage eINSTANCE = simplepdl.impl.SimplepdlPackageImpl.init(); - - /** - * The meta object id for the '{@link simplepdl.impl.ProcessElementImpl Process Element}' class. - * - * - * @see simplepdl.impl.ProcessElementImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getProcessElement() - * @generated - */ - int PROCESS_ELEMENT = 0; - - /** - * The number of structural features of the 'Process Element' class. - * - * - * @generated - * @ordered - */ - int PROCESS_ELEMENT_FEATURE_COUNT = 0; - - /** - * The number of operations of the 'Process Element' class. - * - * - * @generated - * @ordered - */ - int PROCESS_ELEMENT_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link simplepdl.impl.WorkDefinitionImpl Work Definition}' class. - * - * - * @see simplepdl.impl.WorkDefinitionImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getWorkDefinition() - * @generated - */ - int WORK_DEFINITION = 1; - - /** - * The feature id for the 'Links To Predecessors' reference list. - * - * - * @generated - * @ordered - */ - int WORK_DEFINITION__LINKS_TO_PREDECESSORS = PROCESS_ELEMENT_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Links To Successors' reference list. - * - * - * @generated - * @ordered - */ - int WORK_DEFINITION__LINKS_TO_SUCCESSORS = PROCESS_ELEMENT_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int WORK_DEFINITION__NAME = PROCESS_ELEMENT_FEATURE_COUNT + 2; - - /** - * The feature id for the 'Requests' reference list. - * - * - * @generated - * @ordered - */ - int WORK_DEFINITION__REQUESTS = PROCESS_ELEMENT_FEATURE_COUNT + 3; - - /** - * The number of structural features of the 'Work Definition' class. - * - * - * @generated - * @ordered - */ - int WORK_DEFINITION_FEATURE_COUNT = PROCESS_ELEMENT_FEATURE_COUNT + 4; - - /** - * The number of operations of the 'Work Definition' class. - * - * - * @generated - * @ordered - */ - int WORK_DEFINITION_OPERATION_COUNT = PROCESS_ELEMENT_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link simplepdl.impl.WorkSequenceImpl Work Sequence}' class. - * - * - * @see simplepdl.impl.WorkSequenceImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getWorkSequence() - * @generated - */ - int WORK_SEQUENCE = 2; - - /** - * The feature id for the 'Link Type' attribute. - * - * - * @generated - * @ordered - */ - int WORK_SEQUENCE__LINK_TYPE = PROCESS_ELEMENT_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Predecessor' reference. - * - * - * @generated - * @ordered - */ - int WORK_SEQUENCE__PREDECESSOR = PROCESS_ELEMENT_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Successor' reference. - * - * - * @generated - * @ordered - */ - int WORK_SEQUENCE__SUCCESSOR = PROCESS_ELEMENT_FEATURE_COUNT + 2; - - /** - * The number of structural features of the 'Work Sequence' class. - * - * - * @generated - * @ordered - */ - int WORK_SEQUENCE_FEATURE_COUNT = PROCESS_ELEMENT_FEATURE_COUNT + 3; - - /** - * The number of operations of the 'Work Sequence' class. - * - * - * @generated - * @ordered - */ - int WORK_SEQUENCE_OPERATION_COUNT = PROCESS_ELEMENT_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link simplepdl.impl.GuidanceImpl Guidance}' class. - * - * - * @see simplepdl.impl.GuidanceImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getGuidance() - * @generated - */ - int GUIDANCE = 3; - - /** - * The feature id for the 'Text' attribute. - * - * - * @generated - * @ordered - */ - int GUIDANCE__TEXT = PROCESS_ELEMENT_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Elements' reference list. - * - * - * @generated - * @ordered - */ - int GUIDANCE__ELEMENTS = PROCESS_ELEMENT_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Guidance' class. - * - * - * @generated - * @ordered - */ - int GUIDANCE_FEATURE_COUNT = PROCESS_ELEMENT_FEATURE_COUNT + 2; - - /** - * The number of operations of the 'Guidance' class. - * - * - * @generated - * @ordered - */ - int GUIDANCE_OPERATION_COUNT = PROCESS_ELEMENT_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link simplepdl.impl.ProcessImpl Process}' class. - * - * - * @see simplepdl.impl.ProcessImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getProcess() - * @generated - */ - int PROCESS = 4; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int PROCESS__NAME = 0; - - /** - * The feature id for the 'Process Elements' containment reference list. - * - * - * @generated - * @ordered - */ - int PROCESS__PROCESS_ELEMENTS = 1; - - /** - * The number of structural features of the 'Process' class. - * - * - * @generated - * @ordered - */ - int PROCESS_FEATURE_COUNT = 2; - - /** - * The number of operations of the 'Process' class. - * - * - * @generated - * @ordered - */ - int PROCESS_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link simplepdl.impl.RequestImpl Request}' class. - * - * - * @see simplepdl.impl.RequestImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getRequest() - * @generated - */ - int REQUEST = 5; - - /** - * The feature id for the 'Quantity' attribute. - * - * - * @generated - * @ordered - */ - int REQUEST__QUANTITY = 0; - - /** - * The feature id for the 'Target' reference. - * - * - * @generated - * @ordered - */ - int REQUEST__TARGET = 1; - - /** - * The number of structural features of the 'Request' class. - * - * - * @generated - * @ordered - */ - int REQUEST_FEATURE_COUNT = 2; - - /** - * The number of operations of the 'Request' class. - * - * - * @generated - * @ordered - */ - int REQUEST_OPERATION_COUNT = 0; - - /** - * The meta object id for the '{@link simplepdl.impl.ResourceImpl Resource}' class. - * - * - * @see simplepdl.impl.ResourceImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getResource() - * @generated - */ - int RESOURCE = 6; - - /** - * The feature id for the 'Quantity' attribute. - * - * - * @generated - * @ordered - */ - int RESOURCE__QUANTITY = PROCESS_ELEMENT_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int RESOURCE__NAME = PROCESS_ELEMENT_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Resource' class. - * - * - * @generated - * @ordered - */ - int RESOURCE_FEATURE_COUNT = PROCESS_ELEMENT_FEATURE_COUNT + 2; - - /** - * The number of operations of the 'Resource' class. - * - * - * @generated - * @ordered - */ - int RESOURCE_OPERATION_COUNT = PROCESS_ELEMENT_OPERATION_COUNT + 0; - - /** - * The meta object id for the '{@link simplepdl.WorkSequenceType Work Sequence Type}' enum. - * - * - * @see simplepdl.WorkSequenceType - * @see simplepdl.impl.SimplepdlPackageImpl#getWorkSequenceType() - * @generated - */ - int WORK_SEQUENCE_TYPE = 7; - - - /** - * Returns the meta object for class '{@link simplepdl.ProcessElement Process Element}'. - * - * - * @return the meta object for class 'Process Element'. - * @see simplepdl.ProcessElement - * @generated - */ - EClass getProcessElement(); - - /** - * Returns the meta object for class '{@link simplepdl.WorkDefinition Work Definition}'. - * - * - * @return the meta object for class 'Work Definition'. - * @see simplepdl.WorkDefinition - * @generated - */ - EClass getWorkDefinition(); - - /** - * Returns the meta object for the reference list '{@link simplepdl.WorkDefinition#getLinksToPredecessors Links To Predecessors}'. - * - * - * @return the meta object for the reference list 'Links To Predecessors'. - * @see simplepdl.WorkDefinition#getLinksToPredecessors() - * @see #getWorkDefinition() - * @generated - */ - EReference getWorkDefinition_LinksToPredecessors(); - - /** - * Returns the meta object for the reference list '{@link simplepdl.WorkDefinition#getLinksToSuccessors Links To Successors}'. - * - * - * @return the meta object for the reference list 'Links To Successors'. - * @see simplepdl.WorkDefinition#getLinksToSuccessors() - * @see #getWorkDefinition() - * @generated - */ - EReference getWorkDefinition_LinksToSuccessors(); - - /** - * Returns the meta object for the attribute '{@link simplepdl.WorkDefinition#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see simplepdl.WorkDefinition#getName() - * @see #getWorkDefinition() - * @generated - */ - EAttribute getWorkDefinition_Name(); - - /** - * Returns the meta object for the reference list '{@link simplepdl.WorkDefinition#getRequests Requests}'. - * - * - * @return the meta object for the reference list 'Requests'. - * @see simplepdl.WorkDefinition#getRequests() - * @see #getWorkDefinition() - * @generated - */ - EReference getWorkDefinition_Requests(); - - /** - * Returns the meta object for class '{@link simplepdl.WorkSequence Work Sequence}'. - * - * - * @return the meta object for class 'Work Sequence'. - * @see simplepdl.WorkSequence - * @generated - */ - EClass getWorkSequence(); - - /** - * Returns the meta object for the attribute '{@link simplepdl.WorkSequence#getLinkType Link Type}'. - * - * - * @return the meta object for the attribute 'Link Type'. - * @see simplepdl.WorkSequence#getLinkType() - * @see #getWorkSequence() - * @generated - */ - EAttribute getWorkSequence_LinkType(); - - /** - * Returns the meta object for the reference '{@link simplepdl.WorkSequence#getPredecessor Predecessor}'. - * - * - * @return the meta object for the reference 'Predecessor'. - * @see simplepdl.WorkSequence#getPredecessor() - * @see #getWorkSequence() - * @generated - */ - EReference getWorkSequence_Predecessor(); - - /** - * Returns the meta object for the reference '{@link simplepdl.WorkSequence#getSuccessor Successor}'. - * - * - * @return the meta object for the reference 'Successor'. - * @see simplepdl.WorkSequence#getSuccessor() - * @see #getWorkSequence() - * @generated - */ - EReference getWorkSequence_Successor(); - - /** - * Returns the meta object for class '{@link simplepdl.Guidance Guidance}'. - * - * - * @return the meta object for class 'Guidance'. - * @see simplepdl.Guidance - * @generated - */ - EClass getGuidance(); - - /** - * Returns the meta object for the attribute '{@link simplepdl.Guidance#getText Text}'. - * - * - * @return the meta object for the attribute 'Text'. - * @see simplepdl.Guidance#getText() - * @see #getGuidance() - * @generated - */ - EAttribute getGuidance_Text(); - - /** - * Returns the meta object for the reference list '{@link simplepdl.Guidance#getElements Elements}'. - * - * - * @return the meta object for the reference list 'Elements'. - * @see simplepdl.Guidance#getElements() - * @see #getGuidance() - * @generated - */ - EReference getGuidance_Elements(); - - /** - * Returns the meta object for class '{@link simplepdl.Process Process}'. - * - * - * @return the meta object for class 'Process'. - * @see simplepdl.Process - * @generated - */ - EClass getProcess(); - - /** - * Returns the meta object for the attribute '{@link simplepdl.Process#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see simplepdl.Process#getName() - * @see #getProcess() - * @generated - */ - EAttribute getProcess_Name(); - - /** - * Returns the meta object for the containment reference list '{@link simplepdl.Process#getProcessElements Process Elements}'. - * - * - * @return the meta object for the containment reference list 'Process Elements'. - * @see simplepdl.Process#getProcessElements() - * @see #getProcess() - * @generated - */ - EReference getProcess_ProcessElements(); - - /** - * Returns the meta object for class '{@link simplepdl.Request Request}'. - * - * - * @return the meta object for class 'Request'. - * @see simplepdl.Request - * @generated - */ - EClass getRequest(); - - /** - * Returns the meta object for the attribute '{@link simplepdl.Request#getQuantity Quantity}'. - * - * - * @return the meta object for the attribute 'Quantity'. - * @see simplepdl.Request#getQuantity() - * @see #getRequest() - * @generated - */ - EAttribute getRequest_Quantity(); - - /** - * Returns the meta object for the reference '{@link simplepdl.Request#getTarget Target}'. - * - * - * @return the meta object for the reference 'Target'. - * @see simplepdl.Request#getTarget() - * @see #getRequest() - * @generated - */ - EReference getRequest_Target(); - - /** - * Returns the meta object for class '{@link simplepdl.Resource Resource}'. - * - * - * @return the meta object for class 'Resource'. - * @see simplepdl.Resource - * @generated - */ - EClass getResource(); - - /** - * Returns the meta object for the attribute '{@link simplepdl.Resource#getQuantity Quantity}'. - * - * - * @return the meta object for the attribute 'Quantity'. - * @see simplepdl.Resource#getQuantity() - * @see #getResource() - * @generated - */ - EAttribute getResource_Quantity(); - - /** - * Returns the meta object for the attribute '{@link simplepdl.Resource#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see simplepdl.Resource#getName() - * @see #getResource() - * @generated - */ - EAttribute getResource_Name(); - - /** - * Returns the meta object for enum '{@link simplepdl.WorkSequenceType Work Sequence Type}'. - * - * - * @return the meta object for enum 'Work Sequence Type'. - * @see simplepdl.WorkSequenceType - * @generated - */ - EEnum getWorkSequenceType(); - - /** - * Returns the factory that creates the instances of the model. - * - * - * @return the factory that creates the instances of the model. - * @generated - */ - SimplepdlFactory getSimplepdlFactory(); - - /** - * - * Defines literals for the meta objects that represent - *
    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each operation of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * @generated - */ - interface Literals { - /** - * The meta object literal for the '{@link simplepdl.impl.ProcessElementImpl Process Element}' class. - * - * - * @see simplepdl.impl.ProcessElementImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getProcessElement() - * @generated - */ - EClass PROCESS_ELEMENT = eINSTANCE.getProcessElement(); - - /** - * The meta object literal for the '{@link simplepdl.impl.WorkDefinitionImpl Work Definition}' class. - * - * - * @see simplepdl.impl.WorkDefinitionImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getWorkDefinition() - * @generated - */ - EClass WORK_DEFINITION = eINSTANCE.getWorkDefinition(); - - /** - * The meta object literal for the 'Links To Predecessors' reference list feature. - * - * - * @generated - */ - EReference WORK_DEFINITION__LINKS_TO_PREDECESSORS = eINSTANCE.getWorkDefinition_LinksToPredecessors(); - - /** - * The meta object literal for the 'Links To Successors' reference list feature. - * - * - * @generated - */ - EReference WORK_DEFINITION__LINKS_TO_SUCCESSORS = eINSTANCE.getWorkDefinition_LinksToSuccessors(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute WORK_DEFINITION__NAME = eINSTANCE.getWorkDefinition_Name(); - - /** - * The meta object literal for the 'Requests' reference list feature. - * - * - * @generated - */ - EReference WORK_DEFINITION__REQUESTS = eINSTANCE.getWorkDefinition_Requests(); - - /** - * The meta object literal for the '{@link simplepdl.impl.WorkSequenceImpl Work Sequence}' class. - * - * - * @see simplepdl.impl.WorkSequenceImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getWorkSequence() - * @generated - */ - EClass WORK_SEQUENCE = eINSTANCE.getWorkSequence(); - - /** - * The meta object literal for the 'Link Type' attribute feature. - * - * - * @generated - */ - EAttribute WORK_SEQUENCE__LINK_TYPE = eINSTANCE.getWorkSequence_LinkType(); - - /** - * The meta object literal for the 'Predecessor' reference feature. - * - * - * @generated - */ - EReference WORK_SEQUENCE__PREDECESSOR = eINSTANCE.getWorkSequence_Predecessor(); - - /** - * The meta object literal for the 'Successor' reference feature. - * - * - * @generated - */ - EReference WORK_SEQUENCE__SUCCESSOR = eINSTANCE.getWorkSequence_Successor(); - - /** - * The meta object literal for the '{@link simplepdl.impl.GuidanceImpl Guidance}' class. - * - * - * @see simplepdl.impl.GuidanceImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getGuidance() - * @generated - */ - EClass GUIDANCE = eINSTANCE.getGuidance(); - - /** - * The meta object literal for the 'Text' attribute feature. - * - * - * @generated - */ - EAttribute GUIDANCE__TEXT = eINSTANCE.getGuidance_Text(); - - /** - * The meta object literal for the 'Elements' reference list feature. - * - * - * @generated - */ - EReference GUIDANCE__ELEMENTS = eINSTANCE.getGuidance_Elements(); - - /** - * The meta object literal for the '{@link simplepdl.impl.ProcessImpl Process}' class. - * - * - * @see simplepdl.impl.ProcessImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getProcess() - * @generated - */ - EClass PROCESS = eINSTANCE.getProcess(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute PROCESS__NAME = eINSTANCE.getProcess_Name(); - - /** - * The meta object literal for the 'Process Elements' containment reference list feature. - * - * - * @generated - */ - EReference PROCESS__PROCESS_ELEMENTS = eINSTANCE.getProcess_ProcessElements(); - - /** - * The meta object literal for the '{@link simplepdl.impl.RequestImpl Request}' class. - * - * - * @see simplepdl.impl.RequestImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getRequest() - * @generated - */ - EClass REQUEST = eINSTANCE.getRequest(); - - /** - * The meta object literal for the 'Quantity' attribute feature. - * - * - * @generated - */ - EAttribute REQUEST__QUANTITY = eINSTANCE.getRequest_Quantity(); - - /** - * The meta object literal for the 'Target' reference feature. - * - * - * @generated - */ - EReference REQUEST__TARGET = eINSTANCE.getRequest_Target(); - - /** - * The meta object literal for the '{@link simplepdl.impl.ResourceImpl Resource}' class. - * - * - * @see simplepdl.impl.ResourceImpl - * @see simplepdl.impl.SimplepdlPackageImpl#getResource() - * @generated - */ - EClass RESOURCE = eINSTANCE.getResource(); - - /** - * The meta object literal for the 'Quantity' attribute feature. - * - * - * @generated - */ - EAttribute RESOURCE__QUANTITY = eINSTANCE.getResource_Quantity(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute RESOURCE__NAME = eINSTANCE.getResource_Name(); - - /** - * The meta object literal for the '{@link simplepdl.WorkSequenceType Work Sequence Type}' enum. - * - * - * @see simplepdl.WorkSequenceType - * @see simplepdl.impl.SimplepdlPackageImpl#getWorkSequenceType() - * @generated - */ - EEnum WORK_SEQUENCE_TYPE = eINSTANCE.getWorkSequenceType(); - - } - -} //SimplepdlPackage diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a/200ed0a53b28001c1451a142d5f09209 b/.metadata/.plugins/org.eclipse.core.resources/.history/a/200ed0a53b28001c1451a142d5f09209 new file mode 100644 index 0000000..2ce7d29 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/a/200ed0a53b28001c1451a142d5f09209 @@ -0,0 +1,2 @@ + + diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a/60defe329822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/a/60defe329822001c17faa9b6b0561c0f deleted file mode 100644 index 7a79f9d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a/60defe329822001c17faa9b6b0561c0f +++ /dev/null @@ -1,59 +0,0 @@ -/** - */ -package simplepdl; - -import org.eclipse.emf.common.util.EList; - -/** - * - * A representation of the model object 'Guidance'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link simplepdl.Guidance#getText Text}
  • - *
  • {@link simplepdl.Guidance#getElements Elements}
  • - *
- * - * @see simplepdl.SimplepdlPackage#getGuidance() - * @model - * @generated - */ -public interface Guidance extends ProcessElement { - /** - * Returns the value of the 'Text' attribute. - * - * - * @return the value of the 'Text' attribute. - * @see #setText(String) - * @see simplepdl.SimplepdlPackage#getGuidance_Text() - * @model required="true" - * @generated - */ - String getText(); - - /** - * Sets the value of the '{@link simplepdl.Guidance#getText Text}' attribute. - * - * - * @param value the new value of the 'Text' attribute. - * @see #getText() - * @generated - */ - void setText(String value); - - /** - * Returns the value of the 'Elements' reference list. - * The list contents are of type {@link simplepdl.ProcessElement}. - * - * - * @return the value of the 'Elements' reference list. - * @see simplepdl.SimplepdlPackage#getGuidance_Elements() - * @model - * @generated - */ - EList getElements(); - -} // Guidance diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1b/305fe03c9d22001c118def180044d1da b/.metadata/.plugins/org.eclipse.core.resources/.history/a0/60f1c9fb3b28001c1451a142d5f09209 similarity index 61% rename from .metadata/.plugins/org.eclipse.core.resources/.history/1b/305fe03c9d22001c118def180044d1da rename to .metadata/.plugins/org.eclipse.core.resources/.history/a0/60f1c9fb3b28001c1451a142d5f09209 index d6e49a2..1818ea7 100644 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/1b/305fe03c9d22001c118def180044d1da +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/a0/60f1c9fb3b28001c1451a142d5f09209 @@ -1,6 +1,6 @@ /** */ -package simplepdl.provider; +package petrinet.provider; import java.util.Collection; @@ -14,23 +14,23 @@ import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ViewerNotification; -import simplepdl.Resource; -import simplepdl.SimplepdlPackage; +import petrinet.PetrinetPackage; +import petrinet.Place; /** - * This is the item provider adapter for a {@link simplepdl.Resource} object. + * This is the item provider adapter for a {@link petrinet.Place} object. * * * @generated */ -public class ResourceItemProvider extends ProcessElementItemProvider { +public class PlaceItemProvider extends NoeudItemProvider { /** * This constructs an instance from a factory and a notifier. * * * @generated */ - public ResourceItemProvider(AdapterFactory adapterFactory) { + public PlaceItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } @@ -45,26 +45,25 @@ public class ResourceItemProvider extends ProcessElementItemProvider { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); - addQuantityPropertyDescriptor(object); - addNamePropertyDescriptor(object); + addJetonsPropertyDescriptor(object); } return itemPropertyDescriptors; } /** - * This adds a property descriptor for the Quantity feature. + * This adds a property descriptor for the Jetons feature. * * * @generated */ - protected void addQuantityPropertyDescriptor(Object object) { + protected void addJetonsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_Resource_quantity_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Resource_quantity_feature", "_UI_Resource_type"), - SimplepdlPackage.Literals.RESOURCE__QUANTITY, + getString("_UI_Place_jetons_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Place_jetons_feature", "_UI_Place_type"), + PetrinetPackage.Literals.PLACE__JETONS, true, false, false, @@ -74,36 +73,14 @@ public class ResourceItemProvider extends ProcessElementItemProvider { } /** - * This adds a property descriptor for the Name feature. - * - * - * @generated - */ - protected void addNamePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Resource_name_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Resource_name_feature", "_UI_Resource_type"), - SimplepdlPackage.Literals.RESOURCE__NAME, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This returns Resource.gif. + * This returns Place.gif. * * * @generated */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/Resource")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/Place")); } /** @@ -114,10 +91,10 @@ public class ResourceItemProvider extends ProcessElementItemProvider { */ @Override public String getText(Object object) { - String label = ((Resource)object).getName(); + String label = ((Place)object).getName(); return label == null || label.length() == 0 ? - getString("_UI_Resource_type") : - getString("_UI_Resource_type") + " " + label; + getString("_UI_Place_type") : + getString("_UI_Place_type") + " " + label; } @@ -132,9 +109,8 @@ public class ResourceItemProvider extends ProcessElementItemProvider { public void notifyChanged(Notification notification) { updateChildren(notification); - switch (notification.getFeatureID(Resource.class)) { - case SimplepdlPackage.RESOURCE__QUANTITY: - case SimplepdlPackage.RESOURCE__NAME: + switch (notification.getFeatureID(Place.class)) { + case PetrinetPackage.PLACE__JETONS: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a2/50843b023728001c1310d5f213a964e6 b/.metadata/.plugins/org.eclipse.core.resources/.history/a2/50843b023728001c1310d5f213a964e6 new file mode 100644 index 0000000..4fe5bbc --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/a2/50843b023728001c1310d5f213a964e6 @@ -0,0 +1,28 @@ +import 'SimplePDL.ecore' + +package simplepdl + +context Process +inv warningSeverity: false +inv withMessage('Explicit message in process ' + self.name + ' (withMessage)'): false +inv errorSeverity: null + +context Process +inv validName('Invalid name: ' + self.name): + self.name.matches('[A-Za-z_][A-Za-z0-9_]*') + +context ProcessElement +def: process(): Process = + Process.allInstances() + ->select(p | p.processElements->includes(self)) + ->asSequence()->first() + +context WorkSequence +inv successorAndPredecessorInSameProcess('Activities not in the same process : ' + + self.predecessor.name + ' in ' + self.predecessor.process().name+ ' and ' + + self.successor.name + ' in ' + self.successor.process().name +): + self.process() = self.successor.process() + and self.process() = self.predecessor.process() + +endpackage diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a5/f09b510c3728001c1310d5f213a964e6 b/.metadata/.plugins/org.eclipse.core.resources/.history/a5/f09b510c3728001c1310d5f213a964e6 new file mode 100644 index 0000000..995de3a --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/a5/f09b510c3728001c1310d5f213a964e6 @@ -0,0 +1,27 @@ +import 'SimplePDL.ecore' + +package simplepdl + +context Process +inv warningSeverity: false +inv withMessage('Explicit message in process ' + self.name + ' (withMessage)'): false +inv errorSeverity: null + +context Process +inv validName('Invalid name: ' + self.name): + self.name.matches('[A-Za-z_][A-Za-z0-9_]*') + +context ProcessElement +def: process(): Process = + Process.allInstances() + ->select(p | p.processElements->includes(self)) + ->asSequence()->first() + +context WorkSequence +inv successorAndPredecessorInSameProcess('Activities not in the same process : ' + + self.predecessor.name + ' in ' + self.predecessor.process().name+ ' and ' + + self.successor.name + ' in ' + self.successor.process().name): + self.process() = self.successor.process() + and self.process() = self.predecessor.process() + +endpackage diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a8/80fedb419922001c1dcfb9656cd69315 b/.metadata/.plugins/org.eclipse.core.resources/.history/a8/80fedb419922001c1dcfb9656cd69315 deleted file mode 100644 index f2856ba..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a8/80fedb419922001c1dcfb9656cd69315 +++ /dev/null @@ -1,180 +0,0 @@ -/** - */ -package simplepdl.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ViewerNotification; - -import simplepdl.SimplepdlPackage; -import simplepdl.WorkSequence; -import simplepdl.WorkSequenceType; - -/** - * This is the item provider adapter for a {@link simplepdl.WorkSequence} object. - * - * - * @generated - */ -public class WorkSequenceItemProvider extends ProcessElementItemProvider { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public WorkSequenceItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addLinkTypePropertyDescriptor(object); - addPredecessorPropertyDescriptor(object); - addSuccessorPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Link Type feature. - * - * - * @generated - */ - protected void addLinkTypePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_linkType_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_linkType_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__LINK_TYPE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Predecessor feature. - * - * - * @generated - */ - protected void addPredecessorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_predecessor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_predecessor_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__PREDECESSOR, - true, - false, - true, - null, - null, - null)); - } - - /** - * This adds a property descriptor for the Successor feature. - * - * - * @generated - */ - protected void addSuccessorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_successor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_successor_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__SUCCESSOR, - true, - false, - true, - null, - null, - null)); - } - - /** - * This returns WorkSequence.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/WorkSequence")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - WorkSequenceType labelValue = ((WorkSequence)object).getLinkType(); - String label = labelValue == null ? null : labelValue.toString(); - return label == null || label.length() == 0 ? - getString("_UI_WorkSequence_type") : - getString("_UI_WorkSequence_type") + " " + label; - } - - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(WorkSequence.class)) { - case SimplepdlPackage.WORK_SEQUENCE__LINK_TYPE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a8/b01bd2b89d22001c118def180044d1da b/.metadata/.plugins/org.eclipse.core.resources/.history/a8/b01bd2b89d22001c118def180044d1da deleted file mode 100644 index d8167c2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a8/b01bd2b89d22001c118def180044d1da +++ /dev/null @@ -1,179 +0,0 @@ -/** - */ -package simplepdl.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.common.util.ResourceLocator; - -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; -import org.eclipse.emf.edit.provider.ViewerNotification; - -import simplepdl.Request; -import simplepdl.SimplepdlPackage; - -/** - * This is the item provider adapter for a {@link simplepdl.Request} object. - * - * - * @generated - */ -public class RequestItemProvider - extends ItemProviderAdapter - implements - IEditingDomainItemProvider, - IStructuredItemContentProvider, - ITreeItemContentProvider, - IItemLabelProvider, - IItemPropertySource { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public RequestItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addQuantityPropertyDescriptor(object); - addTargetPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Quantity feature. - * - * - * @generated - */ - protected void addQuantityPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Request_quantity_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Request_quantity_feature", "_UI_Request_type"), - SimplepdlPackage.Literals.REQUEST__QUANTITY, - true, - false, - false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Target feature. - * - * - * @generated - */ - protected void addTargetPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Request_target_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Request_target_feature", "_UI_Request_type"), - SimplepdlPackage.Literals.REQUEST__TARGET, - true, - false, - true, - null, - null, - null)); - } - - /** - * This returns Request.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/Request")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - Request request = (Request)object; - return getString("_UI_Request_type") + " " + request.getQuantity() + "-> " + request.getTarget().getName(); - } - - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(Request.class)) { - case SimplepdlPackage.REQUEST__QUANTITY: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - - /** - * Return the resource locator for this item provider's resources. - * - * - * @generated - */ - @Override - public ResourceLocator getResourceLocator() { - return SimplePDLEditPlugin.INSTANCE; - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a8/b0238a5e3228001c13dca9fa1eba29d5 b/.metadata/.plugins/org.eclipse.core.resources/.history/a8/b0238a5e3228001c13dca9fa1eba29d5 new file mode 100644 index 0000000..381a3d8 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/a8/b0238a5e3228001c13dca9fa1eba29d5 @@ -0,0 +1,49 @@ +import 'SimplePDL.ecore' + +package simplepdl + +context Process +inv warningSeverity: false +inv withMessage('Explicit message in process ' + self.name + ' (withMessage)'): false +--inv errorSeverity: null + +context Process +inv validName('Invalid name: ' + self.name): + self.name.matches('[A-Za-z_][A-Za-z0-9_]*') + +context ProcessElement +def: process(): Process = + Process.allInstances() + ->select(p | p.processElements->includes(self)) + ->asSequence()->first() + +context WorkSequence +inv successorAndPredecessorInSameProcess('Activities not in the same process : ' + + self.predecessor.name + ' in ' + self.predecessor.process().name+ ' and ' + + self.successor.name + ' in ' + self.successor.process().name + ): + self.process() = self.successor.process() + and self.process() = self.predecessor.process() + +context Process +inv uniqNames: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w1, w2 | w1 = w2 or w1.name <> w2.name) + +context WorkSequence +inv notReflexive: self.predecessor <> self.successor + +context Process +inv nameMin2Char: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w | w.name.matches('..+')) + +context Process +inv weirdName: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w | not w.name.matches('([0-9]*|[a-zA-Z]*|_*)')) + +endpackage \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a8/e05dd4a39822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/a8/e05dd4a39822001c17faa9b6b0561c0f deleted file mode 100644 index 5f237c0..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a8/e05dd4a39822001c17faa9b6b0561c0f +++ /dev/null @@ -1,1545 +0,0 @@ - - - - SimplePDL.ecore - SimplePDL.genmodel - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - bold - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ae/b05252879a22001c12b4fa86d0abfe24 b/.metadata/.plugins/org.eclipse.core.resources/.history/ae/b05252879a22001c12b4fa86d0abfe24 deleted file mode 100644 index b5c6119..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ae/b05252879a22001c12b4fa86d0abfe24 +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ae/e0c2e2bf9a22001c12b4fa86d0abfe24 b/.metadata/.plugins/org.eclipse.core.resources/.history/ae/e0c2e2bf9a22001c12b4fa86d0abfe24 deleted file mode 100644 index e291b4b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ae/e0c2e2bf9a22001c12b4fa86d0abfe24 +++ /dev/null @@ -1,1546 +0,0 @@ - - - - SimplePDL.ecore - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - italic - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - bold - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - bold - - - labelSize - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b3/e01600339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/b3/e01600339822001c17faa9b6b0561c0f deleted file mode 100644 index f8bf674..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b3/e01600339822001c17faa9b6b0561c0f +++ /dev/null @@ -1,18 +0,0 @@ -/** - */ -package simplepdl; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Process Element'. - * - * - * - * @see simplepdl.SimplepdlPackage#getProcessElement() - * @model abstract="true" - * @generated - */ -public interface ProcessElement extends EObject { -} // ProcessElement diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b4/00f79b203628001c188ba284775c11f7 b/.metadata/.plugins/org.eclipse.core.resources/.history/b4/00f79b203628001c188ba284775c11f7 new file mode 100644 index 0000000..b93b232 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/b4/00f79b203628001c188ba284775c11f7 @@ -0,0 +1,3 @@ + + diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/28/401812339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/b5/e02c41e13728001c1310d5f213a964e6 similarity index 100% rename from .metadata/.plugins/org.eclipse.core.resources/.history/28/401812339822001c17faa9b6b0561c0f rename to .metadata/.plugins/org.eclipse.core.resources/.history/b5/e02c41e13728001c1310d5f213a964e6 diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b6/001492399c22001c10c68e4a8bb21dd1 b/.metadata/.plugins/org.eclipse.core.resources/.history/b6/001492399c22001c10c68e4a8bb21dd1 deleted file mode 100644 index 0c90b07..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b6/001492399c22001c10c68e4a8bb21dd1 +++ /dev/null @@ -1,44 +0,0 @@ - - - SimplePDL.ecore - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/bc/0025112b9822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/bc/0025112b9822001c17faa9b6b0561c0f deleted file mode 100644 index 2400021..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/bc/0025112b9822001c17faa9b6b0561c0f +++ /dev/null @@ -1,78 +0,0 @@ -/** - */ -package simplepdl; - -import org.eclipse.emf.ecore.EFactory; - -/** - * - * The Factory for the model. - * It provides a create method for each non-abstract class of the model. - * - * @see simplepdl.SimplepdlPackage - * @generated - */ -public interface SimplepdlFactory extends EFactory { - /** - * The singleton instance of the factory. - * - * - * @generated - */ - SimplepdlFactory eINSTANCE = simplepdl.impl.SimplepdlFactoryImpl.init(); - - /** - * Returns a new object of class 'Process Element'. - * - * - * @return a new object of class 'Process Element'. - * @generated - */ - ProcessElement createProcessElement(); - - /** - * Returns a new object of class 'Work Definition'. - * - * - * @return a new object of class 'Work Definition'. - * @generated - */ - WorkDefinition createWorkDefinition(); - - /** - * Returns a new object of class 'Work Sequence'. - * - * - * @return a new object of class 'Work Sequence'. - * @generated - */ - WorkSequence createWorkSequence(); - - /** - * Returns a new object of class 'Guidance'. - * - * - * @return a new object of class 'Guidance'. - * @generated - */ - Guidance createGuidance(); - - /** - * Returns a new object of class 'Process'. - * - * - * @return a new object of class 'Process'. - * @generated - */ - Process createProcess(); - - /** - * Returns the package supported by this factory. - * - * - * @return the package supported by this factory. - * @generated - */ - SimplepdlPackage getSimplepdlPackage(); - -} //SimplepdlFactory diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/bc/50da3d2b9822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/bc/50da3d2b9822001c17faa9b6b0561c0f deleted file mode 100644 index 04e548c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/bc/50da3d2b9822001c17faa9b6b0561c0f +++ /dev/null @@ -1,76 +0,0 @@ -/** - */ -package simplepdl; - -import org.eclipse.emf.common.util.EList; - -/** - * - * A representation of the model object 'Work Definition'. - * - * - *

- * The following features are supported: - *

- *
    - *
  • {@link simplepdl.WorkDefinition#getLinksToPredecessors Links To Predecessors}
  • - *
  • {@link simplepdl.WorkDefinition#getLinksToSuccessors Links To Successors}
  • - *
  • {@link simplepdl.WorkDefinition#getName Name}
  • - *
- * - * @see simplepdl.SimplepdlPackage#getWorkDefinition() - * @model - * @generated - */ -public interface WorkDefinition extends ProcessElement { - /** - * Returns the value of the 'Links To Predecessors' reference list. - * The list contents are of type {@link simplepdl.WorkSequence}. - * It is bidirectional and its opposite is '{@link simplepdl.WorkSequence#getSuccessor Successor}'. - * - * - * @return the value of the 'Links To Predecessors' reference list. - * @see simplepdl.SimplepdlPackage#getWorkDefinition_LinksToPredecessors() - * @see simplepdl.WorkSequence#getSuccessor - * @model opposite="successor" - * @generated - */ - EList getLinksToPredecessors(); - - /** - * Returns the value of the 'Links To Successors' reference list. - * The list contents are of type {@link simplepdl.WorkSequence}. - * It is bidirectional and its opposite is '{@link simplepdl.WorkSequence#getPredecessor Predecessor}'. - * - * - * @return the value of the 'Links To Successors' reference list. - * @see simplepdl.SimplepdlPackage#getWorkDefinition_LinksToSuccessors() - * @see simplepdl.WorkSequence#getPredecessor - * @model opposite="predecessor" - * @generated - */ - EList getLinksToSuccessors(); - - /** - * Returns the value of the 'Name' attribute. - * - * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see simplepdl.SimplepdlPackage#getWorkDefinition_Name() - * @model required="true" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link simplepdl.WorkDefinition#getName Name}' attribute. - * - * - * @param value the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - -} // WorkDefinition diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/bc/a0af0b339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/bc/a0af0b339822001c17faa9b6b0561c0f deleted file mode 100644 index 90e5734..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/bc/a0af0b339822001c17faa9b6b0561c0f +++ /dev/null @@ -1,208 +0,0 @@ -/** - */ -package simplepdl.impl; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; - -import org.eclipse.emf.ecore.impl.EFactoryImpl; - -import org.eclipse.emf.ecore.plugin.EcorePlugin; - -import simplepdl.Guidance; -import simplepdl.Request; -import simplepdl.Resource; -import simplepdl.SimplepdlFactory; -import simplepdl.SimplepdlPackage; -import simplepdl.WorkDefinition; -import simplepdl.WorkSequence; -import simplepdl.WorkSequenceType; - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class SimplepdlFactoryImpl extends EFactoryImpl implements SimplepdlFactory { - /** - * Creates the default factory implementation. - * - * - * @generated - */ - public static SimplepdlFactory init() { - try { - SimplepdlFactory theSimplepdlFactory = (SimplepdlFactory)EPackage.Registry.INSTANCE.getEFactory(SimplepdlPackage.eNS_URI); - if (theSimplepdlFactory != null) { - return theSimplepdlFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new SimplepdlFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * - * @generated - */ - public SimplepdlFactoryImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case SimplepdlPackage.WORK_DEFINITION: return createWorkDefinition(); - case SimplepdlPackage.WORK_SEQUENCE: return createWorkSequence(); - case SimplepdlPackage.GUIDANCE: return createGuidance(); - case SimplepdlPackage.PROCESS: return createProcess(); - case SimplepdlPackage.REQUEST: return createRequest(); - case SimplepdlPackage.RESOURCE: return createResource(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - @Override - public Object createFromString(EDataType eDataType, String initialValue) { - switch (eDataType.getClassifierID()) { - case SimplepdlPackage.WORK_SEQUENCE_TYPE: - return createWorkSequenceTypeFromString(eDataType, initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - @Override - public String convertToString(EDataType eDataType, Object instanceValue) { - switch (eDataType.getClassifierID()) { - case SimplepdlPackage.WORK_SEQUENCE_TYPE: - return convertWorkSequenceTypeToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public WorkDefinition createWorkDefinition() { - WorkDefinitionImpl workDefinition = new WorkDefinitionImpl(); - return workDefinition; - } - - /** - * - * - * @generated - */ - public WorkSequence createWorkSequence() { - WorkSequenceImpl workSequence = new WorkSequenceImpl(); - return workSequence; - } - - /** - * - * - * @generated - */ - public Guidance createGuidance() { - GuidanceImpl guidance = new GuidanceImpl(); - return guidance; - } - - /** - * - * - * @generated - */ - public simplepdl.Process createProcess() { - ProcessImpl process = new ProcessImpl(); - return process; - } - - /** - * - * - * @generated - */ - public Request createRequest() { - RequestImpl request = new RequestImpl(); - return request; - } - - /** - * - * - * @generated - */ - public Resource createResource() { - ResourceImpl resource = new ResourceImpl(); - return resource; - } - - /** - * - * - * @generated - */ - public WorkSequenceType createWorkSequenceTypeFromString(EDataType eDataType, String initialValue) { - WorkSequenceType result = WorkSequenceType.get(initialValue); - if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); - return result; - } - - /** - * - * - * @generated - */ - public String convertWorkSequenceTypeToString(EDataType eDataType, Object instanceValue) { - return instanceValue == null ? null : instanceValue.toString(); - } - - /** - * - * - * @generated - */ - public SimplepdlPackage getSimplepdlPackage() { - return (SimplepdlPackage)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - @Deprecated - public static SimplepdlPackage getPackage() { - return SimplepdlPackage.eINSTANCE; - } - -} //SimplepdlFactoryImpl diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/bc/c034b7df9522001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/bc/c034b7df9522001c17faa9b6b0561c0f deleted file mode 100644 index e0d547d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/bc/c034b7df9522001c17faa9b6b0561c0f +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/be/80a709773228001c13dca9fa1eba29d5 b/.metadata/.plugins/org.eclipse.core.resources/.history/be/80a709773228001c13dca9fa1eba29d5 new file mode 100644 index 0000000..87a9243 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/be/80a709773228001c13dca9fa1eba29d5 @@ -0,0 +1,48 @@ +import 'SimplePDL.ecore' + +package simplepdl + +context Process +inv warningSeverity: false +inv withMessage('Explicit message in process ' + self.name + ' (withMessage)'): false + +context Process +inv validName('Invalid name: ' + self.name): + self.name.matches('[A-Za-z_][A-Za-z0-9_]*') + +context ProcessElement +def: process(): Process = + Process.allInstances() + ->select(p | p.processElements->includes(self)) + ->asSequence()->first() + +context WorkSequence +inv successorAndPredecessorInSameProcess('Activities not in the same process : ' + + self.predecessor.name + ' in ' + self.predecessor.process().name+ ' and ' + + self.successor.name + ' in ' + self.successor.process().name + ): + self.process() = self.successor.process() + and self.process() = self.predecessor.process() + +context Process +inv uniqNames: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w1, w2 | w1 = w2 or w1.name <> w2.name) + +context WorkSequence +inv notReflexive: self.predecessor <> self.successor + +context Process +inv nameMin2Char: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w | w.name.matches('..+')) + +context Process +inv weirdName: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w | not w.name.matches('([0-9]*|[a-zA-Z]*|_*)')) + +endpackage \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/bf/10df07339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/bf/10df07339822001c17faa9b6b0561c0f deleted file mode 100644 index 0df9f5f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/bf/10df07339822001c17faa9b6b0561c0f +++ /dev/null @@ -1,39 +0,0 @@ -/** - */ -package simplepdl.impl; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; - -import simplepdl.ProcessElement; -import simplepdl.SimplepdlPackage; - -/** - * - * An implementation of the model object 'Process Element'. - * - * - * @generated - */ -public abstract class ProcessElementImpl extends MinimalEObjectImpl.Container implements ProcessElement { - /** - * - * - * @generated - */ - protected ProcessElementImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return SimplepdlPackage.Literals.PROCESS_ELEMENT; - } - -} //ProcessElementImpl diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/bf/40ef332b9822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/bf/40ef332b9822001c17faa9b6b0561c0f deleted file mode 100644 index defb49c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/bf/40ef332b9822001c17faa9b6b0561c0f +++ /dev/null @@ -1,18 +0,0 @@ -/** - */ -package simplepdl; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Process Element'. - * - * - * - * @see simplepdl.SimplepdlPackage#getProcessElement() - * @model - * @generated - */ -public interface ProcessElement extends EObject { -} // ProcessElement diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/83/50c14eb59d22001c118def180044d1da b/.metadata/.plugins/org.eclipse.core.resources/.history/bf/8037cebd3c28001c1451a142d5f09209 similarity index 66% rename from .metadata/.plugins/org.eclipse.core.resources/.history/83/50c14eb59d22001c118def180044d1da rename to .metadata/.plugins/org.eclipse.core.resources/.history/bf/8037cebd3c28001c1451a142d5f09209 index cf613bb..be4677c 100644 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/83/50c14eb59d22001c118def180044d1da +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/bf/8037cebd3c28001c1451a142d5f09209 @@ -1,6 +1,6 @@ /** */ -package simplepdl.provider; +package petrinet.provider; import java.util.Collection; @@ -22,16 +22,16 @@ import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ItemProviderAdapter; import org.eclipse.emf.edit.provider.ViewerNotification; -import simplepdl.Request; -import simplepdl.SimplepdlPackage; +import petrinet.Arc; +import petrinet.PetrinetPackage; /** - * This is the item provider adapter for a {@link simplepdl.Request} object. + * This is the item provider adapter for a {@link petrinet.Arc} object. * * * @generated */ -public class RequestItemProvider +public class ArcItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, @@ -45,7 +45,7 @@ public class RequestItemProvider * * @generated */ - public RequestItemProvider(AdapterFactory adapterFactory) { + public ArcItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } @@ -60,26 +60,27 @@ public class RequestItemProvider if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); - addQuantityPropertyDescriptor(object); - addTargetPropertyDescriptor(object); + addPoidsPropertyDescriptor(object); + addSortantPropertyDescriptor(object); + addCiblePropertyDescriptor(object); } return itemPropertyDescriptors; } /** - * This adds a property descriptor for the Quantity feature. + * This adds a property descriptor for the Poids feature. * * * @generated */ - protected void addQuantityPropertyDescriptor(Object object) { + protected void addPoidsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_Request_quantity_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Request_quantity_feature", "_UI_Request_type"), - SimplepdlPackage.Literals.REQUEST__QUANTITY, + getString("_UI_Arc_poids_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arc_poids_feature", "_UI_Arc_type"), + PetrinetPackage.Literals.ARC__POIDS, true, false, false, @@ -89,19 +90,41 @@ public class RequestItemProvider } /** - * This adds a property descriptor for the Target feature. + * This adds a property descriptor for the Sortant feature. * * * @generated */ - protected void addTargetPropertyDescriptor(Object object) { + protected void addSortantPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_Request_target_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Request_target_feature", "_UI_Request_type"), - SimplepdlPackage.Literals.REQUEST__TARGET, + getString("_UI_Arc_sortant_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arc_sortant_feature", "_UI_Arc_type"), + PetrinetPackage.Literals.ARC__SORTANT, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Cible feature. + * + * + * @generated + */ + protected void addCiblePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Arc_cible_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arc_cible_feature", "_UI_Arc_type"), + PetrinetPackage.Literals.ARC__CIBLE, true, false, true, @@ -111,14 +134,14 @@ public class RequestItemProvider } /** - * This returns Request.gif. + * This returns Arc.gif. * * * @generated */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/Request")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/Arc")); } /** @@ -129,8 +152,8 @@ public class RequestItemProvider */ @Override public String getText(Object object) { - Request request = (Request)object; - return getString("_UI_Request_type") + " " + request.getQuantity() + "-> " + request.getTarget(); + Arc arc = (Arc)object; + return getString("_UI_Arc_type") + " " + arc.getPoids(); } @@ -145,8 +168,9 @@ public class RequestItemProvider public void notifyChanged(Notification notification) { updateChildren(notification); - switch (notification.getFeatureID(Request.class)) { - case SimplepdlPackage.REQUEST__QUANTITY: + switch (notification.getFeatureID(Arc.class)) { + case PetrinetPackage.ARC__POIDS: + case PetrinetPackage.ARC__SORTANT: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } @@ -173,7 +197,7 @@ public class RequestItemProvider */ @Override public ResourceLocator getResourceLocator() { - return SimplePDLEditPlugin.INSTANCE; + return PetriNetEditPlugin.INSTANCE; } } diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c1/10affb743228001c13dca9fa1eba29d5 b/.metadata/.plugins/org.eclipse.core.resources/.history/c1/10affb743228001c13dca9fa1eba29d5 new file mode 100644 index 0000000..87a9243 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/c1/10affb743228001c13dca9fa1eba29d5 @@ -0,0 +1,48 @@ +import 'SimplePDL.ecore' + +package simplepdl + +context Process +inv warningSeverity: false +inv withMessage('Explicit message in process ' + self.name + ' (withMessage)'): false + +context Process +inv validName('Invalid name: ' + self.name): + self.name.matches('[A-Za-z_][A-Za-z0-9_]*') + +context ProcessElement +def: process(): Process = + Process.allInstances() + ->select(p | p.processElements->includes(self)) + ->asSequence()->first() + +context WorkSequence +inv successorAndPredecessorInSameProcess('Activities not in the same process : ' + + self.predecessor.name + ' in ' + self.predecessor.process().name+ ' and ' + + self.successor.name + ' in ' + self.successor.process().name + ): + self.process() = self.successor.process() + and self.process() = self.predecessor.process() + +context Process +inv uniqNames: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w1, w2 | w1 = w2 or w1.name <> w2.name) + +context WorkSequence +inv notReflexive: self.predecessor <> self.successor + +context Process +inv nameMin2Char: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w | w.name.matches('..+')) + +context Process +inv weirdName: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w | not w.name.matches('([0-9]*|[a-zA-Z]*|_*)')) + +endpackage \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c6/a0e45af59c22001c118def180044d1da b/.metadata/.plugins/org.eclipse.core.resources/.history/c6/a0e45af59c22001c118def180044d1da deleted file mode 100644 index f2856ba..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c6/a0e45af59c22001c118def180044d1da +++ /dev/null @@ -1,180 +0,0 @@ -/** - */ -package simplepdl.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ViewerNotification; - -import simplepdl.SimplepdlPackage; -import simplepdl.WorkSequence; -import simplepdl.WorkSequenceType; - -/** - * This is the item provider adapter for a {@link simplepdl.WorkSequence} object. - * - * - * @generated - */ -public class WorkSequenceItemProvider extends ProcessElementItemProvider { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public WorkSequenceItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addLinkTypePropertyDescriptor(object); - addPredecessorPropertyDescriptor(object); - addSuccessorPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Link Type feature. - * - * - * @generated - */ - protected void addLinkTypePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_linkType_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_linkType_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__LINK_TYPE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Predecessor feature. - * - * - * @generated - */ - protected void addPredecessorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_predecessor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_predecessor_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__PREDECESSOR, - true, - false, - true, - null, - null, - null)); - } - - /** - * This adds a property descriptor for the Successor feature. - * - * - * @generated - */ - protected void addSuccessorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_successor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_successor_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__SUCCESSOR, - true, - false, - true, - null, - null, - null)); - } - - /** - * This returns WorkSequence.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/WorkSequence")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - WorkSequenceType labelValue = ((WorkSequence)object).getLinkType(); - String label = labelValue == null ? null : labelValue.toString(); - return label == null || label.length() == 0 ? - getString("_UI_WorkSequence_type") : - getString("_UI_WorkSequence_type") + " " + label; - } - - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(WorkSequence.class)) { - case SimplepdlPackage.WORK_SEQUENCE__LINK_TYPE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ca/604f01339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/ca/604f01339822001c17faa9b6b0561c0f deleted file mode 100644 index 7e3c9c5..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ca/604f01339822001c17faa9b6b0561c0f +++ /dev/null @@ -1,87 +0,0 @@ -/** - */ -package simplepdl; - -import org.eclipse.emf.ecore.EFactory; - -/** - * - * The Factory for the model. - * It provides a create method for each non-abstract class of the model. - * - * @see simplepdl.SimplepdlPackage - * @generated - */ -public interface SimplepdlFactory extends EFactory { - /** - * The singleton instance of the factory. - * - * - * @generated - */ - SimplepdlFactory eINSTANCE = simplepdl.impl.SimplepdlFactoryImpl.init(); - - /** - * Returns a new object of class 'Work Definition'. - * - * - * @return a new object of class 'Work Definition'. - * @generated - */ - WorkDefinition createWorkDefinition(); - - /** - * Returns a new object of class 'Work Sequence'. - * - * - * @return a new object of class 'Work Sequence'. - * @generated - */ - WorkSequence createWorkSequence(); - - /** - * Returns a new object of class 'Guidance'. - * - * - * @return a new object of class 'Guidance'. - * @generated - */ - Guidance createGuidance(); - - /** - * Returns a new object of class 'Process'. - * - * - * @return a new object of class 'Process'. - * @generated - */ - Process createProcess(); - - /** - * Returns a new object of class 'Request'. - * - * - * @return a new object of class 'Request'. - * @generated - */ - Request createRequest(); - - /** - * Returns a new object of class 'Resource'. - * - * - * @return a new object of class 'Resource'. - * @generated - */ - Resource createResource(); - - /** - * Returns the package supported by this factory. - * - * - * @return the package supported by this factory. - * @generated - */ - SimplepdlPackage getSimplepdlPackage(); - -} //SimplepdlFactory diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/cb/30bc05339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/cb/30bc05339822001c17faa9b6b0561c0f deleted file mode 100644 index fb8f7a0..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/cb/30bc05339822001c17faa9b6b0561c0f +++ /dev/null @@ -1,204 +0,0 @@ -/** - */ -package simplepdl.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import org.eclipse.emf.ecore.util.EObjectResolvingEList; - -import simplepdl.Guidance; -import simplepdl.ProcessElement; -import simplepdl.SimplepdlPackage; - -/** - * - * An implementation of the model object 'Guidance'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link simplepdl.impl.GuidanceImpl#getText Text}
  • - *
  • {@link simplepdl.impl.GuidanceImpl#getElements Elements}
  • - *
- * - * @generated - */ -public class GuidanceImpl extends ProcessElementImpl implements Guidance { - /** - * The default value of the '{@link #getText() Text}' attribute. - * - * - * @see #getText() - * @generated - * @ordered - */ - protected static final String TEXT_EDEFAULT = null; - - /** - * The cached value of the '{@link #getText() Text}' attribute. - * - * - * @see #getText() - * @generated - * @ordered - */ - protected String text = TEXT_EDEFAULT; - - /** - * The cached value of the '{@link #getElements() Elements}' reference list. - * - * - * @see #getElements() - * @generated - * @ordered - */ - protected EList elements; - - /** - * - * - * @generated - */ - protected GuidanceImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return SimplepdlPackage.Literals.GUIDANCE; - } - - /** - * - * - * @generated - */ - public String getText() { - return text; - } - - /** - * - * - * @generated - */ - public void setText(String newText) { - String oldText = text; - text = newText; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.GUIDANCE__TEXT, oldText, text)); - } - - /** - * - * - * @generated - */ - public EList getElements() { - if (elements == null) { - elements = new EObjectResolvingEList(ProcessElement.class, this, SimplepdlPackage.GUIDANCE__ELEMENTS); - } - return elements; - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SimplepdlPackage.GUIDANCE__TEXT: - return getText(); - case SimplepdlPackage.GUIDANCE__ELEMENTS: - return getElements(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case SimplepdlPackage.GUIDANCE__TEXT: - setText((String)newValue); - return; - case SimplepdlPackage.GUIDANCE__ELEMENTS: - getElements().clear(); - getElements().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case SimplepdlPackage.GUIDANCE__TEXT: - setText(TEXT_EDEFAULT); - return; - case SimplepdlPackage.GUIDANCE__ELEMENTS: - getElements().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case SimplepdlPackage.GUIDANCE__TEXT: - return TEXT_EDEFAULT == null ? text != null : !TEXT_EDEFAULT.equals(text); - case SimplepdlPackage.GUIDANCE__ELEMENTS: - return elements != null && !elements.isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuilder result = new StringBuilder(super.toString()); - result.append(" (text: "); - result.append(text); - result.append(')'); - return result.toString(); - } - -} //GuidanceImpl diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/cb/e062c6ecdc25001c15a9d70b555b4809 b/.metadata/.plugins/org.eclipse.core.resources/.history/cb/e062c6ecdc25001c15a9d70b555b4809 deleted file mode 100644 index 680995f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/cb/e062c6ecdc25001c15a9d70b555b4809 +++ /dev/null @@ -1,185 +0,0 @@ -/** - */ -package simplepdl.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ViewerNotification; - -import simplepdl.SimplepdlPackage; -import simplepdl.WorkSequence; -import simplepdl.WorkSequenceType; - -/** - * This is the item provider adapter for a {@link simplepdl.WorkSequence} object. - * - * - * @generated - */ -public class WorkSequenceItemProvider extends ProcessElementItemProvider { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public WorkSequenceItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addLinkTypePropertyDescriptor(object); - addPredecessorPropertyDescriptor(object); - addSuccessorPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Link Type feature. - * - * - * @generated - */ - protected void addLinkTypePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_linkType_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_linkType_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__LINK_TYPE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Predecessor feature. - * - * - * @generated - */ - protected void addPredecessorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_predecessor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_predecessor_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__PREDECESSOR, - true, - false, - true, - null, - null, - null)); - } - - /** - * This adds a property descriptor for the Successor feature. - * - * - * @generated - */ - protected void addSuccessorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_successor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_successor_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__SUCCESSOR, - true, - false, - true, - null, - null, - null)); - } - - /** - * This returns WorkSequence.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/WorkSequence")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - WorkSequence ws = (WorkSequence) object; - WorkSequenceType labelValue = ws.getLinkType(); - String label = "--" + (labelValue == null ? "?" : labelValue.toString()) + "-->"; - String previous = ws.getPredecessor() == null ? "?" : ws.getPredecessor().getName(); - String next = ws.getSuccessor() == null ? "?" : ws.getSuccessor().getName(); - return label == null || label.length() == 0 ? - getString("_UI_WorkSequence_type") : - getString("_UI_WorkSequence_type") + " " + previous + " " + label + " " + next; - } - - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(WorkSequence.class)) { - case SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR: - case SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR: - case SimplepdlPackage.WORK_SEQUENCE__LINK_TYPE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/cc/60cec0039d22001c118def180044d1da b/.metadata/.plugins/org.eclipse.core.resources/.history/cc/60cec0039d22001c118def180044d1da deleted file mode 100644 index 2f81f37..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/cc/60cec0039d22001c118def180044d1da +++ /dev/null @@ -1,182 +0,0 @@ -/** - */ -package simplepdl.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ViewerNotification; - -import simplepdl.SimplepdlPackage; -import simplepdl.WorkSequence; -import simplepdl.WorkSequenceType; - -/** - * This is the item provider adapter for a {@link simplepdl.WorkSequence} object. - * - * - * @generated - */ -public class WorkSequenceItemProvider extends ProcessElementItemProvider { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public WorkSequenceItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addLinkTypePropertyDescriptor(object); - addPredecessorPropertyDescriptor(object); - addSuccessorPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Link Type feature. - * - * - * @generated - */ - protected void addLinkTypePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_linkType_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_linkType_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__LINK_TYPE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Predecessor feature. - * - * - * @generated - */ - protected void addPredecessorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_predecessor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_predecessor_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__PREDECESSOR, - true, - false, - true, - null, - null, - null)); - } - - /** - * This adds a property descriptor for the Successor feature. - * - * - * @generated - */ - protected void addSuccessorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_successor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_successor_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__SUCCESSOR, - true, - false, - true, - null, - null, - null)); - } - - /** - * This returns WorkSequence.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/WorkSequence")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - WorkSequenceType labelValue = ((WorkSequence)object).getLinkType(); - String label = labelValue == null ? null : labelValue.toString(); - return label == null || label.length() == 0 ? - getString("_UI_WorkSequence_type") : - getString("_UI_WorkSequence_type") + " " + label; - } - - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(WorkSequence.class)) { - case SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR: - case SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR: - case SimplepdlPackage.WORK_SEQUENCE__LINK_TYPE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/cf/80cbebc49d22001c118def180044d1da b/.metadata/.plugins/org.eclipse.core.resources/.history/cf/80cbebc49d22001c118def180044d1da deleted file mode 100644 index dcf0d50..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/cf/80cbebc49d22001c118def180044d1da +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d4/80b20bdc3328001c13dca9fa1eba29d5 b/.metadata/.plugins/org.eclipse.core.resources/.history/d4/80b20bdc3328001c13dca9fa1eba29d5 new file mode 100644 index 0000000..d729abb --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/d4/80b20bdc3328001c13dca9fa1eba29d5 @@ -0,0 +1,47 @@ + + + + + + + + + + + + diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e/809ce3739922001c1dcfb9656cd69315 b/.metadata/.plugins/org.eclipse.core.resources/.history/e/809ce3739922001c1dcfb9656cd69315 deleted file mode 100644 index 1fa97e4..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e/809ce3739922001c1dcfb9656cd69315 +++ /dev/null @@ -1,183 +0,0 @@ -/** - */ -package simplepdl.provider; - - -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ViewerNotification; - -import simplepdl.SimplepdlPackage; -import simplepdl.WorkSequence; -import simplepdl.WorkSequenceType; - -/** - * This is the item provider adapter for a {@link simplepdl.WorkSequence} object. - * - * - * @generated - */ -public class WorkSequenceItemProvider extends ProcessElementItemProvider { - /** - * This constructs an instance from a factory and a notifier. - * - * - * @generated - */ - public WorkSequenceItemProvider(AdapterFactory adapterFactory) { - super(adapterFactory); - } - - /** - * This returns the property descriptors for the adapted class. - * - * - * @generated - */ - @Override - public List getPropertyDescriptors(Object object) { - if (itemPropertyDescriptors == null) { - super.getPropertyDescriptors(object); - - addLinkTypePropertyDescriptor(object); - addPredecessorPropertyDescriptor(object); - addSuccessorPropertyDescriptor(object); - } - return itemPropertyDescriptors; - } - - /** - * This adds a property descriptor for the Link Type feature. - * - * - * @generated - */ - protected void addLinkTypePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_linkType_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_linkType_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__LINK_TYPE, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This adds a property descriptor for the Predecessor feature. - * - * - * @generated - */ - protected void addPredecessorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_predecessor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_predecessor_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__PREDECESSOR, - true, - false, - true, - null, - null, - null)); - } - - /** - * This adds a property descriptor for the Successor feature. - * - * - * @generated - */ - protected void addSuccessorPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_WorkSequence_successor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_successor_feature", "_UI_WorkSequence_type"), - SimplepdlPackage.Literals.WORK_SEQUENCE__SUCCESSOR, - true, - false, - true, - null, - null, - null)); - } - - /** - * This returns WorkSequence.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/WorkSequence")); - } - - /** - * This returns the label text for the adapted class. - * - * - * @generated - */ - @Override - public String getText(Object object) { - WorkSequence ws = (WorkSequence) object; - WorkSequenceType labelValue = ws.getLinkType(); - String label = "--" + (labelValue == null ? "?" : labelValue.toString()) + "-->"; - String previous = ws.getPredecessor() == null ? "?" : ws.getPredecessor().getName(); - String next = ws.getSuccessor() == null ? "?" : ws.getSuccessor().getName(); - return label == null || label.length() == 0 ? - getString("_UI_WorkSequence_type") : - getString("_UI_WorkSequence_type") + " " + previous + " " + label + " " + next; - } - - - /** - * This handles model notifications by calling {@link #updateChildren} to update any cached - * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. - * - * - * @generated - */ - @Override - public void notifyChanged(Notification notification) { - updateChildren(notification); - - switch (notification.getFeatureID(WorkSequence.class)) { - case SimplepdlPackage.WORK_SEQUENCE__LINK_TYPE: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); - return; - } - super.notifyChanged(notification); - } - - /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children - * that can be created under this object. - * - * - * @generated - */ - @Override - protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { - super.collectNewChildDescriptors(newChildDescriptors, object); - } - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e0/8013482b9822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/e0/8013482b9822001c17faa9b6b0561c0f deleted file mode 100644 index cc97e19..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e0/8013482b9822001c17faa9b6b0561c0f +++ /dev/null @@ -1,274 +0,0 @@ -/** - */ -package simplepdl.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; -import org.eclipse.emf.ecore.util.InternalEList; - -import simplepdl.SimplepdlPackage; -import simplepdl.WorkDefinition; -import simplepdl.WorkSequence; - -/** - * - * An implementation of the model object 'Work Definition'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link simplepdl.impl.WorkDefinitionImpl#getLinksToPredecessors Links To Predecessors}
  • - *
  • {@link simplepdl.impl.WorkDefinitionImpl#getLinksToSuccessors Links To Successors}
  • - *
  • {@link simplepdl.impl.WorkDefinitionImpl#getName Name}
  • - *
- * - * @generated - */ -public class WorkDefinitionImpl extends ProcessElementImpl implements WorkDefinition { - /** - * The cached value of the '{@link #getLinksToPredecessors() Links To Predecessors}' reference list. - * - * - * @see #getLinksToPredecessors() - * @generated - * @ordered - */ - protected EList linksToPredecessors; - - /** - * The cached value of the '{@link #getLinksToSuccessors() Links To Successors}' reference list. - * - * - * @see #getLinksToSuccessors() - * @generated - * @ordered - */ - protected EList linksToSuccessors; - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * - * - * @generated - */ - protected WorkDefinitionImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return SimplepdlPackage.Literals.WORK_DEFINITION; - } - - /** - * - * - * @generated - */ - public EList getLinksToPredecessors() { - if (linksToPredecessors == null) { - linksToPredecessors = new EObjectWithInverseResolvingEList(WorkSequence.class, this, SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS, SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR); - } - return linksToPredecessors; - } - - /** - * - * - * @generated - */ - public EList getLinksToSuccessors() { - if (linksToSuccessors == null) { - linksToSuccessors = new EObjectWithInverseResolvingEList(WorkSequence.class, this, SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS, SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR); - } - return linksToSuccessors; - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.WORK_DEFINITION__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS: - return ((InternalEList)(InternalEList)getLinksToPredecessors()).basicAdd(otherEnd, msgs); - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS: - return ((InternalEList)(InternalEList)getLinksToSuccessors()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS: - return ((InternalEList)getLinksToPredecessors()).basicRemove(otherEnd, msgs); - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS: - return ((InternalEList)getLinksToSuccessors()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS: - return getLinksToPredecessors(); - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS: - return getLinksToSuccessors(); - case SimplepdlPackage.WORK_DEFINITION__NAME: - return getName(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS: - getLinksToPredecessors().clear(); - getLinksToPredecessors().addAll((Collection)newValue); - return; - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS: - getLinksToSuccessors().clear(); - getLinksToSuccessors().addAll((Collection)newValue); - return; - case SimplepdlPackage.WORK_DEFINITION__NAME: - setName((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS: - getLinksToPredecessors().clear(); - return; - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS: - getLinksToSuccessors().clear(); - return; - case SimplepdlPackage.WORK_DEFINITION__NAME: - setName(NAME_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS: - return linksToPredecessors != null && !linksToPredecessors.isEmpty(); - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS: - return linksToSuccessors != null && !linksToSuccessors.isEmpty(); - case SimplepdlPackage.WORK_DEFINITION__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuilder result = new StringBuilder(super.toString()); - result.append(" (name: "); - result.append(name); - result.append(')'); - return result.toString(); - } - -} //WorkDefinitionImpl diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e7/50976e439722001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/e7/50976e439722001c17faa9b6b0561c0f deleted file mode 100644 index b97ac9b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e7/50976e439722001c17faa9b6b0561c0f +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e7/e0d777a59c22001c118def180044d1da b/.metadata/.plugins/org.eclipse.core.resources/.history/e7/e0d777a59c22001c118def180044d1da deleted file mode 100644 index dcf0d50..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e7/e0d777a59c22001c118def180044d1da +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e9/809f10413c28001c1451a142d5f09209 b/.metadata/.plugins/org.eclipse.core.resources/.history/e9/809f10413c28001c1451a142d5f09209 new file mode 100644 index 0000000..edf702e --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/e9/809f10413c28001c1451a142d5f09209 @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ea/d0252a7e3228001c13dca9fa1eba29d5 b/.metadata/.plugins/org.eclipse.core.resources/.history/ea/d0252a7e3228001c13dca9fa1eba29d5 new file mode 100644 index 0000000..87a9243 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/ea/d0252a7e3228001c13dca9fa1eba29d5 @@ -0,0 +1,48 @@ +import 'SimplePDL.ecore' + +package simplepdl + +context Process +inv warningSeverity: false +inv withMessage('Explicit message in process ' + self.name + ' (withMessage)'): false + +context Process +inv validName('Invalid name: ' + self.name): + self.name.matches('[A-Za-z_][A-Za-z0-9_]*') + +context ProcessElement +def: process(): Process = + Process.allInstances() + ->select(p | p.processElements->includes(self)) + ->asSequence()->first() + +context WorkSequence +inv successorAndPredecessorInSameProcess('Activities not in the same process : ' + + self.predecessor.name + ' in ' + self.predecessor.process().name+ ' and ' + + self.successor.name + ' in ' + self.successor.process().name + ): + self.process() = self.successor.process() + and self.process() = self.predecessor.process() + +context Process +inv uniqNames: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w1, w2 | w1 = w2 or w1.name <> w2.name) + +context WorkSequence +inv notReflexive: self.predecessor <> self.successor + +context Process +inv nameMin2Char: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w | w.name.matches('..+')) + +context Process +inv weirdName: self.processElements + ->select(pe | pe.oclIsKindOf(WorkDefinition)) + ->collect(pe | pe.oclAsType(WorkDefinition)) + ->forAll(w | not w.name.matches('([0-9]*|[a-zA-Z]*|_*)')) + +endpackage \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/eb/006a29c43c28001c1451a142d5f09209 b/.metadata/.plugins/org.eclipse.core.resources/.history/eb/006a29c43c28001c1451a142d5f09209 new file mode 100644 index 0000000..553c6a8 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/eb/006a29c43c28001c1451a142d5f09209 @@ -0,0 +1,209 @@ +/** + */ +package petrinet.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import petrinet.Arc; +import petrinet.PetrinetPackage; +import petrinet.Place; + +/** + * This is the item provider adapter for a {@link petrinet.Arc} object. + * + * + * @generated + */ +public class ArcItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ArcItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addPoidsPropertyDescriptor(object); + addSortantPropertyDescriptor(object); + addCiblePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Poids feature. + * + * + * @generated + */ + protected void addPoidsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Arc_poids_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arc_poids_feature", "_UI_Arc_type"), + PetrinetPackage.Literals.ARC__POIDS, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Sortant feature. + * + * + * @generated + */ + protected void addSortantPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Arc_sortant_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arc_sortant_feature", "_UI_Arc_type"), + PetrinetPackage.Literals.ARC__SORTANT, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Cible feature. + * + * + * @generated + */ + protected void addCiblePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Arc_cible_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arc_cible_feature", "_UI_Arc_type"), + PetrinetPackage.Literals.ARC__CIBLE, + true, + false, + true, + null, + null, + null)); + } + + /** + * This returns Arc.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Arc")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + Arc arc = (Arc)object; + boolean sortant = ((Arc)object).isSortant(); + int poids = ((Arc)object).getPoids(); + String cible = ((Arc)object).getCible().getName(); + return sortant ? + "--" + poids + "-->" + cible : + "<--" + poids + "--" + cible; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Arc.class)) { + case PetrinetPackage.ARC__POIDS: + case PetrinetPackage.ARC__SORTANT: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return PetriNetEditPlugin.INSTANCE; + } + +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/eb/c0f4bfde9b22001c10fba84a9f2208e9 b/.metadata/.plugins/org.eclipse.core.resources/.history/eb/c0f4bfde9b22001c10fba84a9f2208e9 deleted file mode 100644 index 5501219..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/eb/c0f4bfde9b22001c10fba84a9f2208e9 +++ /dev/null @@ -1,1541 +0,0 @@ - - - - SimplePDL.ecore - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - italic - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - bold - - - - - - - - - - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - bold - - - labelSize - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - italic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ec/001e55be9a22001c12b4fa86d0abfe24 b/.metadata/.plugins/org.eclipse.core.resources/.history/ec/001e55be9a22001c12b4fa86d0abfe24 deleted file mode 100644 index 97b2cdd..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ec/001e55be9a22001c12b4fa86d0abfe24 +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ef/10fe90039822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/ef/10fe90039822001c17faa9b6b0561c0f deleted file mode 100644 index 6bc22d9..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ef/10fe90039822001c17faa9b6b0561c0f +++ /dev/null @@ -1,35 +0,0 @@ - - - SimplePDL.ecore - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f0/701c10339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/f0/701c10339822001c17faa9b6b0561c0f deleted file mode 100644 index 97521a3..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f0/701c10339822001c17faa9b6b0561c0f +++ /dev/null @@ -1,310 +0,0 @@ -/** - */ -package simplepdl.impl; - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import org.eclipse.emf.ecore.util.EObjectResolvingEList; -import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; -import org.eclipse.emf.ecore.util.InternalEList; - -import simplepdl.Request; -import simplepdl.SimplepdlPackage; -import simplepdl.WorkDefinition; -import simplepdl.WorkSequence; - -/** - * - * An implementation of the model object 'Work Definition'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link simplepdl.impl.WorkDefinitionImpl#getLinksToPredecessors Links To Predecessors}
  • - *
  • {@link simplepdl.impl.WorkDefinitionImpl#getLinksToSuccessors Links To Successors}
  • - *
  • {@link simplepdl.impl.WorkDefinitionImpl#getName Name}
  • - *
  • {@link simplepdl.impl.WorkDefinitionImpl#getRequests Requests}
  • - *
- * - * @generated - */ -public class WorkDefinitionImpl extends ProcessElementImpl implements WorkDefinition { - /** - * The cached value of the '{@link #getLinksToPredecessors() Links To Predecessors}' reference list. - * - * - * @see #getLinksToPredecessors() - * @generated - * @ordered - */ - protected EList linksToPredecessors; - - /** - * The cached value of the '{@link #getLinksToSuccessors() Links To Successors}' reference list. - * - * - * @see #getLinksToSuccessors() - * @generated - * @ordered - */ - protected EList linksToSuccessors; - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The cached value of the '{@link #getRequests() Requests}' reference list. - * - * - * @see #getRequests() - * @generated - * @ordered - */ - protected EList requests; - - /** - * - * - * @generated - */ - protected WorkDefinitionImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return SimplepdlPackage.Literals.WORK_DEFINITION; - } - - /** - * - * - * @generated - */ - public EList getLinksToPredecessors() { - if (linksToPredecessors == null) { - linksToPredecessors = new EObjectWithInverseResolvingEList(WorkSequence.class, this, SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS, SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR); - } - return linksToPredecessors; - } - - /** - * - * - * @generated - */ - public EList getLinksToSuccessors() { - if (linksToSuccessors == null) { - linksToSuccessors = new EObjectWithInverseResolvingEList(WorkSequence.class, this, SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS, SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR); - } - return linksToSuccessors; - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.WORK_DEFINITION__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public EList getRequests() { - if (requests == null) { - requests = new EObjectResolvingEList(Request.class, this, SimplepdlPackage.WORK_DEFINITION__REQUESTS); - } - return requests; - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS: - return ((InternalEList)(InternalEList)getLinksToPredecessors()).basicAdd(otherEnd, msgs); - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS: - return ((InternalEList)(InternalEList)getLinksToSuccessors()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS: - return ((InternalEList)getLinksToPredecessors()).basicRemove(otherEnd, msgs); - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS: - return ((InternalEList)getLinksToSuccessors()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS: - return getLinksToPredecessors(); - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS: - return getLinksToSuccessors(); - case SimplepdlPackage.WORK_DEFINITION__NAME: - return getName(); - case SimplepdlPackage.WORK_DEFINITION__REQUESTS: - return getRequests(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS: - getLinksToPredecessors().clear(); - getLinksToPredecessors().addAll((Collection)newValue); - return; - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS: - getLinksToSuccessors().clear(); - getLinksToSuccessors().addAll((Collection)newValue); - return; - case SimplepdlPackage.WORK_DEFINITION__NAME: - setName((String)newValue); - return; - case SimplepdlPackage.WORK_DEFINITION__REQUESTS: - getRequests().clear(); - getRequests().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS: - getLinksToPredecessors().clear(); - return; - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS: - getLinksToSuccessors().clear(); - return; - case SimplepdlPackage.WORK_DEFINITION__NAME: - setName(NAME_EDEFAULT); - return; - case SimplepdlPackage.WORK_DEFINITION__REQUESTS: - getRequests().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS: - return linksToPredecessors != null && !linksToPredecessors.isEmpty(); - case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS: - return linksToSuccessors != null && !linksToSuccessors.isEmpty(); - case SimplepdlPackage.WORK_DEFINITION__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case SimplepdlPackage.WORK_DEFINITION__REQUESTS: - return requests != null && !requests.isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuilder result = new StringBuilder(super.toString()); - result.append(" (name: "); - result.append(name); - result.append(')'); - return result.toString(); - } - -} //WorkDefinitionImpl diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f0/a02b8fdf9b22001c10fba84a9f2208e9 b/.metadata/.plugins/org.eclipse.core.resources/.history/f0/a02b8fdf9b22001c10fba84a9f2208e9 deleted file mode 100644 index dcf0d50..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f0/a02b8fdf9b22001c10fba84a9f2208e9 +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f4/70fe14339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/f4/70fe14339822001c17faa9b6b0561c0f deleted file mode 100644 index f780663..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f4/70fe14339822001c17faa9b6b0561c0f +++ /dev/null @@ -1,246 +0,0 @@ -/** - */ -package simplepdl.util; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; - -import org.eclipse.emf.ecore.util.Switch; - -import simplepdl.Guidance; -import simplepdl.ProcessElement; -import simplepdl.Request; -import simplepdl.Resource; -import simplepdl.SimplepdlPackage; -import simplepdl.WorkDefinition; -import simplepdl.WorkSequence; - -/** - * - * The Switch for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the caseXXX method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * - * @see simplepdl.SimplepdlPackage - * @generated - */ -public class SimplepdlSwitch extends Switch { - /** - * The cached model package - * - * - * @generated - */ - protected static SimplepdlPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public SimplepdlSwitch() { - if (modelPackage == null) { - modelPackage = SimplepdlPackage.eINSTANCE; - } - } - - /** - * Checks whether this is a switch for the given package. - * - * - * @param ePackage the package in question. - * @return whether this is a switch for the given package. - * @generated - */ - @Override - protected boolean isSwitchFor(EPackage ePackage) { - return ePackage == modelPackage; - } - - /** - * 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 - */ - @Override - protected T doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case SimplepdlPackage.PROCESS_ELEMENT: { - ProcessElement processElement = (ProcessElement)theEObject; - T result = caseProcessElement(processElement); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SimplepdlPackage.WORK_DEFINITION: { - WorkDefinition workDefinition = (WorkDefinition)theEObject; - T result = caseWorkDefinition(workDefinition); - if (result == null) result = caseProcessElement(workDefinition); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SimplepdlPackage.WORK_SEQUENCE: { - WorkSequence workSequence = (WorkSequence)theEObject; - T result = caseWorkSequence(workSequence); - if (result == null) result = caseProcessElement(workSequence); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SimplepdlPackage.GUIDANCE: { - Guidance guidance = (Guidance)theEObject; - T result = caseGuidance(guidance); - if (result == null) result = caseProcessElement(guidance); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SimplepdlPackage.PROCESS: { - simplepdl.Process process = (simplepdl.Process)theEObject; - T result = caseProcess(process); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SimplepdlPackage.REQUEST: { - Request request = (Request)theEObject; - T result = caseRequest(request); - if (result == null) result = defaultCase(theEObject); - return result; - } - case SimplepdlPackage.RESOURCE: { - Resource resource = (Resource)theEObject; - T result = caseResource(resource); - if (result == null) result = caseProcessElement(resource); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of 'Process Element'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Process Element'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseProcessElement(ProcessElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Work Definition'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Work Definition'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseWorkDefinition(WorkDefinition object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Work Sequence'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Work Sequence'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseWorkSequence(WorkSequence object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Guidance'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Guidance'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseGuidance(Guidance object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Process'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Process'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseProcess(simplepdl.Process object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Request'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Request'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseRequest(Request object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Resource'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Resource'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseResource(Resource object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'EObject'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - @Override - public T defaultCase(EObject object) { - return null; - } - -} //SimplepdlSwitch diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f7/f05411339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/f7/f05411339822001c17faa9b6b0561c0f deleted file mode 100644 index 9e6ab81..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f7/f05411339822001c17faa9b6b0561c0f +++ /dev/null @@ -1,366 +0,0 @@ -/** - */ -package simplepdl.impl; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import simplepdl.SimplepdlPackage; -import simplepdl.WorkDefinition; -import simplepdl.WorkSequence; -import simplepdl.WorkSequenceType; - -/** - * - * An implementation of the model object 'Work Sequence'. - * - *

- * The following features are implemented: - *

- *
    - *
  • {@link simplepdl.impl.WorkSequenceImpl#getLinkType Link Type}
  • - *
  • {@link simplepdl.impl.WorkSequenceImpl#getPredecessor Predecessor}
  • - *
  • {@link simplepdl.impl.WorkSequenceImpl#getSuccessor Successor}
  • - *
- * - * @generated - */ -public class WorkSequenceImpl extends ProcessElementImpl implements WorkSequence { - /** - * The default value of the '{@link #getLinkType() Link Type}' attribute. - * - * - * @see #getLinkType() - * @generated - * @ordered - */ - protected static final WorkSequenceType LINK_TYPE_EDEFAULT = WorkSequenceType.START_TO_START; - - /** - * The cached value of the '{@link #getLinkType() Link Type}' attribute. - * - * - * @see #getLinkType() - * @generated - * @ordered - */ - protected WorkSequenceType linkType = LINK_TYPE_EDEFAULT; - - /** - * The cached value of the '{@link #getPredecessor() Predecessor}' reference. - * - * - * @see #getPredecessor() - * @generated - * @ordered - */ - protected WorkDefinition predecessor; - - /** - * The cached value of the '{@link #getSuccessor() Successor}' reference. - * - * - * @see #getSuccessor() - * @generated - * @ordered - */ - protected WorkDefinition successor; - - /** - * - * - * @generated - */ - protected WorkSequenceImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return SimplepdlPackage.Literals.WORK_SEQUENCE; - } - - /** - * - * - * @generated - */ - public WorkSequenceType getLinkType() { - return linkType; - } - - /** - * - * - * @generated - */ - public void setLinkType(WorkSequenceType newLinkType) { - WorkSequenceType oldLinkType = linkType; - linkType = newLinkType == null ? LINK_TYPE_EDEFAULT : newLinkType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.WORK_SEQUENCE__LINK_TYPE, oldLinkType, linkType)); - } - - /** - * - * - * @generated - */ - public WorkDefinition getPredecessor() { - if (predecessor != null && predecessor.eIsProxy()) { - InternalEObject oldPredecessor = (InternalEObject)predecessor; - predecessor = (WorkDefinition)eResolveProxy(oldPredecessor); - if (predecessor != oldPredecessor) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR, oldPredecessor, predecessor)); - } - } - return predecessor; - } - - /** - * - * - * @generated - */ - public WorkDefinition basicGetPredecessor() { - return predecessor; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetPredecessor(WorkDefinition newPredecessor, NotificationChain msgs) { - WorkDefinition oldPredecessor = predecessor; - predecessor = newPredecessor; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR, oldPredecessor, newPredecessor); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setPredecessor(WorkDefinition newPredecessor) { - if (newPredecessor != predecessor) { - NotificationChain msgs = null; - if (predecessor != null) - msgs = ((InternalEObject)predecessor).eInverseRemove(this, SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS, WorkDefinition.class, msgs); - if (newPredecessor != null) - msgs = ((InternalEObject)newPredecessor).eInverseAdd(this, SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS, WorkDefinition.class, msgs); - msgs = basicSetPredecessor(newPredecessor, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR, newPredecessor, newPredecessor)); - } - - /** - * - * - * @generated - */ - public WorkDefinition getSuccessor() { - if (successor != null && successor.eIsProxy()) { - InternalEObject oldSuccessor = (InternalEObject)successor; - successor = (WorkDefinition)eResolveProxy(oldSuccessor); - if (successor != oldSuccessor) { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR, oldSuccessor, successor)); - } - } - return successor; - } - - /** - * - * - * @generated - */ - public WorkDefinition basicGetSuccessor() { - return successor; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetSuccessor(WorkDefinition newSuccessor, NotificationChain msgs) { - WorkDefinition oldSuccessor = successor; - successor = newSuccessor; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR, oldSuccessor, newSuccessor); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setSuccessor(WorkDefinition newSuccessor) { - if (newSuccessor != successor) { - NotificationChain msgs = null; - if (successor != null) - msgs = ((InternalEObject)successor).eInverseRemove(this, SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS, WorkDefinition.class, msgs); - if (newSuccessor != null) - msgs = ((InternalEObject)newSuccessor).eInverseAdd(this, SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS, WorkDefinition.class, msgs); - msgs = basicSetSuccessor(newSuccessor, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR, newSuccessor, newSuccessor)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR: - if (predecessor != null) - msgs = ((InternalEObject)predecessor).eInverseRemove(this, SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS, WorkDefinition.class, msgs); - return basicSetPredecessor((WorkDefinition)otherEnd, msgs); - case SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR: - if (successor != null) - msgs = ((InternalEObject)successor).eInverseRemove(this, SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS, WorkDefinition.class, msgs); - return basicSetSuccessor((WorkDefinition)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR: - return basicSetPredecessor(null, msgs); - case SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR: - return basicSetSuccessor(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SimplepdlPackage.WORK_SEQUENCE__LINK_TYPE: - return getLinkType(); - case SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR: - if (resolve) return getPredecessor(); - return basicGetPredecessor(); - case SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR: - if (resolve) return getSuccessor(); - return basicGetSuccessor(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case SimplepdlPackage.WORK_SEQUENCE__LINK_TYPE: - setLinkType((WorkSequenceType)newValue); - return; - case SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR: - setPredecessor((WorkDefinition)newValue); - return; - case SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR: - setSuccessor((WorkDefinition)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case SimplepdlPackage.WORK_SEQUENCE__LINK_TYPE: - setLinkType(LINK_TYPE_EDEFAULT); - return; - case SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR: - setPredecessor((WorkDefinition)null); - return; - case SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR: - setSuccessor((WorkDefinition)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case SimplepdlPackage.WORK_SEQUENCE__LINK_TYPE: - return linkType != LINK_TYPE_EDEFAULT; - case SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR: - return predecessor != null; - case SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR: - return successor != null; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuilder result = new StringBuilder(super.toString()); - result.append(" (linkType: "); - result.append(linkType); - result.append(')'); - return result.toString(); - } - -} //WorkSequenceImpl diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f9/00ed13339822001c17faa9b6b0561c0f b/.metadata/.plugins/org.eclipse.core.resources/.history/f9/00ed13339822001c17faa9b6b0561c0f deleted file mode 100644 index cba0f24..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f9/00ed13339822001c17faa9b6b0561c0f +++ /dev/null @@ -1,234 +0,0 @@ -/** - */ -package simplepdl.util; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; - -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; - -import org.eclipse.emf.ecore.EObject; - -import simplepdl.Guidance; -import simplepdl.ProcessElement; -import simplepdl.Request; -import simplepdl.Resource; -import simplepdl.SimplepdlPackage; -import simplepdl.WorkDefinition; -import simplepdl.WorkSequence; - -/** - * - * The Adapter Factory for the model. - * It provides an adapter createXXX method for each class of the model. - * - * @see simplepdl.SimplepdlPackage - * @generated - */ -public class SimplepdlAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * - * - * @generated - */ - protected static SimplepdlPackage modelPackage; - - /** - * Creates an instance of the adapter factory. - * - * - * @generated - */ - public SimplepdlAdapterFactory() { - if (modelPackage == null) { - modelPackage = SimplepdlPackage.eINSTANCE; - } - } - - /** - * Returns whether this factory is applicable for the type of the object. - * - * This implementation returns true if the object is either the model's package or is an instance object of the model. - * - * @return whether this factory is applicable for the type of the object. - * @generated - */ - @Override - public boolean isFactoryForType(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch that delegates to the createXXX methods. - * - * - * @generated - */ - protected SimplepdlSwitch modelSwitch = - new SimplepdlSwitch() { - @Override - public Adapter caseProcessElement(ProcessElement object) { - return createProcessElementAdapter(); - } - @Override - public Adapter caseWorkDefinition(WorkDefinition object) { - return createWorkDefinitionAdapter(); - } - @Override - public Adapter caseWorkSequence(WorkSequence object) { - return createWorkSequenceAdapter(); - } - @Override - public Adapter caseGuidance(Guidance object) { - return createGuidanceAdapter(); - } - @Override - public Adapter caseProcess(simplepdl.Process object) { - return createProcessAdapter(); - } - @Override - public Adapter caseRequest(Request object) { - return createRequestAdapter(); - } - @Override - public Adapter caseResource(Resource object) { - return createResourceAdapter(); - } - @Override - public Adapter defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * Creates an adapter for the target. - * - * - * @param target the object to adapt. - * @return the adapter for the target. - * @generated - */ - @Override - public Adapter createAdapter(Notifier target) { - return modelSwitch.doSwitch((EObject)target); - } - - - /** - * Creates a new adapter for an object of class '{@link simplepdl.ProcessElement Process Element}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see simplepdl.ProcessElement - * @generated - */ - public Adapter createProcessElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link simplepdl.WorkDefinition Work Definition}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see simplepdl.WorkDefinition - * @generated - */ - public Adapter createWorkDefinitionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link simplepdl.WorkSequence Work Sequence}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see simplepdl.WorkSequence - * @generated - */ - public Adapter createWorkSequenceAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link simplepdl.Guidance Guidance}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see simplepdl.Guidance - * @generated - */ - public Adapter createGuidanceAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link simplepdl.Process Process}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see simplepdl.Process - * @generated - */ - public Adapter createProcessAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link simplepdl.Request Request}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see simplepdl.Request - * @generated - */ - public Adapter createRequestAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link simplepdl.Resource Resource}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see simplepdl.Resource - * @generated - */ - public Adapter createResourceAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. - * - * This default implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - -} //SimplepdlAdapterFactory diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNET.toTINA/.indexes/e4/cc/89/27/1d/b9/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNET.toTINA/.indexes/e4/cc/89/27/1d/b9/history.index deleted file mode 100644 index c8a9f47..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNET.toTINA/.indexes/e4/cc/89/27/1d/b9/history.index and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNET.toTINA/.markers b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNET.toTINA/.markers deleted file mode 100644 index 1d5a6e7..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNET.toTINA/.markers and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNET.toTINA/org.eclipse.acceleo.common/acceleo.state.dat b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNET.toTINA/org.eclipse.acceleo.common/acceleo.state.dat deleted file mode 100644 index c95d97b..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNET.toTINA/org.eclipse.acceleo.common/acceleo.state.dat and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNET.toTINA/org.eclipse.jdt.core/state.dat b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNET.toTINA/org.eclipse.jdt.core/state.dat deleted file mode 100644 index 23c5f2f..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNET.toTINA/org.eclipse.jdt.core/state.dat and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.edit/.indexes/e4/47/f/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.edit/.indexes/e4/47/f/history.index new file mode 100644 index 0000000..2cbbcfb Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.edit/.indexes/e4/47/f/history.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.edit/.markers b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.edit/.markers new file mode 100644 index 0000000..f9abfe9 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.edit/.markers differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.edit/org.eclipse.jdt.core/state.dat b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.edit/org.eclipse.jdt.core/state.dat new file mode 100644 index 0000000..989e4cc Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.edit/org.eclipse.jdt.core/state.dat differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.editor/.markers b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.editor/.markers new file mode 100644 index 0000000..90c8d78 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.editor/.markers differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.editor/org.eclipse.jdt.core/state.dat b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.editor/org.eclipse.jdt.core/state.dat new file mode 100644 index 0000000..54f97e6 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.editor/org.eclipse.jdt.core/state.dat differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.exemple/.indexes/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.exemple/.indexes/history.index new file mode 100644 index 0000000..ed755dd Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.exemple/.indexes/history.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.feature/.indexes/properties.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.feature/.indexes/properties.index new file mode 100644 index 0000000..9c72f60 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.feature/.indexes/properties.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.tests/.markers b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.tests/.markers new file mode 100644 index 0000000..879f49d Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.tests/.markers differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.tests/org.eclipse.jdt.core/state.dat b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.tests/org.eclipse.jdt.core/state.dat new file mode 100644 index 0000000..b4cbd4c Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet.tests/org.eclipse.jdt.core/state.dat differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet/.indexes/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet/.indexes/history.index index 6251796..4452292 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet/.indexes/history.index and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet/.indexes/history.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet/.markers b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet/.markers new file mode 100644 index 0000000..9cdb63d Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet/.markers differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet/org.eclipse.jdt.core/state.dat b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet/org.eclipse.jdt.core/state.dat new file mode 100644 index 0000000..132c264 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petriNet/org.eclipse.jdt.core/state.dat differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDF.todot/.markers b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDF.todot/.markers index 6c558b7..02a7ebf 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDF.todot/.markers and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDF.todot/.markers differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDF.todot/org.eclipse.acceleo.common/acceleo.state.dat b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDF.todot/org.eclipse.acceleo.common/acceleo.state.dat index a7cbb69..4cc647a 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDF.todot/org.eclipse.acceleo.common/acceleo.state.dat and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDF.todot/org.eclipse.acceleo.common/acceleo.state.dat differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDF.todot/org.eclipse.jdt.core/state.dat b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDF.todot/org.eclipse.jdt.core/state.dat index cb96835..7c0b3c9 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDF.todot/org.eclipse.jdt.core/state.dat and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDF.todot/org.eclipse.jdt.core/state.dat differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.design/.markers b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.design/.markers index 89e1acc..a00c5fd 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.design/.markers and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.design/.markers differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.design/org.eclipse.jdt.core/state.dat b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.design/org.eclipse.jdt.core/state.dat index 7c062d6..c39111f 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.design/org.eclipse.jdt.core/state.dat and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.design/org.eclipse.jdt.core/state.dat differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.edit/.indexes/e4/fa/f/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.edit/.indexes/e4/fa/f/history.index index 7c39aca..4b5467a 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.edit/.indexes/e4/fa/f/history.index and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.edit/.indexes/e4/fa/f/history.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.edit/.markers b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.edit/.markers index 95cdcb4..4c54e14 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.edit/.markers and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.edit/.markers differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.edit/org.eclipse.jdt.core/state.dat b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.edit/org.eclipse.jdt.core/state.dat index 44f5223..b4cf754 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.edit/org.eclipse.jdt.core/state.dat and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.edit/org.eclipse.jdt.core/state.dat differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.editor/.indexes/e4/fa/1a/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.editor/.indexes/e4/fa/1a/history.index deleted file mode 100644 index 4cf7091..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.editor/.indexes/e4/fa/1a/history.index and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.editor/.markers b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.editor/.markers index fcc7d56..7e52384 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.editor/.markers and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.editor/.markers differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.editor/org.eclipse.jdt.core/state.dat b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.editor/org.eclipse.jdt.core/state.dat index f3c3d2b..541d1ce 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.editor/org.eclipse.jdt.core/state.dat and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.editor/org.eclipse.jdt.core/state.dat differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.exemple/.indexes/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.exemple/.indexes/history.index deleted file mode 100644 index e176fef..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.exemple/.indexes/history.index and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.feature/.indexes/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.feature/.indexes/history.index index 41e0b0c..9363443 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.feature/.indexes/history.index and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.feature/.indexes/history.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.samples/.indexes/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.samples/.indexes/history.index index cb5b5cd..e073021 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.samples/.indexes/history.index and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.samples/.indexes/history.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.tests/.markers b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.tests/.markers index a896f70..7772097 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.tests/.markers and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.tests/.markers differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.tests/org.eclipse.jdt.core/state.dat b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.tests/org.eclipse.jdt.core/state.dat index 26629f9..6a9f283 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.tests/org.eclipse.jdt.core/state.dat and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.tests/org.eclipse.jdt.core/state.dat differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML.ui/.markers b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML.ui/.markers index eb13ad6..4ad8bcc 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML.ui/.markers and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML.ui/.markers differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML.ui/org.eclipse.jdt.core/state.dat b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML.ui/org.eclipse.jdt.core/state.dat index 1ddbb19..7aa6c30 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML.ui/org.eclipse.jdt.core/state.dat and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML.ui/org.eclipse.jdt.core/state.dat differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML/.markers b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML/.markers index bad3a73..1d79d5d 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML/.markers and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML/.markers differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML/org.eclipse.acceleo.common/acceleo.state.dat b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML/org.eclipse.acceleo.common/acceleo.state.dat index e6c1096..5965748 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML/org.eclipse.acceleo.common/acceleo.state.dat and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML/org.eclipse.acceleo.common/acceleo.state.dat differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML/org.eclipse.jdt.core/state.dat b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML/org.eclipse.jdt.core/state.dat index 425fa95..8e66b80 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML/org.eclipse.jdt.core/state.dat and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL.toHTML/org.eclipse.jdt.core/state.dat differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/e4/fa/1/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/e4/fa/1/history.index index 8b0fead..0ed41c5 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/e4/fa/1/history.index and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/e4/fa/1/history.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/e4/fa/2/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/e4/fa/2/history.index deleted file mode 100644 index ba53994..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/e4/fa/2/history.index and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/e4/fa/20/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/e4/fa/20/history.index deleted file mode 100644 index 25a4177..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/e4/fa/20/history.index and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/e4/fa/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/e4/fa/history.index deleted file mode 100644 index 82c6d4b..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/e4/fa/history.index and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/f9/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/f9/history.index deleted file mode 100644 index ab812b4..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/f9/history.index and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/history.index index 5051bfe..9ca97ec 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/history.index and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.indexes/history.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.markers b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.markers index 86daf90..a53515e 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.markers and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/.markers differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/org.eclipse.jdt.core/state.dat b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/org.eclipse.jdt.core/state.dat index 5ebb35f..2a773c8 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/org.eclipse.jdt.core/state.dat and b/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplePDL/org.eclipse.jdt.core/state.dat differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index index c7b1ac5..7bde54e 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index and b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/41.tree b/.metadata/.plugins/org.eclipse.core.resources/.root/41.tree deleted file mode 100644 index 2d0611c..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.root/41.tree and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/48.tree b/.metadata/.plugins/org.eclipse.core.resources/.root/48.tree new file mode 100644 index 0000000..ee02bc2 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.root/48.tree differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources index df9c184..c82b90d 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources and b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources differ diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs index f5b3265..7a7ca6d 100644 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs @@ -1,5 +1,5 @@ PROBLEMS_FILTERS_MIGRATE=true eclipse.preferences.version=1 -platformState=1631777710724 +platformState=1631777710646 quickStart=false tipsAndTricks=true diff --git a/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml b/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml index 17004d2..34a75c5 100644 --- a/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml +++ b/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml @@ -2,10 +2,10 @@ - - + + @@ -23,10 +23,10 @@ - - + + diff --git a/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi index 2fd0afb..565d20e 100644 --- a/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi +++ b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi @@ -1,6 +1,6 @@ - + activeSchemeId:org.eclipse.ui.defaultAcceleratorConfiguration ModelMigrationProcessor.001 @@ -13,7 +13,7 @@ topLevel shellMaximized - + persp.actionSet:org.eclipse.mylyn.doc.actionSet @@ -504,7 +504,8 @@ NoClose - + + Minimized View categoryTag:General @@ -519,7 +520,7 @@ - + View categoryTag:General @@ -601,6 +602,7 @@ org.eclipse.e4.primaryNavigationStack + active View categoryTag:General @@ -864,36 +866,14 @@ categoryTag:Help - + org.eclipse.e4.primaryDataStack EditorStack - active - noFocus - - + + Editor removeOnHide - simplepdl.presentation.SimplepdlEditorID - - - - Editor - removeOnHide - org.eclipse.sirius.editor.editorPlugin.SiriusEditorID - active - activeOnClose - - - - Editor - removeOnHide - org.eclipse.sirius.diagram.ui.part.SiriusDiagramEditorID - - - - Editor - removeOnHide - org.eclipse.emf.ecore.presentation.EcoreEditorID + petrinet.presentation.PetrinetEditorID @@ -903,11 +883,13 @@ View categoryTag:General + active + activeOnClose ViewMenu menuContribution:menu - + @@ -971,7 +953,7 @@ - + View categoryTag:General @@ -1026,7 +1008,7 @@ ViewMenu menuContribution:menu - + @@ -1203,8 +1185,14 @@ + View categoryTag:Ecore Tools + + ViewMenu + menuContribution:menu + + @@ -1276,7 +1264,7 @@ ViewMenu menuContribution:menu - + @@ -1285,7 +1273,7 @@ Draggable - + toolbarSeparator @@ -1304,7 +1292,7 @@ Draggable - + Draggable @@ -1325,7 +1313,7 @@ Draggable - + toolbarSeparator diff --git a/.metadata/.plugins/org.eclipse.jdt.core/144863826.index b/.metadata/.plugins/org.eclipse.jdt.core/144863826.index new file mode 100644 index 0000000..f43490f Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/144863826.index differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/1811219029.index b/.metadata/.plugins/org.eclipse.jdt.core/1811219029.index index 9afd3f6..a3a856b 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/1811219029.index and b/.metadata/.plugins/org.eclipse.jdt.core/1811219029.index differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/2199960114.index b/.metadata/.plugins/org.eclipse.jdt.core/2199960114.index new file mode 100644 index 0000000..25ebf4c Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/2199960114.index differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/2574233358.index b/.metadata/.plugins/org.eclipse.jdt.core/2574233358.index new file mode 100644 index 0000000..02bd068 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/2574233358.index differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/3311238943.index b/.metadata/.plugins/org.eclipse.jdt.core/3311238943.index new file mode 100644 index 0000000..6c23abf Binary files /dev/null and b/.metadata/.plugins/org.eclipse.jdt.core/3311238943.index differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/3952884170.index b/.metadata/.plugins/org.eclipse.jdt.core/3952884170.index index 9250267..008859f 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/3952884170.index and b/.metadata/.plugins/org.eclipse.jdt.core/3952884170.index differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/4138038359.index b/.metadata/.plugins/org.eclipse.jdt.core/4138038359.index index 41dead3..a7ccf95 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/4138038359.index and b/.metadata/.plugins/org.eclipse.jdt.core/4138038359.index differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/473783695.index b/.metadata/.plugins/org.eclipse.jdt.core/473783695.index deleted file mode 100644 index 61d4e3c..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/473783695.index and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache b/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache index 6f8a233..009c1dc 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache and b/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps b/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps index 0489bc8..b34de94 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps and b/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache b/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache index e4e1736..721ba91 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache and b/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt b/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt index 4d5a999..e3ce874 100644 --- a/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt +++ b/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt @@ -1,55 +1,34 @@ INDEX VERSION 1.131+/home/lfainsin/miniproj_idm/.metadata/.plugins/org.eclipse.jdt.core -3386340968.index -1969063402.index -3499872082.index -1744987098.index -3370953800.index -1492316222.index -4244811416.index -3228602193.index -1027991553.index -701648383.index -1259215892.index -301638575.index -646308851.index -2944618107.index -1332398772.index -2133193807.index -618880026.index -764202902.index -594756272.index -2382583475.index -1288722511.index -1001394679.index -264048023.index -3952884170.index -836787774.index -361289234.index -1811219029.index -870911012.index -4138038359.index -489623180.index -3591232502.index -649822626.index -4270576026.index -3761123150.index -69115327.index -1190385766.index -325625695.index -2469834123.index -316017877.index -113784225.index -3232868127.index -2479976885.index -830761727.index -1638374812.index -473783695.index -2684007147.index -3756796416.index -3952712414.index -124733140.index -3144173601.index -243785569.index 687162898.index 910095251.index -1366149182.index +144863826.index +3386340968.index +618880026.index +3761123150.index +264048023.index +1259215892.index +325625695.index +3952884170.index +2382583475.index +4138038359.index +3952712414.index +2479976885.index +3144173601.index +2469834123.index +764202902.index +3311238943.index +830761727.index +316017877.index +301638575.index +1190385766.index +1492316222.index +594756272.index +3232868127.index +2574233358.index +489623180.index +3370953800.index +1027991553.index +2199960114.index +3756796416.index +1811219029.index +3591232502.index diff --git a/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat b/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat index 318c970..3bdb017 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat and b/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat differ diff --git a/.metadata/.plugins/org.eclipse.jdt.launching/.install.xml b/.metadata/.plugins/org.eclipse.jdt.launching/.install.xml index 6d14388..f077c48 100644 --- a/.metadata/.plugins/org.eclipse.jdt.launching/.install.xml +++ b/.metadata/.plugins/org.eclipse.jdt.launching/.install.xml @@ -1,4 +1,4 @@ - + diff --git a/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2021/10/40/refactorings.history b/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2021/10/40/refactorings.history index 295bc38..e2b163b 100644 --- a/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2021/10/40/refactorings.history +++ b/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2021/10/40/refactorings.history @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2021/10/40/refactorings.index b/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2021/10/40/refactorings.index index 176cab7..2800c1c 100644 --- a/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2021/10/40/refactorings.index +++ b/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2021/10/40/refactorings.index @@ -7,3 +7,5 @@ 1633509120043 Delete resource 'fr.n7.simplePDF.design' 1633509911075 Delete resource 'fr.n7.simplePDL.samples' 1633509916235 Delete resource 'fr.n7.simplePDL.design' +1633700610254 Delete resource 'fr.n7.petriNET.toTINA' +1633700784924 Delete resource 'fr.n7.petriNet.totina' diff --git a/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.simplePDL/2021/10/40/refactorings.history b/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.simplePDL/2021/10/40/refactorings.history index a86098c..ee9f5da 100644 --- a/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.simplePDL/2021/10/40/refactorings.history +++ b/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.simplePDL/2021/10/40/refactorings.history @@ -1,4 +1,3 @@ - - + \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.simplePDL/2021/10/40/refactorings.index b/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.simplePDL/2021/10/40/refactorings.index index 2047baf..34dd602 100644 --- a/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.simplePDL/2021/10/40/refactorings.index +++ b/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.simplePDL/2021/10/40/refactorings.index @@ -1 +1,5 @@ 1633447567750 Delete element +1633694834445 Delete element +1633696885403 Rename resource 'nouvea.ocl' +1633697354847 Delete element +1633697367306 Rename resource 'Process-k0.xmi' diff --git a/.metadata/.plugins/org.eclipse.ocl.xtext.essentialocl.ui/dialog_settings.xml b/.metadata/.plugins/org.eclipse.ocl.xtext.essentialocl.ui/dialog_settings.xml new file mode 100644 index 0000000..5ca0b77 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.ocl.xtext.essentialocl.ui/dialog_settings.xml @@ -0,0 +1,3 @@ + +
+
diff --git a/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties b/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties index f08cee2..30ad952 100644 --- a/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties +++ b/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties @@ -1,2 +1,2 @@ #Cached timestamps -#Wed Oct 06 11:58:35 CEST 2021 +#Fri Oct 08 15:46:28 CEST 2021 diff --git a/.metadata/.plugins/org.eclipse.pde.core/.extensions/.contributions.1 b/.metadata/.plugins/org.eclipse.pde.core/.extensions/.contributions.1 index 5d15d2c..eb2a7c4 100644 Binary files a/.metadata/.plugins/org.eclipse.pde.core/.extensions/.contributions.1 and b/.metadata/.plugins/org.eclipse.pde.core/.extensions/.contributions.1 differ diff --git a/.metadata/.plugins/org.eclipse.pde.core/.extensions/.contributors.1 b/.metadata/.plugins/org.eclipse.pde.core/.extensions/.contributors.1 index 00e849f..218787a 100644 Binary files a/.metadata/.plugins/org.eclipse.pde.core/.extensions/.contributors.1 and b/.metadata/.plugins/org.eclipse.pde.core/.extensions/.contributors.1 differ diff --git a/.metadata/.plugins/org.eclipse.pde.core/.extensions/.extraData.1 b/.metadata/.plugins/org.eclipse.pde.core/.extensions/.extraData.1 index 16e023f..2abf42b 100644 Binary files a/.metadata/.plugins/org.eclipse.pde.core/.extensions/.extraData.1 and b/.metadata/.plugins/org.eclipse.pde.core/.extensions/.extraData.1 differ diff --git a/.metadata/.plugins/org.eclipse.pde.core/.extensions/.mainData.1 b/.metadata/.plugins/org.eclipse.pde.core/.extensions/.mainData.1 index f1920ce..72132c0 100644 Binary files a/.metadata/.plugins/org.eclipse.pde.core/.extensions/.mainData.1 and b/.metadata/.plugins/org.eclipse.pde.core/.extensions/.mainData.1 differ diff --git a/.metadata/.plugins/org.eclipse.pde.core/.extensions/.manager/.fileTable.7 b/.metadata/.plugins/org.eclipse.pde.core/.extensions/.manager/.fileTable.7 index 33e5373..feacee6 100644 --- a/.metadata/.plugins/org.eclipse.pde.core/.extensions/.manager/.fileTable.7 +++ b/.metadata/.plugins/org.eclipse.pde.core/.extensions/.manager/.fileTable.7 @@ -1,5 +1,5 @@ #safe table -#Wed Oct 06 11:58:35 CEST 2021 +#Fri Oct 08 15:46:28 CEST 2021 .orphans=0 .mainData=0 .contributors=0 @@ -7,4 +7,4 @@ .extraData=0 .contributions=0 .table=0 -.crc6c137557.v1 +.crc5e92d8d4.v1 diff --git a/.metadata/.plugins/org.eclipse.pde.core/.extensions/.manager/.fileTable.8 b/.metadata/.plugins/org.eclipse.pde.core/.extensions/.manager/.fileTable.8 index 83c8a33..39ab9a0 100644 --- a/.metadata/.plugins/org.eclipse.pde.core/.extensions/.manager/.fileTable.8 +++ b/.metadata/.plugins/org.eclipse.pde.core/.extensions/.manager/.fileTable.8 @@ -1,5 +1,5 @@ #safe table -#Wed Oct 06 11:58:35 CEST 2021 +#Fri Oct 08 15:46:29 CEST 2021 .orphans=1 .mainData=1 .contributors=1 @@ -7,4 +7,4 @@ .extraData=1 .contributions=1 .table=1 -.crca3614f6c.v1 +.crc9d5e2202.v1 diff --git a/.metadata/.plugins/org.eclipse.pde.core/.extensions/.namespaces.1 b/.metadata/.plugins/org.eclipse.pde.core/.extensions/.namespaces.1 index 716e6f1..c1b738b 100644 Binary files a/.metadata/.plugins/org.eclipse.pde.core/.extensions/.namespaces.1 and b/.metadata/.plugins/org.eclipse.pde.core/.extensions/.namespaces.1 differ diff --git a/.metadata/.plugins/org.eclipse.pde.core/.extensions/.orphans.1 b/.metadata/.plugins/org.eclipse.pde.core/.extensions/.orphans.1 index c44c703..3974f88 100644 Binary files a/.metadata/.plugins/org.eclipse.pde.core/.extensions/.orphans.1 and b/.metadata/.plugins/org.eclipse.pde.core/.extensions/.orphans.1 differ diff --git a/.metadata/.plugins/org.eclipse.pde.core/.extensions/.table.1 b/.metadata/.plugins/org.eclipse.pde.core/.extensions/.table.1 index 832f543..19107a2 100644 Binary files a/.metadata/.plugins/org.eclipse.pde.core/.extensions/.table.1 and b/.metadata/.plugins/org.eclipse.pde.core/.extensions/.table.1 differ diff --git a/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-10.profile b/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-10.profile index c8ab27b..f25060f 100644 --- a/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-10.profile +++ b/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-10.profile @@ -1,4 +1,4 @@ -#Tue Oct 05 17:03:07 CEST 2021 +#Fri Oct 08 15:38:54 CEST 2021 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.osgi.framework.executionenvironment=OSGi/Minimum-1.0, OSGi/Minimum-1.1, OSGi/Minimum-1.2, JavaSE/compact1-1.8, JavaSE/compact2-1.8, JavaSE/compact3-1.8, JRE-1.1, J2SE-1.2, J2SE-1.3, J2SE-1.4, J2SE-1.5, JavaSE-1.6, JavaSE-1.7, JavaSE-1.8, JavaSE-9, JavaSE-10 org.eclipse.jdt.core.compiler.codegen.targetPlatform=10 diff --git a/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-11.profile b/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-11.profile index 6048389..6eb4036 100644 --- a/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-11.profile +++ b/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-11.profile @@ -1,4 +1,4 @@ -#Tue Oct 05 17:03:07 CEST 2021 +#Fri Oct 08 15:38:54 CEST 2021 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.osgi.framework.executionenvironment=OSGi/Minimum-1.0, OSGi/Minimum-1.1, OSGi/Minimum-1.2, JavaSE/compact1-1.8, JavaSE/compact2-1.8, JavaSE/compact3-1.8, JRE-1.1, J2SE-1.2, J2SE-1.3, J2SE-1.4, J2SE-1.5, JavaSE-1.6, JavaSE-1.7, JavaSE-1.8, JavaSE-9, JavaSE-10, JavaSE-11 org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 diff --git a/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-12.profile b/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-12.profile index e37d62d..3b11f01 100644 --- a/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-12.profile +++ b/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-12.profile @@ -1,4 +1,4 @@ -#Tue Oct 05 17:03:07 CEST 2021 +#Fri Oct 08 15:38:54 CEST 2021 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.osgi.framework.executionenvironment=OSGi/Minimum-1.0, OSGi/Minimum-1.1, OSGi/Minimum-1.2, JavaSE/compact1-1.8, JavaSE/compact2-1.8, JavaSE/compact3-1.8, JRE-1.1, J2SE-1.2, J2SE-1.3, J2SE-1.4, J2SE-1.5, JavaSE-1.6, JavaSE-1.7, JavaSE-1.8, JavaSE-9, JavaSE-10, JavaSE-11, JavaSE-12 org.eclipse.jdt.core.compiler.codegen.targetPlatform=12 diff --git a/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-13.profile b/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-13.profile index 5beeadc..1660188 100644 --- a/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-13.profile +++ b/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-13.profile @@ -1,4 +1,4 @@ -#Tue Oct 05 17:03:07 CEST 2021 +#Fri Oct 08 15:38:54 CEST 2021 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.osgi.framework.executionenvironment=OSGi/Minimum-1.0, OSGi/Minimum-1.1, OSGi/Minimum-1.2, JavaSE/compact1-1.8, JavaSE/compact2-1.8, JavaSE/compact3-1.8, JRE-1.1, J2SE-1.2, J2SE-1.3, J2SE-1.4, J2SE-1.5, JavaSE-1.6, JavaSE-1.7, JavaSE-1.8, JavaSE-9, JavaSE-10, JavaSE-11, JavaSE-12, JavaSE-13 org.eclipse.jdt.core.compiler.codegen.targetPlatform=13 diff --git a/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-14.profile b/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-14.profile index b2c59df..1f54405 100644 --- a/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-14.profile +++ b/.metadata/.plugins/org.eclipse.pde.core/.profiles/JavaSE-14.profile @@ -1,4 +1,4 @@ -#Tue Oct 05 17:03:07 CEST 2021 +#Fri Oct 08 15:38:54 CEST 2021 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.osgi.framework.executionenvironment=OSGi/Minimum-1.0, OSGi/Minimum-1.1, OSGi/Minimum-1.2, JavaSE/compact1-1.8, JavaSE/compact2-1.8, JavaSE/compact3-1.8, JRE-1.1, J2SE-1.2, J2SE-1.3, J2SE-1.4, J2SE-1.5, JavaSE-1.6, JavaSE-1.7, JavaSE-1.8, JavaSE-9, JavaSE-10, JavaSE-11, JavaSE-12, JavaSE-13, JavaSE-14 org.eclipse.jdt.core.compiler.codegen.targetPlatform=14 diff --git a/.metadata/.plugins/org.eclipse.pde.core/SavedExternalPluginList.txt b/.metadata/.plugins/org.eclipse.pde.core/SavedExternalPluginList.txt index eafda12..017f324 100644 --- a/.metadata/.plugins/org.eclipse.pde.core/SavedExternalPluginList.txt +++ b/.metadata/.plugins/org.eclipse.pde.core/SavedExternalPluginList.txt @@ -1,4 +1,4 @@ -# List of external plug-in models previously loaded. Timestamp: 1633511383397 +# List of external plug-in models previously loaded. Timestamp: 1633700394280 file:/mnt/n7fs/ens/tp_cregut/eclipse-gls-2020-09/plugins/org.eclipse.equinox.p2.publisher.eclipse.source_1.3.700.v20200828-0839.jar file:/mnt/n7fs/ens/tp_cregut/eclipse-gls-2020-09/plugins/org.eclipse.emf.transaction.ui_1.4.0.201805140824.jar file:/mnt/n7fs/ens/tp_cregut/eclipse-gls-2020-09/plugins/org.eclipse.sirius.table.ui_6.4.1.202012210908.jar diff --git a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/artifacts.xml b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/artifacts.xml index 1521f0d..fc1ccae 100644 --- a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/artifacts.xml +++ b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/artifacts.xml @@ -1,8 +1,8 @@ - + - + @@ -10,41 +10,31 @@ - - - - - - - - - - - - - - - - - + + - + - + - + - + - + - + - + + + + + + diff --git a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/content.xml b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/content.xml index 3840ae3..de104a6 100644 --- a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/content.xml +++ b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/content.xml @@ -1,116 +1,25 @@ - + - + - - - + + + - + - - - - - - - - - - - - - - - - - - - fr.n7.simplePDL.tests - - - - - - - - - - - Bundle-SymbolicName: fr.n7.simplePDL.tests;singleton:=true Bundle-Version: 1.0.0.202110051703 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - fr.n7.simplePDL.toHTML.ui - - - - - - - - - - - Bundle-SymbolicName: fr.n7.simplePDL.toHTML.ui;singleton:=true Bundle-Version: 1.0.0.202110051703 - - - - - - - - - - - - - - - - - - - - + + + + @@ -120,133 +29,74 @@ - - - - - fr.n7.simplePDL - - - - - - - - - - - Bundle-SymbolicName: fr.n7.simplePDL;singleton:=true Bundle-Version: 1.0.0.202110051703 - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - fr.n7.simplePDL.edit + fr.n7.petriNet.edit - + - Bundle-SymbolicName: fr.n7.simplePDL.edit;singleton:=true Bundle-Version: 1.0.0.202110051703 + Bundle-SymbolicName: fr.n7.petriNet.edit;singleton:=true Bundle-Version: 1.0.0.202110081538 - - - - - + + + + + + + - - - - - - - - - - + + - - - - - - - - - - - - - - - - fr.n7.simplePDL.toHTML - - + + + + + + + + (org.eclipse.update.install.features=true) + + - - - - - - - - Bundle-SymbolicName: fr.n7.simplePDL.toHTML Bundle-Version: 1.0.0.202110051703 - - - + + + + [Enter License Description here.] + + + + [Enter Copyright Description here.] + - + - + - + - + (org.eclipse.update.install.features=true) - + @@ -265,20 +115,64 @@ [Enter Copyright Description here.] - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + fr.n7.petriNet + + + + + + + + + + + Bundle-SymbolicName: fr.n7.petriNet;singleton:=true Bundle-Version: 1.0.0.202110081538 + + + + + + + + - - - - + + + + @@ -289,61 +183,71 @@ - + - fr.n7.simplePDL.editor + fr.n7.petriNet.editor - + - Bundle-SymbolicName: fr.n7.simplePDL.editor;singleton:=true Bundle-Version: 1.0.0.202110051703 + Bundle-SymbolicName: fr.n7.petriNet.editor;singleton:=true Bundle-Version: 1.0.0.202110081538 - - - - - - - + + + + + + + + - - + + + + + + + + + + + - - - - - - - - - - (org.eclipse.update.install.features=true) - - + + + + + + + + fr.n7.petriNet.tests + + - - - - [Enter License Description here.] - - - - [Enter Copyright Description here.] - + + + + + + + + Bundle-SymbolicName: fr.n7.petriNet.tests;singleton:=true Bundle-Version: 1.0.0.202110081538 + + + diff --git a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/features/fr.n7.petriNet.feature_1.0.0.202110081538.jar b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/features/fr.n7.petriNet.feature_1.0.0.202110081538.jar new file mode 100644 index 0000000..d39dd85 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/features/fr.n7.petriNet.feature_1.0.0.202110081538.jar differ diff --git a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/features/fr.n7.simplePDL.feature_1.0.0.202110051703.jar b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/features/fr.n7.simplePDL.feature_1.0.0.202110051703.jar deleted file mode 100644 index 7ec545e..0000000 Binary files a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/features/fr.n7.simplePDL.feature_1.0.0.202110051703.jar and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.petriNet.edit_1.0.0.202110081538.jar b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.petriNet.edit_1.0.0.202110081538.jar new file mode 100644 index 0000000..0dfaedd Binary files /dev/null and b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.petriNet.edit_1.0.0.202110081538.jar differ diff --git a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.petriNet.editor_1.0.0.202110081538.jar b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.petriNet.editor_1.0.0.202110081538.jar new file mode 100644 index 0000000..f1f2bb2 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.petriNet.editor_1.0.0.202110081538.jar differ diff --git a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.petriNet.tests_1.0.0.202110081538.jar b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.petriNet.tests_1.0.0.202110081538.jar new file mode 100644 index 0000000..9edb39d Binary files /dev/null and b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.petriNet.tests_1.0.0.202110081538.jar differ diff --git a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.petriNet_1.0.0.202110081538.jar b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.petriNet_1.0.0.202110081538.jar new file mode 100644 index 0000000..e91e683 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.petriNet_1.0.0.202110081538.jar differ diff --git a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.simplePDL.edit_1.0.0.202110051703.jar b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.simplePDL.edit_1.0.0.202110051703.jar deleted file mode 100644 index a32f233..0000000 Binary files a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.simplePDL.edit_1.0.0.202110051703.jar and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.simplePDL.editor_1.0.0.202110051703.jar b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.simplePDL.editor_1.0.0.202110051703.jar deleted file mode 100644 index 0a885fa..0000000 Binary files a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.simplePDL.editor_1.0.0.202110051703.jar and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.simplePDL.tests_1.0.0.202110051703.jar b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.simplePDL.tests_1.0.0.202110051703.jar deleted file mode 100644 index daace9e..0000000 Binary files a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.simplePDL.tests_1.0.0.202110051703.jar and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.simplePDL.toHTML.ui_1.0.0.202110051703.jar b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.simplePDL.toHTML.ui_1.0.0.202110051703.jar deleted file mode 100644 index 245997d..0000000 Binary files a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.simplePDL.toHTML.ui_1.0.0.202110051703.jar and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.simplePDL.toHTML_1.0.0.202110051703.jar b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.simplePDL.toHTML_1.0.0.202110051703.jar deleted file mode 100644 index 760fcdb..0000000 Binary files a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.simplePDL.toHTML_1.0.0.202110051703.jar and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.simplePDL_1.0.0.202110051703.jar b/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.simplePDL_1.0.0.202110051703.jar deleted file mode 100644 index aaed27b..0000000 Binary files a/.metadata/.plugins/org.eclipse.pde.core/tempp2metadata/plugins/fr.n7.simplePDL_1.0.0.202110051703.jar and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml b/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml index 97924b4..746ef01 100644 --- a/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml +++ b/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml @@ -1,9 +1,10 @@
- + - + +
diff --git a/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml b/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml index 82e2754..0df7985 100644 --- a/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml +++ b/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml @@ -27,9 +27,9 @@
- + - +
diff --git a/.metadata/version.ini b/.metadata/version.ini index be14dfb..ac4cf65 100644 --- a/.metadata/version.ini +++ b/.metadata/version.ini @@ -1,3 +1,3 @@ -#Wed Oct 06 11:09:38 CEST 2021 +#Fri Oct 08 15:39:47 CEST 2021 org.eclipse.core.runtime=2 org.eclipse.platform=4.17.0.v20200902-1800 diff --git a/fr.n7.petriNET.toTINA/src/fr/n7/petriNET/toTINA/main/ToTINA.java b/fr.n7.petriNET.toTINA/src/fr/n7/petriNET/toTINA/main/ToTINA.java deleted file mode 100644 index 1cc62fd..0000000 --- a/fr.n7.petriNET.toTINA/src/fr/n7/petriNET/toTINA/main/ToTINA.java +++ /dev/null @@ -1,421 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2012 Obeo. - * 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Obeo - initial API and implementation - *******************************************************************************/ -package fr.n7.petriNET.toTINA.main; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.acceleo.engine.event.IAcceleoTextGenerationListener; -import org.eclipse.acceleo.engine.generation.strategy.IAcceleoGenerationStrategy; -import org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator; -import org.eclipse.emf.common.util.BasicMonitor; -import org.eclipse.emf.common.util.Monitor; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.resource.ResourceSet; - -import simplepdl.SimplepdlPackage; - -/** - * Entry point of the 'ToTINA' generation module. - * - * @generated - */ -public class ToTINA extends AbstractAcceleoGenerator { - /** - * The name of the module. - * - * @generated - */ - public static final String MODULE_FILE_NAME = "/fr/n7/petriNET/toTINA/main/toTINA"; - - /** - * The name of the templates that are to be generated. - * - * @generated - */ - public static final String[] TEMPLATE_NAMES = { "networkToTINA" }; - - /** - * The list of properties files from the launch parameters (Launch configuration). - * - * @generated - */ - private List propertiesFiles = new ArrayList(); - - /** - * Allows the public constructor to be used. Note that a generator created - * this way cannot be used to launch generations before one of - * {@link #initialize(EObject, File, List)} or - * {@link #initialize(URI, File, List)} is called. - *

- * The main reason for this constructor is to allow clients of this - * generation to call it from another Java file, as it allows for the - * retrieval of {@link #getProperties()} and - * {@link #getGenerationListeners()}. - *

- * - * @generated - */ - public ToTINA() { - // Empty implementation - } - - /** - * This allows clients to instantiates a generator with all required information. - * - * @param modelURI - * URI where the model on which this generator will be used is located. - * @param targetFolder - * This will be used as the output folder for this generation : it will be the base path - * against which all file block URLs will be resolved. - * @param arguments - * If the template which will be called requires more than one argument taken from the model, - * pass them here. - * @throws IOException - * This can be thrown in three scenarios : the module cannot be found, it cannot be loaded, or - * the model cannot be loaded. - * @generated - */ - public ToTINA(URI modelURI, File targetFolder, - List arguments) throws IOException { - initialize(modelURI, targetFolder, arguments); - } - - /** - * This allows clients to instantiates a generator with all required information. - * - * @param model - * We'll iterate over the content of this element to find Objects matching the first parameter - * of the template we need to call. - * @param targetFolder - * This will be used as the output folder for this generation : it will be the base path - * against which all file block URLs will be resolved. - * @param arguments - * If the template which will be called requires more than one argument taken from the model, - * pass them here. - * @throws IOException - * This can be thrown in two scenarios : the module cannot be found, or it cannot be loaded. - * @generated - */ - public ToTINA(EObject model, File targetFolder, - List arguments) throws IOException { - initialize(model, targetFolder, arguments); - } - - /** - * This can be used to launch the generation from a standalone application. - * - * @param args - * Arguments of the generation. - * @generated - */ - public static void main(String[] args) { - try { - if (args.length < 2) { - System.out.println("Arguments not valid : {model, folder}."); - } else { - URI modelURI = URI.createFileURI(args[0]); - File folder = new File(args[1]); - - List arguments = new ArrayList(); - - /* - * If you want to change the content of this method, do NOT forget to change the "@generated" - * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation - * of the Acceleo module with the main template that has caused the creation of this class will - * revert your modifications. - */ - - /* - * Add in this list all the arguments used by the starting point of the generation - * If your main template is called on an element of your model and a String, you can - * add in "arguments" this "String" attribute. - */ - - ToTINA generator = new ToTINA(modelURI, folder, arguments); - - /* - * Add the properties from the launch arguments. - * If you want to programmatically add new properties, add them in "propertiesFiles" - * You can add the absolute path of a properties files, or even a project relative path. - * If you want to add another "protocol" for your properties files, please override - * "getPropertiesLoaderService(AcceleoService)" in order to return a new property loader. - * The behavior of the properties loader service is explained in the Acceleo documentation - * (Help -> Help Contents). - */ - - for (int i = 2; i < args.length; i++) { - generator.addPropertiesFile(args[i]); - } - - generator.doGenerate(new BasicMonitor()); - } - } catch (IOException e) { - e.printStackTrace(); - } - } - - /** - * Launches the generation described by this instance. - * - * @param monitor - * This will be used to display progress information to the user. - * @throws IOException - * This will be thrown if any of the output files cannot be saved to disk. - * @generated - */ - @Override - public void doGenerate(Monitor monitor) throws IOException { - /* - * TODO if you wish to change the generation as a whole, override this. The default behavior should - * be sufficient in most cases. If you want to change the content of this method, do NOT forget to - * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, - * any compilation of the Acceleo module with the main template that has caused the creation of this - * class will revert your modifications. If you encounter a problem with an unresolved proxy during the - * generation, you can remove the comments in the following instructions to check for problems. Please - * note that those instructions may have a significant impact on the performances. - */ - - //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); - - /* - * If you want to check for potential errors in your models before the launch of the generation, you - * use the code below. - */ - - //if (model != null && model.eResource() != null) { - // List errors = model.eResource().getErrors(); - // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { - // System.err.println(diagnostic.toString()); - // } - //} - - super.doGenerate(monitor); - } - - /** - * If this generator needs to listen to text generation events, listeners can be returned from here. - * - * @return List of listeners that are to be notified when text is generated through this launch. - * @generated - */ - @Override - public List getGenerationListeners() { - List listeners = super.getGenerationListeners(); - /* - * TODO if you need to listen to generation event, add listeners to the list here. If you want to change - * the content of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method - * to "@generated NOT". Without this new tag, any compilation of the Acceleo module with the main template - * that has caused the creation of this class will revert your modifications. - */ - return listeners; - } - - /** - * If you need to change the way files are generated, this is your entry point. - *

- * The default is {@link org.eclipse.acceleo.engine.generation.strategy.DefaultStrategy}; it generates - * files on the fly. If you only need to preview the results, return a new - * {@link org.eclipse.acceleo.engine.generation.strategy.PreviewStrategy}. Both of these aren't aware of - * the running Eclipse and can be used standalone. - *

- *

- * If you need the file generation to be aware of the workspace (A typical example is when you wanna - * override files that are under clear case or any other VCS that could forbid the overriding), then - * return a new {@link org.eclipse.acceleo.engine.generation.strategy.WorkspaceAwareStrategy}. - * Note, however, that this cannot be used standalone. - *

- *

- * All three of these default strategies support merging through JMerge. - *

- * - * @return The generation strategy that is to be used for generations launched through this launcher. - * @generated - */ - @Override - public IAcceleoGenerationStrategy getGenerationStrategy() { - return super.getGenerationStrategy(); - } - - /** - * This will be called in order to find and load the module that will be launched through this launcher. - * We expect this name not to contain file extension, and the module to be located beside the launcher. - * - * @return The name of the module that is to be launched. - * @generated - */ - @Override - public String getModuleName() { - return MODULE_FILE_NAME; - } - - /** - * If the module(s) called by this launcher require properties files, return their qualified path from - * here.Take note that the first added properties files will take precedence over subsequent ones if they - * contain conflicting keys. - * - * @return The list of properties file we need to add to the generation context. - * @see java.util.ResourceBundle#getBundle(String) - * @generated - */ - @Override - public List getProperties() { - /* - * If you want to change the content of this method, do NOT forget to change the "@generated" - * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation - * of the Acceleo module with the main template that has caused the creation of this class will - * revert your modifications. - */ - - /* - * TODO if your generation module requires access to properties files, add their qualified path to the list here. - * - * Properties files can be located in an Eclipse plug-in or in the file system (all Acceleo projects are Eclipse - * plug-in). In order to use properties files located in an Eclipse plugin, you need to add the path of the properties - * files to the "propertiesFiles" list: - * - * final String prefix = "platform:/plugin/"; - * final String pluginName = "org.eclipse.acceleo.module.sample"; - * final String packagePath = "/org/eclipse/acceleo/module/sample/properties/"; - * final String fileName = "default.properties"; - * propertiesFiles.add(prefix + pluginName + packagePath + fileName); - * - * With this mechanism, you can load properties files from your plugin or from another plugin. - * - * You may want to load properties files from the file system, for that you need to add the absolute path of the file: - * - * propertiesFiles.add("C:\Users\MyName\MyFile.properties"); - * - * If you want to let your users add properties files located in the same folder as the model: - * - * if (EMFPlugin.IS_ECLIPSE_RUNNING && model != null && model.eResource() != null) { - * propertiesFiles.addAll(AcceleoEngineUtils.getPropertiesFilesNearModel(model.eResource())); - * } - * - * To learn more about Properties Files, have a look at the Acceleo documentation (Help -> Help Contents). - */ - return propertiesFiles; - } - - /** - * Adds a properties file in the list of properties files. - * - * @param propertiesFile - * The properties file to add. - * @generated - * @since 3.1 - */ - @Override - public void addPropertiesFile(String propertiesFile) { - this.propertiesFiles.add(propertiesFile); - } - - /** - * This will be used to get the list of templates that are to be launched by this launcher. - * - * @return The list of templates to call on the module {@link #getModuleName()}. - * @generated - */ - @Override - public String[] getTemplateNames() { - return TEMPLATE_NAMES; - } - - /** - * This can be used to update the resource set's package registry with all needed EPackages. - * - * @param resourceSet - * The resource set which registry has to be updated. - * @generated NOT - */ - @Override - public void registerPackages(ResourceSet resourceSet) { - super.registerPackages(resourceSet); - - - if (!isInWorkspace(PetrinetPackage.class)) - resourceSet.getPackageRegistry().put( - PetrinetPackage.eNS_URI, PetrinetPackage.eINSTANCE); - - - - /* - * If you want to change the content of this method, do NOT forget to change the "@generated" - * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation - * of the Acceleo module with the main template that has caused the creation of this class will - * revert your modifications. - */ - - /* - * If you need additional package registrations, you can register them here. The following line - * (in comment) is an example of the package registration for UML. - * - * You can use the method "isInWorkspace(Class c)" to check if the package that you are about to - * register is in the workspace. - * - * To register a package properly, please follow the following conventions: - * - * If the package is located in another plug-in, already installed in Eclipse. The following content should - * have been generated at the beginning of this method. Do not register the package using this mechanism if - * the metamodel is located in the workspace. - * - * if (!isInWorkspace(UMLPackage.class)) { - * // The normal package registration if your metamodel is in a plugin. - * resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE); - * } - * - * If the package is located in another project in your workspace, the plugin containing the package has not - * been register by EMF and Acceleo should register it automatically. If you want to use the generator in - * stand alone, the regular registration (seen a couple lines before) is needed. - * - * To learn more about Package Registration, have a look at the Acceleo documentation (Help -> Help Contents). - */ - } - - /** - * This can be used to update the resource set's resource factory registry with all needed factories. - * - * @param resourceSet - * The resource set which registry has to be updated. - * @generated - */ - @Override - public void registerResourceFactories(ResourceSet resourceSet) { - super.registerResourceFactories(resourceSet); - /* - * If you want to change the content of this method, do NOT forget to change the "@generated" - * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation - * of the Acceleo module with the main template that has caused the creation of this class will - * revert your modifications. - */ - - /* - * TODO If you need additional resource factories registrations, you can register them here. the following line - * (in comment) is an example of the resource factory registration. - * - * If you want to use the generator in stand alone, the resource factory registration will be required. - * - * To learn more about the registration of Resource Factories, have a look at the Acceleo documentation (Help -> Help Contents). - */ - - // resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(XyzResource.FILE_EXTENSION, XyzResource.Factory.INSTANCE); - - /* - * Some metamodels require a very complex setup for standalone usage. For example, if you want to use a generator - * targetting UML models in standalone, you NEED to use the following: - */ - // UMLResourcesUtil.init(resourceSet) - } - -} diff --git a/fr.n7.petriNET.toTINA/src/fr/n7/petriNET/toTINA/main/toTINA.mtl b/fr.n7.petriNET.toTINA/src/fr/n7/petriNET/toTINA/main/toTINA.mtl deleted file mode 100644 index 8bf83a5..0000000 --- a/fr.n7.petriNET.toTINA/src/fr/n7/petriNET/toTINA/main/toTINA.mtl +++ /dev/null @@ -1,10 +0,0 @@ -[comment encoding = UTF-8 /] -[module toTINA('http://petrinet')] - - -[template public networkToTINA(aReseau : Reseau)] -[comment @main/] -[file (aReseau.name, false, 'UTF-8')] - -[/file] -[/template] diff --git a/fr.n7.petriNet.edit/.classpath b/fr.n7.petriNet.edit/.classpath new file mode 100644 index 0000000..c3ba59e --- /dev/null +++ b/fr.n7.petriNet.edit/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/fr.n7.petriNet.edit/.project b/fr.n7.petriNet.edit/.project new file mode 100644 index 0000000..b340a26 --- /dev/null +++ b/fr.n7.petriNet.edit/.project @@ -0,0 +1,28 @@ + + + fr.n7.petriNet.edit + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/fr.n7.petriNet.edit/META-INF/MANIFEST.MF b/fr.n7.petriNet.edit/META-INF/MANIFEST.MF new file mode 100644 index 0000000..276535f --- /dev/null +++ b/fr.n7.petriNet.edit/META-INF/MANIFEST.MF @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: fr.n7.petriNet.edit;singleton:=true +Automatic-Module-Name: fr.n7.petriNet.edit +Bundle-Version: 1.0.0.qualifier +Bundle-ClassPath: . +Bundle-Activator: petrinet.provider.PetriNetEditPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Export-Package: petrinet.provider +Require-Bundle: org.eclipse.core.runtime, + fr.n7.petriNet;visibility:=reexport, + org.eclipse.emf.edit;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/fr.n7.petriNet.edit/build.properties b/fr.n7.petriNet.edit/build.properties new file mode 100644 index 0000000..6e3e902 --- /dev/null +++ b/fr.n7.petriNet.edit/build.properties @@ -0,0 +1,10 @@ +# + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/ +output.. = bin/ diff --git a/fr.n7.petriNet.edit/icons/full/ctool16/CreateReseau_noeuds_Place.gif b/fr.n7.petriNet.edit/icons/full/ctool16/CreateReseau_noeuds_Place.gif new file mode 100644 index 0000000..831a90a Binary files /dev/null and b/fr.n7.petriNet.edit/icons/full/ctool16/CreateReseau_noeuds_Place.gif differ diff --git a/fr.n7.petriNet.edit/icons/full/ctool16/CreateReseau_noeuds_Transition.gif b/fr.n7.petriNet.edit/icons/full/ctool16/CreateReseau_noeuds_Transition.gif new file mode 100644 index 0000000..b6bdc38 Binary files /dev/null and b/fr.n7.petriNet.edit/icons/full/ctool16/CreateReseau_noeuds_Transition.gif differ diff --git a/fr.n7.petriNet.edit/icons/full/ctool16/CreateTransition_arcs_Arc.gif b/fr.n7.petriNet.edit/icons/full/ctool16/CreateTransition_arcs_Arc.gif new file mode 100644 index 0000000..b3c6924 Binary files /dev/null and b/fr.n7.petriNet.edit/icons/full/ctool16/CreateTransition_arcs_Arc.gif differ diff --git a/fr.n7.petriNet.edit/icons/full/obj16/Arc.gif b/fr.n7.petriNet.edit/icons/full/obj16/Arc.gif new file mode 100644 index 0000000..90d10f9 Binary files /dev/null and b/fr.n7.petriNet.edit/icons/full/obj16/Arc.gif differ diff --git a/fr.n7.petriNet.edit/icons/full/obj16/Place.gif b/fr.n7.petriNet.edit/icons/full/obj16/Place.gif new file mode 100644 index 0000000..e4bc22d Binary files /dev/null and b/fr.n7.petriNet.edit/icons/full/obj16/Place.gif differ diff --git a/fr.n7.petriNet.edit/icons/full/obj16/Reseau.gif b/fr.n7.petriNet.edit/icons/full/obj16/Reseau.gif new file mode 100644 index 0000000..c8d381f Binary files /dev/null and b/fr.n7.petriNet.edit/icons/full/obj16/Reseau.gif differ diff --git a/fr.n7.petriNet.edit/icons/full/obj16/Transition.gif b/fr.n7.petriNet.edit/icons/full/obj16/Transition.gif new file mode 100644 index 0000000..7bac4fd Binary files /dev/null and b/fr.n7.petriNet.edit/icons/full/obj16/Transition.gif differ diff --git a/fr.n7.petriNet.edit/plugin.properties b/fr.n7.petriNet.edit/plugin.properties new file mode 100644 index 0000000..ef34d03 --- /dev/null +++ b/fr.n7.petriNet.edit/plugin.properties @@ -0,0 +1,33 @@ +# + +pluginName = PetriNet Edit Support +providerName = www.example.org + +_UI_CreateChild_text = {0} +_UI_CreateChild_text2 = {1} {0} +_UI_CreateChild_text3 = {1} +_UI_CreateChild_tooltip = Create New {0} Under {1} Feature +_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. +_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. + +_UI_PropertyDescriptor_description = The {0} of the {1} + +_UI_Place_type = Place +_UI_Transition_type = Transition +_UI_Arc_type = Arc +_UI_Noeud_type = Noeud +_UI_Reseau_type = Reseau +_UI_Unknown_type = Object + +_UI_Unknown_datatype= Value + +_UI_Place_jetons_feature = Jetons +_UI_Transition_arcs_feature = Arcs +_UI_Arc_poids_feature = Poids +_UI_Arc_sortant_feature = Sortant +_UI_Arc_cible_feature = Cible +_UI_Noeud_name_feature = Name +_UI_Reseau_noeuds_feature = Noeuds +_UI_Reseau_name_feature = Name +_UI_Unknown_feature = Unspecified + diff --git a/fr.n7.petriNet.edit/plugin.xml b/fr.n7.petriNet.edit/plugin.xml new file mode 100644 index 0000000..cb49885 --- /dev/null +++ b/fr.n7.petriNet.edit/plugin.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a/d0be6a029e22001c1223fc7c4469a572 b/fr.n7.petriNet.edit/src/petrinet/provider/ArcItemProvider.java similarity index 65% rename from .metadata/.plugins/org.eclipse.core.resources/.history/a/d0be6a029e22001c1223fc7c4469a572 rename to fr.n7.petriNet.edit/src/petrinet/provider/ArcItemProvider.java index d20b02a..58d9d4a 100644 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a/d0be6a029e22001c1223fc7c4469a572 +++ b/fr.n7.petriNet.edit/src/petrinet/provider/ArcItemProvider.java @@ -1,6 +1,6 @@ /** */ -package simplepdl.provider; +package petrinet.provider; import java.util.Collection; @@ -22,16 +22,16 @@ import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ItemProviderAdapter; import org.eclipse.emf.edit.provider.ViewerNotification; -import simplepdl.Request; -import simplepdl.SimplepdlPackage; +import petrinet.Arc; +import petrinet.PetrinetPackage; /** - * This is the item provider adapter for a {@link simplepdl.Request} object. + * This is the item provider adapter for a {@link petrinet.Arc} object. * * * @generated */ -public class RequestItemProvider +public class ArcItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, @@ -45,7 +45,7 @@ public class RequestItemProvider * * @generated */ - public RequestItemProvider(AdapterFactory adapterFactory) { + public ArcItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } @@ -60,26 +60,27 @@ public class RequestItemProvider if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); - addQuantityPropertyDescriptor(object); - addTargetPropertyDescriptor(object); + addPoidsPropertyDescriptor(object); + addSortantPropertyDescriptor(object); + addCiblePropertyDescriptor(object); } return itemPropertyDescriptors; } /** - * This adds a property descriptor for the Quantity feature. + * This adds a property descriptor for the Poids feature. * * * @generated */ - protected void addQuantityPropertyDescriptor(Object object) { + protected void addPoidsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_Request_quantity_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Request_quantity_feature", "_UI_Request_type"), - SimplepdlPackage.Literals.REQUEST__QUANTITY, + getString("_UI_Arc_poids_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arc_poids_feature", "_UI_Arc_type"), + PetrinetPackage.Literals.ARC__POIDS, true, false, false, @@ -89,19 +90,41 @@ public class RequestItemProvider } /** - * This adds a property descriptor for the Target feature. + * This adds a property descriptor for the Sortant feature. * * * @generated */ - protected void addTargetPropertyDescriptor(Object object) { + protected void addSortantPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_Request_target_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Request_target_feature", "_UI_Request_type"), - SimplepdlPackage.Literals.REQUEST__TARGET, + getString("_UI_Arc_sortant_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arc_sortant_feature", "_UI_Arc_type"), + PetrinetPackage.Literals.ARC__SORTANT, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Cible feature. + * + * + * @generated + */ + protected void addCiblePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Arc_cible_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Arc_cible_feature", "_UI_Arc_type"), + PetrinetPackage.Literals.ARC__CIBLE, true, false, true, @@ -111,14 +134,14 @@ public class RequestItemProvider } /** - * This returns Request.gif. + * This returns Arc.gif. * * * @generated */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/Request")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/Arc")); } /** @@ -129,8 +152,12 @@ public class RequestItemProvider */ @Override public String getText(Object object) { - Request request = (Request)object; - return getString("_UI_Request_type") + " -" + request.getQuantity() + " -> " + request.getTarget().getName(); + boolean sortant = ((Arc)object).isSortant(); + int poids = ((Arc)object).getPoids(); + String cible = ((Arc)object).getCible().getName(); + return sortant ? + "--" + poids + "--> " + cible : + "<--" + poids + "-- " + cible; } @@ -145,8 +172,9 @@ public class RequestItemProvider public void notifyChanged(Notification notification) { updateChildren(notification); - switch (notification.getFeatureID(Request.class)) { - case SimplepdlPackage.REQUEST__QUANTITY: + switch (notification.getFeatureID(Arc.class)) { + case PetrinetPackage.ARC__POIDS: + case PetrinetPackage.ARC__SORTANT: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } @@ -173,7 +201,7 @@ public class RequestItemProvider */ @Override public ResourceLocator getResourceLocator() { - return SimplePDLEditPlugin.INSTANCE; + return PetriNetEditPlugin.INSTANCE; } } diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f6/a096fc6e9d22001c118def180044d1da b/fr.n7.petriNet.edit/src/petrinet/provider/NoeudItemProvider.java similarity index 63% rename from .metadata/.plugins/org.eclipse.core.resources/.history/f6/a096fc6e9d22001c118def180044d1da rename to fr.n7.petriNet.edit/src/petrinet/provider/NoeudItemProvider.java index 280974b..3690952 100644 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f6/a096fc6e9d22001c118def180044d1da +++ b/fr.n7.petriNet.edit/src/petrinet/provider/NoeudItemProvider.java @@ -1,6 +1,6 @@ /** */ -package simplepdl.provider; +package petrinet.provider; import java.util.Collection; @@ -22,16 +22,16 @@ import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ItemProviderAdapter; import org.eclipse.emf.edit.provider.ViewerNotification; -import simplepdl.Request; -import simplepdl.SimplepdlPackage; +import petrinet.Noeud; +import petrinet.PetrinetPackage; /** - * This is the item provider adapter for a {@link simplepdl.Request} object. + * This is the item provider adapter for a {@link petrinet.Noeud} object. * * * @generated */ -public class RequestItemProvider +public class NoeudItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, @@ -45,7 +45,7 @@ public class RequestItemProvider * * @generated */ - public RequestItemProvider(AdapterFactory adapterFactory) { + public NoeudItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } @@ -60,67 +60,33 @@ public class RequestItemProvider if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); - addQuantityPropertyDescriptor(object); - addTargetPropertyDescriptor(object); + addNamePropertyDescriptor(object); } return itemPropertyDescriptors; } /** - * This adds a property descriptor for the Quantity feature. + * This adds a property descriptor for the Name feature. * * * @generated */ - protected void addQuantityPropertyDescriptor(Object object) { + protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_Request_quantity_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Request_quantity_feature", "_UI_Request_type"), - SimplepdlPackage.Literals.REQUEST__QUANTITY, + getString("_UI_Noeud_name_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Noeud_name_feature", "_UI_Noeud_type"), + PetrinetPackage.Literals.NOEUD__NAME, true, false, false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } - /** - * This adds a property descriptor for the Target feature. - * - * - * @generated - */ - protected void addTargetPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Request_target_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Request_target_feature", "_UI_Request_type"), - SimplepdlPackage.Literals.REQUEST__TARGET, - true, - false, - true, - null, - null, - null)); - } - - /** - * This returns Request.gif. - * - * - * @generated - */ - @Override - public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/Request")); - } - /** * This returns the label text for the adapted class. * @@ -129,8 +95,10 @@ public class RequestItemProvider */ @Override public String getText(Object object) { - Request request = (Request)object; - return getString("_UI_Request_type") + " " + request.getQuantity(); + String label = ((Noeud)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Noeud_type") : + getString("_UI_Noeud_type") + " " + label; } @@ -145,8 +113,8 @@ public class RequestItemProvider public void notifyChanged(Notification notification) { updateChildren(notification); - switch (notification.getFeatureID(Request.class)) { - case SimplepdlPackage.REQUEST__QUANTITY: + switch (notification.getFeatureID(Noeud.class)) { + case PetrinetPackage.NOEUD__NAME: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } @@ -173,7 +141,7 @@ public class RequestItemProvider */ @Override public ResourceLocator getResourceLocator() { - return SimplePDLEditPlugin.INSTANCE; + return PetriNetEditPlugin.INSTANCE; } } diff --git a/fr.n7.petriNet.edit/src/petrinet/provider/PetriNetEditPlugin.java b/fr.n7.petriNet.edit/src/petrinet/provider/PetriNetEditPlugin.java new file mode 100644 index 0000000..4e20250 --- /dev/null +++ b/fr.n7.petriNet.edit/src/petrinet/provider/PetriNetEditPlugin.java @@ -0,0 +1,89 @@ +/** + */ +package petrinet.provider; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +/** + * This is the central singleton for the PetriNet edit plugin. + * + * + * @generated + */ +public final class PetriNetEditPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final PetriNetEditPlugin INSTANCE = new PetriNetEditPlugin(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public PetriNetEditPlugin() { + super + (new ResourceLocator [] { + }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/fr.n7.petriNet.edit/src/petrinet/provider/PetrinetItemProviderAdapterFactory.java b/fr.n7.petriNet.edit/src/petrinet/provider/PetrinetItemProviderAdapterFactory.java new file mode 100644 index 0000000..a7b8466 --- /dev/null +++ b/fr.n7.petriNet.edit/src/petrinet/provider/PetrinetItemProviderAdapterFactory.java @@ -0,0 +1,271 @@ +/** + */ +package petrinet.provider; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import petrinet.util.PetrinetAdapterFactory; + +/** + * This is the factory that is used to provide the interfaces needed to support Viewers. + * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. + * The adapters also support Eclipse property sheets. + * Note that most of the adapters are shared among multiple instances. + * + * + * @generated + */ +public class PetrinetItemProviderAdapterFactory extends PetrinetAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this adapter factory. + * + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. + * + * + * @generated + */ + protected Collection supportedTypes = new ArrayList(); + + /** + * This constructs an instance. + * + * + * @generated + */ + public PetrinetItemProviderAdapterFactory() { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all {@link petrinet.Place} instances. + * + * + * @generated + */ + protected PlaceItemProvider placeItemProvider; + + /** + * This creates an adapter for a {@link petrinet.Place}. + * + * + * @generated + */ + @Override + public Adapter createPlaceAdapter() { + if (placeItemProvider == null) { + placeItemProvider = new PlaceItemProvider(this); + } + + return placeItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link petrinet.Transition} instances. + * + * + * @generated + */ + protected TransitionItemProvider transitionItemProvider; + + /** + * This creates an adapter for a {@link petrinet.Transition}. + * + * + * @generated + */ + @Override + public Adapter createTransitionAdapter() { + if (transitionItemProvider == null) { + transitionItemProvider = new TransitionItemProvider(this); + } + + return transitionItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link petrinet.Arc} instances. + * + * + * @generated + */ + protected ArcItemProvider arcItemProvider; + + /** + * This creates an adapter for a {@link petrinet.Arc}. + * + * + * @generated + */ + @Override + public Adapter createArcAdapter() { + if (arcItemProvider == null) { + arcItemProvider = new ArcItemProvider(this); + } + + return arcItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link petrinet.Reseau} instances. + * + * + * @generated + */ + protected ReseauItemProvider reseauItemProvider; + + /** + * This creates an adapter for a {@link petrinet.Reseau}. + * + * + * @generated + */ + @Override + public Adapter createReseauAdapter() { + if (reseauItemProvider == null) { + reseauItemProvider = new ReseauItemProvider(this); + } + + return reseauItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. + * + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. + * + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the adapter. + * + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) { + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. + * + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. + * + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. + * + * + * @generated + */ + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. + * + * + * @generated + */ + public void dispose() { + if (placeItemProvider != null) placeItemProvider.dispose(); + if (transitionItemProvider != null) transitionItemProvider.dispose(); + if (arcItemProvider != null) arcItemProvider.dispose(); + if (reseauItemProvider != null) reseauItemProvider.dispose(); + } + +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ec/8071dbecdc25001c15a9d70b555b4809 b/fr.n7.petriNet.edit/src/petrinet/provider/PlaceItemProvider.java similarity index 60% rename from .metadata/.plugins/org.eclipse.core.resources/.history/ec/8071dbecdc25001c15a9d70b555b4809 rename to fr.n7.petriNet.edit/src/petrinet/provider/PlaceItemProvider.java index e31e477..bc4d2aa 100644 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ec/8071dbecdc25001c15a9d70b555b4809 +++ b/fr.n7.petriNet.edit/src/petrinet/provider/PlaceItemProvider.java @@ -1,6 +1,6 @@ /** */ -package simplepdl.provider; +package petrinet.provider; import java.util.Collection; @@ -14,23 +14,23 @@ import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ViewerNotification; -import simplepdl.Resource; -import simplepdl.SimplepdlPackage; +import petrinet.PetrinetPackage; +import petrinet.Place; /** - * This is the item provider adapter for a {@link simplepdl.Resource} object. + * This is the item provider adapter for a {@link petrinet.Place} object. * * * @generated */ -public class ResourceItemProvider extends ProcessElementItemProvider { +public class PlaceItemProvider extends NoeudItemProvider { /** * This constructs an instance from a factory and a notifier. * * * @generated */ - public ResourceItemProvider(AdapterFactory adapterFactory) { + public PlaceItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } @@ -45,26 +45,25 @@ public class ResourceItemProvider extends ProcessElementItemProvider { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); - addQuantityPropertyDescriptor(object); - addNamePropertyDescriptor(object); + addJetonsPropertyDescriptor(object); } return itemPropertyDescriptors; } /** - * This adds a property descriptor for the Quantity feature. + * This adds a property descriptor for the Jetons feature. * * * @generated */ - protected void addQuantityPropertyDescriptor(Object object) { + protected void addJetonsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_Resource_quantity_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Resource_quantity_feature", "_UI_Resource_type"), - SimplepdlPackage.Literals.RESOURCE__QUANTITY, + getString("_UI_Place_jetons_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Place_jetons_feature", "_UI_Place_type"), + PetrinetPackage.Literals.PLACE__JETONS, true, false, false, @@ -74,36 +73,14 @@ public class ResourceItemProvider extends ProcessElementItemProvider { } /** - * This adds a property descriptor for the Name feature. - * - * - * @generated - */ - protected void addNamePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Resource_name_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Resource_name_feature", "_UI_Resource_type"), - SimplepdlPackage.Literals.RESOURCE__NAME, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); - } - - /** - * This returns Resource.gif. + * This returns Place.gif. * * * @generated */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/Resource")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/Place")); } /** @@ -114,11 +91,11 @@ public class ResourceItemProvider extends ProcessElementItemProvider { */ @Override public String getText(Object object) { - String label = ((Resource)object).getName(); - int qty = ((Resource)object).getQuantity(); + String label = ((Place)object).getName(); + int jetons = ((Place)object).getJetons(); return label == null || label.length() == 0 ? - getString("_UI_Resource_type") : - getString("_UI_Resource_type") + " " + label + "( " + qty + " )"; + getString("_UI_Place_type") : + getString("_UI_Place_type") + " " + label + " (" + jetons + ")"; } @@ -133,9 +110,8 @@ public class ResourceItemProvider extends ProcessElementItemProvider { public void notifyChanged(Notification notification) { updateChildren(notification); - switch (notification.getFeatureID(Resource.class)) { - case SimplepdlPackage.RESOURCE__QUANTITY: - case SimplepdlPackage.RESOURCE__NAME: + switch (notification.getFeatureID(Place.class)) { + case PetrinetPackage.PLACE__JETONS: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } diff --git a/fr.n7.petriNet.edit/src/petrinet/provider/ReseauItemProvider.java b/fr.n7.petriNet.edit/src/petrinet/provider/ReseauItemProvider.java new file mode 100644 index 0000000..fd507b6 --- /dev/null +++ b/fr.n7.petriNet.edit/src/petrinet/provider/ReseauItemProvider.java @@ -0,0 +1,204 @@ +/** + */ +package petrinet.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import petrinet.PetrinetFactory; +import petrinet.PetrinetPackage; +import petrinet.Reseau; + +/** + * This is the item provider adapter for a {@link petrinet.Reseau} object. + * + * + * @generated + */ +public class ReseauItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ReseauItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addNamePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Name feature. + * + * + * @generated + */ + protected void addNamePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Reseau_name_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Reseau_name_feature", "_UI_Reseau_type"), + PetrinetPackage.Literals.RESEAU__NAME, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PetrinetPackage.Literals.RESEAU__NOEUDS); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns Reseau.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Reseau")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Reseau)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Reseau_type") : + getString("_UI_Reseau_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Reseau.class)) { + case PetrinetPackage.RESEAU__NAME: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case PetrinetPackage.RESEAU__NOEUDS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (PetrinetPackage.Literals.RESEAU__NOEUDS, + PetrinetFactory.eINSTANCE.createPlace())); + + newChildDescriptors.add + (createChildParameter + (PetrinetPackage.Literals.RESEAU__NOEUDS, + PetrinetFactory.eINSTANCE.createTransition())); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return PetriNetEditPlugin.INSTANCE; + } + +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b9/b08276449d22001c118def180044d1da b/fr.n7.petriNet.edit/src/petrinet/provider/TransitionItemProvider.java similarity index 52% rename from .metadata/.plugins/org.eclipse.core.resources/.history/b9/b08276449d22001c118def180044d1da rename to fr.n7.petriNet.edit/src/petrinet/provider/TransitionItemProvider.java index 11e9736..1b2bf5b 100644 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b9/b08276449d22001c118def180044d1da +++ b/fr.n7.petriNet.edit/src/petrinet/provider/TransitionItemProvider.java @@ -1,6 +1,6 @@ /** */ -package simplepdl.provider; +package petrinet.provider; import java.util.Collection; @@ -9,28 +9,29 @@ import java.util.List; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.ecore.EStructuralFeature; + import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ViewerNotification; -import simplepdl.Resource; -import simplepdl.SimplepdlPackage; +import petrinet.PetrinetFactory; +import petrinet.PetrinetPackage; +import petrinet.Transition; /** - * This is the item provider adapter for a {@link simplepdl.Resource} object. + * This is the item provider adapter for a {@link petrinet.Transition} object. * * * @generated */ -public class ResourceItemProvider extends ProcessElementItemProvider { +public class TransitionItemProvider extends NoeudItemProvider { /** * This constructs an instance from a factory and a notifier. * * * @generated */ - public ResourceItemProvider(AdapterFactory adapterFactory) { + public TransitionItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } @@ -45,65 +46,49 @@ public class ResourceItemProvider extends ProcessElementItemProvider { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); - addQuantityPropertyDescriptor(object); - addNamePropertyDescriptor(object); } return itemPropertyDescriptors; } /** - * This adds a property descriptor for the Quantity feature. + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * * * @generated */ - protected void addQuantityPropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Resource_quantity_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Resource_quantity_feature", "_UI_Resource_type"), - SimplepdlPackage.Literals.RESOURCE__QUANTITY, - true, - false, - false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, - null, - null)); + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PetrinetPackage.Literals.TRANSITION__ARCS); + } + return childrenFeatures; } /** - * This adds a property descriptor for the Name feature. * * * @generated */ - protected void addNamePropertyDescriptor(Object object) { - itemPropertyDescriptors.add - (createItemPropertyDescriptor - (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), - getResourceLocator(), - getString("_UI_Resource_name_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_Resource_name_feature", "_UI_Resource_type"), - SimplepdlPackage.Literals.RESOURCE__NAME, - true, - false, - false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, - null, - null)); + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); } /** - * This returns Resource.gif. + * This returns Transition.gif. * * * @generated */ @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/Resource")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/Transition")); } /** @@ -114,11 +99,10 @@ public class ResourceItemProvider extends ProcessElementItemProvider { */ @Override public String getText(Object object) { - String label = ((Resource)object).getName(); - String qty = ((Resource)object).getQuantity(); + String label = ((Transition)object).getName(); return label == null || label.length() == 0 ? - getString("_UI_Resource_type") : - getString("_UI_Resource_type") + " " + label + "( " + qty + " )"; + getString("_UI_Transition_type") : + getString("_UI_Transition_type") + " " + label; } @@ -133,10 +117,9 @@ public class ResourceItemProvider extends ProcessElementItemProvider { public void notifyChanged(Notification notification) { updateChildren(notification); - switch (notification.getFeatureID(Resource.class)) { - case SimplepdlPackage.RESOURCE__QUANTITY: - case SimplepdlPackage.RESOURCE__NAME: - fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + switch (notification.getFeatureID(Transition.class)) { + case PetrinetPackage.TRANSITION__ARCS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } super.notifyChanged(notification); @@ -152,6 +135,11 @@ public class ResourceItemProvider extends ProcessElementItemProvider { @Override protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (PetrinetPackage.Literals.TRANSITION__ARCS, + PetrinetFactory.eINSTANCE.createArc())); } } diff --git a/fr.n7.petriNet.editor/.classpath b/fr.n7.petriNet.editor/.classpath new file mode 100644 index 0000000..c3ba59e --- /dev/null +++ b/fr.n7.petriNet.editor/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/fr.n7.petriNet.editor/.project b/fr.n7.petriNet.editor/.project new file mode 100644 index 0000000..b6dc6db --- /dev/null +++ b/fr.n7.petriNet.editor/.project @@ -0,0 +1,28 @@ + + + fr.n7.petriNet.editor + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/fr.n7.petriNet.editor/META-INF/MANIFEST.MF b/fr.n7.petriNet.editor/META-INF/MANIFEST.MF new file mode 100644 index 0000000..0afcda8 --- /dev/null +++ b/fr.n7.petriNet.editor/META-INF/MANIFEST.MF @@ -0,0 +1,19 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: fr.n7.petriNet.editor;singleton:=true +Automatic-Module-Name: fr.n7.petriNet.editor +Bundle-Version: 1.0.0.qualifier +Bundle-ClassPath: . +Bundle-Activator: petrinet.presentation.PetriNetEditorPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Export-Package: petrinet.presentation +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.core.resources;visibility:=reexport, + fr.n7.petriNet.edit;visibility:=reexport, + org.eclipse.emf.ecore.xmi;visibility:=reexport, + org.eclipse.emf.edit.ui;visibility:=reexport, + org.eclipse.ui.ide;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/fr.n7.petriNet.editor/build.properties b/fr.n7.petriNet.editor/build.properties new file mode 100644 index 0000000..5fb0771 --- /dev/null +++ b/fr.n7.petriNet.editor/build.properties @@ -0,0 +1,10 @@ +# + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/ +output.. = bin diff --git a/fr.n7.petriNet.editor/icons/full/obj16/PetrinetModelFile.gif b/fr.n7.petriNet.editor/icons/full/obj16/PetrinetModelFile.gif new file mode 100644 index 0000000..689b728 Binary files /dev/null and b/fr.n7.petriNet.editor/icons/full/obj16/PetrinetModelFile.gif differ diff --git a/fr.n7.petriNet.editor/icons/full/wizban/NewPetrinet.gif b/fr.n7.petriNet.editor/icons/full/wizban/NewPetrinet.gif new file mode 100644 index 0000000..e976e07 Binary files /dev/null and b/fr.n7.petriNet.editor/icons/full/wizban/NewPetrinet.gif differ diff --git a/fr.n7.petriNet.editor/plugin.properties b/fr.n7.petriNet.editor/plugin.properties new file mode 100644 index 0000000..1778780 --- /dev/null +++ b/fr.n7.petriNet.editor/plugin.properties @@ -0,0 +1,53 @@ +# + +pluginName = PetriNet Editor +providerName = www.example.org + +_UI_PetrinetEditor_menu = &Petrinet Editor + +_UI_CreateChild_menu_item = &New Child +_UI_CreateSibling_menu_item = N&ew Sibling + +_UI_ShowPropertiesView_menu_item = Show &Properties View +_UI_RefreshViewer_menu_item = &Refresh + +_UI_SelectionPage_label = Selection +_UI_ParentPage_label = Parent +_UI_ListPage_label = List +_UI_TreePage_label = Tree +_UI_TablePage_label = Table +_UI_TreeWithColumnsPage_label = Tree with Columns +_UI_ObjectColumn_label = Object +_UI_SelfColumn_label = Self + +_UI_NoObjectSelected = Selected Nothing +_UI_SingleObjectSelected = Selected Object: {0} +_UI_MultiObjectSelected = Selected {0} Objects + +_UI_OpenEditorError_label = Open Editor + +_UI_Wizard_category = Example EMF Model Creation Wizards + +_UI_CreateModelError_message = Problems encountered in file "{0}" + +_UI_PetrinetModelWizard_label = Petrinet Model +_UI_PetrinetModelWizard_description = Create a new Petrinet model + +_UI_PetrinetEditor_label = Petrinet Model Editor + +_UI_PetrinetEditorFilenameDefaultBase = My +_UI_PetrinetEditorFilenameExtensions = petrinet + +_UI_Wizard_label = New + +_WARN_FilenameExtension = The file name must end in ''.{0}'' +_WARN_FilenameExtensions = The file name must have one of the following extensions: {0} + +_UI_ModelObject = &Model Object +_UI_XMLEncoding = &XML Encoding +_UI_XMLEncodingChoices = UTF-8 ASCII UTF-16 UTF-16BE UTF-16LE ISO-8859-1 +_UI_Wizard_initial_object_description = Select a model object to create + +_UI_FileConflict_label = File Conflict +_WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes? + diff --git a/fr.n7.petriNet.editor/plugin.xml b/fr.n7.petriNet.editor/plugin.xml new file mode 100644 index 0000000..2a23476 --- /dev/null +++ b/fr.n7.petriNet.editor/plugin.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + %_UI_PetrinetModelWizard_description + + + + + + + + + + + diff --git a/fr.n7.petriNet.editor/src/petrinet/presentation/PetriNetEditorPlugin.java b/fr.n7.petriNet.editor/src/petrinet/presentation/PetriNetEditorPlugin.java new file mode 100644 index 0000000..629fbbd --- /dev/null +++ b/fr.n7.petriNet.editor/src/petrinet/presentation/PetriNetEditorPlugin.java @@ -0,0 +1,91 @@ +/** + */ +package petrinet.presentation; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.ui.EclipseUIPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +/** + * This is the central singleton for the PetriNet editor plugin. + * + * + * @generated + */ +public final class PetriNetEditorPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final PetriNetEditorPlugin INSTANCE = new PetriNetEditorPlugin(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public PetriNetEditorPlugin() { + super + (new ResourceLocator [] { + }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipseUIPlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/fr.n7.petriNet.editor/src/petrinet/presentation/PetrinetActionBarContributor.java b/fr.n7.petriNet.editor/src/petrinet/presentation/PetrinetActionBarContributor.java new file mode 100644 index 0000000..e1eadff --- /dev/null +++ b/fr.n7.petriNet.editor/src/petrinet/presentation/PetrinetActionBarContributor.java @@ -0,0 +1,424 @@ +/** + */ +package petrinet.presentation; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.ui.viewer.IViewerProvider; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.domain.IEditingDomainProvider; + +import org.eclipse.emf.edit.ui.action.ControlAction; +import org.eclipse.emf.edit.ui.action.CreateChildAction; +import org.eclipse.emf.edit.ui.action.CreateSiblingAction; +import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor; +import org.eclipse.emf.edit.ui.action.LoadResourceAction; +import org.eclipse.emf.edit.ui.action.ValidateAction; + +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.ActionContributionItem; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.action.IContributionItem; +import org.eclipse.jface.action.IContributionManager; +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; +import org.eclipse.jface.action.SubContributionItem; + +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.Viewer; + +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PartInitException; + +/** + * This is the action bar contributor for the Petrinet model editor. + * + * + * @generated + */ +public class PetrinetActionBarContributor + extends EditingDomainActionBarContributor + implements ISelectionChangedListener { + /** + * This keeps track of the active editor. + * + * + * @generated + */ + protected IEditorPart activeEditorPart; + + /** + * This keeps track of the current selection provider. + * + * + * @generated + */ + protected ISelectionProvider selectionProvider; + + /** + * This action opens the Properties view. + * + * + * @generated + */ + protected IAction showPropertiesViewAction = + new Action(PetriNetEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) { + @Override + public void run() { + try { + getPage().showView("org.eclipse.ui.views.PropertySheet"); + } + catch (PartInitException exception) { + PetriNetEditorPlugin.INSTANCE.log(exception); + } + } + }; + + /** + * This action refreshes the viewer of the current editor if the editor + * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}. + * + * + * @generated + */ + protected IAction refreshViewerAction = + new Action(PetriNetEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) { + @Override + public boolean isEnabled() { + return activeEditorPart instanceof IViewerProvider; + } + + @Override + public void run() { + if (activeEditorPart instanceof IViewerProvider) { + Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer(); + if (viewer != null) { + viewer.refresh(); + } + } + } + }; + + /** + * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor + * generated for the current selection by the item provider. + * + * + * @generated + */ + protected Collection createChildActions; + + /** + * This is the menu manager into which menu contribution items should be added for CreateChild actions. + * + * + * @generated + */ + protected IMenuManager createChildMenuManager; + + /** + * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor + * generated for the current selection by the item provider. + * + * + * @generated + */ + protected Collection createSiblingActions; + + /** + * This is the menu manager into which menu contribution items should be added for CreateSibling actions. + * + * + * @generated + */ + protected IMenuManager createSiblingMenuManager; + + /** + * This creates an instance of the contributor. + * + * + * @generated + */ + public PetrinetActionBarContributor() { + super(ADDITIONS_LAST_STYLE); + loadResourceAction = new LoadResourceAction(); + validateAction = new ValidateAction(); + controlAction = new ControlAction(); + } + + /** + * This adds Separators for editor additions to the tool bar. + * + * + * @generated + */ + @Override + public void contributeToToolBar(IToolBarManager toolBarManager) { + super.contributeToToolBar(toolBarManager); + toolBarManager.add(new Separator("petrinet-settings")); + toolBarManager.add(new Separator("petrinet-additions")); + } + + /** + * This adds to the menu bar a menu and some separators for editor additions, + * as well as the sub-menus for object creation items. + * + * + * @generated + */ + @Override + public void contributeToMenu(IMenuManager menuManager) { + super.contributeToMenu(menuManager); + + IMenuManager submenuManager = new MenuManager(PetriNetEditorPlugin.INSTANCE.getString("_UI_PetrinetEditor_menu"), "petrinetMenuID"); + menuManager.insertAfter("additions", submenuManager); + submenuManager.add(new Separator("settings")); + submenuManager.add(new Separator("actions")); + submenuManager.add(new Separator("additions")); + submenuManager.add(new Separator("additions-end")); + + // Prepare for CreateChild item addition or removal. + // + createChildMenuManager = new MenuManager(PetriNetEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); + submenuManager.insertBefore("additions", createChildMenuManager); + + // Prepare for CreateSibling item addition or removal. + // + createSiblingMenuManager = new MenuManager(PetriNetEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); + submenuManager.insertBefore("additions", createSiblingMenuManager); + + // Force an update because Eclipse hides empty menus now. + // + submenuManager.addMenuListener + (new IMenuListener() { + public void menuAboutToShow(IMenuManager menuManager) { + menuManager.updateAll(true); + } + }); + + addGlobalActions(submenuManager); + } + + /** + * When the active editor changes, this remembers the change and registers with it as a selection provider. + * + * + * @generated + */ + @Override + public void setActiveEditor(IEditorPart part) { + super.setActiveEditor(part); + activeEditorPart = part; + + // Switch to the new selection provider. + // + if (selectionProvider != null) { + selectionProvider.removeSelectionChangedListener(this); + } + if (part == null) { + selectionProvider = null; + } + else { + selectionProvider = part.getSite().getSelectionProvider(); + selectionProvider.addSelectionChangedListener(this); + + // Fake a selection changed event to update the menus. + // + if (selectionProvider.getSelection() != null) { + selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection())); + } + } + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener}, + * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings + * that can be added to the selected object and updating the menus accordingly. + * + * + * @generated + */ + public void selectionChanged(SelectionChangedEvent event) { + // Remove any menu items for old selection. + // + if (createChildMenuManager != null) { + depopulateManager(createChildMenuManager, createChildActions); + } + if (createSiblingMenuManager != null) { + depopulateManager(createSiblingMenuManager, createSiblingActions); + } + + // Query the new selection for appropriate new child/sibling descriptors + // + Collection newChildDescriptors = null; + Collection newSiblingDescriptors = null; + + ISelection selection = event.getSelection(); + if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) { + Object object = ((IStructuredSelection)selection).getFirstElement(); + + EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain(); + + newChildDescriptors = domain.getNewChildDescriptors(object, null); + newSiblingDescriptors = domain.getNewChildDescriptors(null, object); + } + + // Generate actions for selection; populate and redraw the menus. + // + createChildActions = generateCreateChildActions(newChildDescriptors, selection); + createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection); + + if (createChildMenuManager != null) { + populateManager(createChildMenuManager, createChildActions, null); + createChildMenuManager.update(true); + } + if (createSiblingMenuManager != null) { + populateManager(createSiblingMenuManager, createSiblingActions, null); + createSiblingMenuManager.update(true); + } + } + + /** + * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in descriptors, + * and returns the collection of these actions. + * + * + * @generated + */ + protected Collection generateCreateChildActions(Collection descriptors, ISelection selection) { + Collection actions = new ArrayList(); + if (descriptors != null) { + for (Object descriptor : descriptors) { + actions.add(new CreateChildAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } + + /** + * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in descriptors, + * and returns the collection of these actions. + * + * + * @generated + */ + protected Collection generateCreateSiblingActions(Collection descriptors, ISelection selection) { + Collection actions = new ArrayList(); + if (descriptors != null) { + for (Object descriptor : descriptors) { + actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } + + /** + * This populates the specified manager with {@link org.eclipse.jface.action.ActionContributionItem}s + * based on the {@link org.eclipse.jface.action.IAction}s contained in the actions collection, + * by inserting them before the specified contribution item contributionID. + * If contributionID is null, they are simply added. + * + * + * @generated + */ + protected void populateManager(IContributionManager manager, Collection actions, String contributionID) { + if (actions != null) { + for (IAction action : actions) { + if (contributionID != null) { + manager.insertBefore(contributionID, action); + } + else { + manager.add(action); + } + } + } + } + + /** + * This removes from the specified manager all {@link org.eclipse.jface.action.ActionContributionItem}s + * based on the {@link org.eclipse.jface.action.IAction}s contained in the actions collection. + * + * + * @generated + */ + protected void depopulateManager(IContributionManager manager, Collection actions) { + if (actions != null) { + IContributionItem[] items = manager.getItems(); + for (int i = 0; i < items.length; i++) { + // Look into SubContributionItems + // + IContributionItem contributionItem = items[i]; + while (contributionItem instanceof SubContributionItem) { + contributionItem = ((SubContributionItem)contributionItem).getInnerItem(); + } + + // Delete the ActionContributionItems with matching action. + // + if (contributionItem instanceof ActionContributionItem) { + IAction action = ((ActionContributionItem)contributionItem).getAction(); + if (actions.contains(action)) { + manager.remove(contributionItem); + } + } + } + } + } + + /** + * This populates the pop-up menu before it appears. + * + * + * @generated + */ + @Override + public void menuAboutToShow(IMenuManager menuManager) { + super.menuAboutToShow(menuManager); + MenuManager submenuManager = null; + + submenuManager = new MenuManager(PetriNetEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); + populateManager(submenuManager, createChildActions, null); + menuManager.insertBefore("edit", submenuManager); + + submenuManager = new MenuManager(PetriNetEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); + populateManager(submenuManager, createSiblingActions, null); + menuManager.insertBefore("edit", submenuManager); + } + + /** + * This inserts global actions before the "additions-end" separator. + * + * + * @generated + */ + @Override + protected void addGlobalActions(IMenuManager menuManager) { + menuManager.insertAfter("additions-end", new Separator("ui-actions")); + menuManager.insertAfter("ui-actions", showPropertiesViewAction); + + refreshViewerAction.setEnabled(refreshViewerAction.isEnabled()); + menuManager.insertAfter("ui-actions", refreshViewerAction); + + super.addGlobalActions(menuManager); + } + + /** + * This ensures that a delete action will clean up all references to deleted objects. + * + * + * @generated + */ + @Override + protected boolean removeAllReferencesOnDelete() { + return true; + } + +} diff --git a/fr.n7.petriNet.editor/src/petrinet/presentation/PetrinetEditor.java b/fr.n7.petriNet.editor/src/petrinet/presentation/PetrinetEditor.java new file mode 100644 index 0000000..57c1f0f --- /dev/null +++ b/fr.n7.petriNet.editor/src/petrinet/presentation/PetrinetEditor.java @@ -0,0 +1,1823 @@ +/** + */ +package petrinet.presentation; + + +import java.io.IOException; +import java.io.InputStream; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.EventObject; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceChangeEvent; +import org.eclipse.core.resources.IResourceChangeListener; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.IResourceDeltaVisitor; +import org.eclipse.core.resources.ResourcesPlugin; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; + +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IStatusLineManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; + +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; + +import org.eclipse.jface.util.LocalSelectionTransfer; + +import org.eclipse.jface.viewers.ColumnWeightData; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.ListViewer; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.StructuredViewer; +import org.eclipse.jface.viewers.TableLayout; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.viewers.Viewer; + +import org.eclipse.swt.SWT; + +import org.eclipse.swt.custom.CTabFolder; + +import org.eclipse.swt.dnd.DND; +import org.eclipse.swt.dnd.FileTransfer; +import org.eclipse.swt.dnd.Transfer; + +import org.eclipse.swt.events.ControlAdapter; +import org.eclipse.swt.events.ControlEvent; + +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; + +import org.eclipse.swt.layout.FillLayout; + +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.swt.widgets.Tree; +import org.eclipse.swt.widgets.TreeColumn; + +import org.eclipse.ui.IActionBars; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IEditorSite; +import org.eclipse.ui.IPartListener; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.PartInitException; + +import org.eclipse.ui.dialogs.SaveAsDialog; + +import org.eclipse.ui.ide.IGotoMarker; + +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.ui.part.MultiPageEditorPart; + +import org.eclipse.ui.views.contentoutline.ContentOutline; +import org.eclipse.ui.views.contentoutline.ContentOutlinePage; +import org.eclipse.ui.views.contentoutline.IContentOutlinePage; + +import org.eclipse.ui.views.properties.IPropertySheetPage; +import org.eclipse.ui.views.properties.PropertySheet; +import org.eclipse.ui.views.properties.PropertySheetPage; + +import org.eclipse.emf.common.command.BasicCommandStack; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.CommandStack; +import org.eclipse.emf.common.command.CommandStackListener; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.ui.MarkerHelper; +import org.eclipse.emf.common.ui.ViewerPane; + +import org.eclipse.emf.common.ui.editor.ProblemEditorPart; + +import org.eclipse.emf.common.ui.viewer.IViewerProvider; + +import org.eclipse.emf.common.util.BasicDiagnostic; +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.common.util.URI; + + +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; + +import org.eclipse.emf.ecore.util.EContentAdapter; +import org.eclipse.emf.ecore.util.EcoreUtil; + +import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.domain.IEditingDomainProvider; + +import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; + +import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; + +import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor; + +import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor; + +import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter; +import org.eclipse.emf.edit.ui.dnd.LocalTransfer; +import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter; + +import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider; +import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; +import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider; + +import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper; +import org.eclipse.emf.edit.ui.util.EditUIUtil; + +import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage; + +import petrinet.provider.PetrinetItemProviderAdapterFactory; + +import org.eclipse.ui.actions.WorkspaceModifyOperation; + + +/** + * This is an example of a Petrinet model editor. + * + * + * @generated + */ +public class PetrinetEditor + extends MultiPageEditorPart + implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker { + /** + * This keeps track of the editing domain that is used to track all changes to the model. + * + * + * @generated + */ + protected AdapterFactoryEditingDomain editingDomain; + + /** + * This is the one adapter factory used for providing views of the model. + * + * + * @generated + */ + protected ComposedAdapterFactory adapterFactory; + + /** + * This is the content outline page. + * + * + * @generated + */ + protected IContentOutlinePage contentOutlinePage; + + /** + * This is a kludge... + * + * + * @generated + */ + protected IStatusLineManager contentOutlineStatusLineManager; + + /** + * This is the content outline page's viewer. + * + * + * @generated + */ + protected TreeViewer contentOutlineViewer; + + /** + * This is the property sheet page. + * + * + * @generated + */ + protected List propertySheetPages = new ArrayList(); + + /** + * This is the viewer that shadows the selection in the content outline. + * The parent relation must be correctly defined for this to work. + * + * + * @generated + */ + protected TreeViewer selectionViewer; + + /** + * This inverts the roll of parent and child in the content provider and show parents as a tree. + * + * + * @generated + */ + protected TreeViewer parentViewer; + + /** + * This shows how a tree view works. + * + * + * @generated + */ + protected TreeViewer treeViewer; + + /** + * This shows how a list view works. + * A list viewer doesn't support icons. + * + * + * @generated + */ + protected ListViewer listViewer; + + /** + * This shows how a table view works. + * A table can be used as a list with icons. + * + * + * @generated + */ + protected TableViewer tableViewer; + + /** + * This shows how a tree view with columns works. + * + * + * @generated + */ + protected TreeViewer treeViewerWithColumns; + + /** + * This keeps track of the active viewer pane, in the book. + * + * + * @generated + */ + protected ViewerPane currentViewerPane; + + /** + * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer. + * + * + * @generated + */ + protected Viewer currentViewer; + + /** + * This listens to which ever viewer is active. + * + * + * @generated + */ + protected ISelectionChangedListener selectionChangedListener; + + /** + * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor. + * + * + * @generated + */ + protected Collection selectionChangedListeners = new ArrayList(); + + /** + * This keeps track of the selection of the editor as a whole. + * + * + * @generated + */ + protected ISelection editorSelection = StructuredSelection.EMPTY; + + /** + * The MarkerHelper is responsible for creating workspace resource markers presented + * in Eclipse's Problems View. + * + * + * @generated + */ + protected MarkerHelper markerHelper = new EditUIMarkerHelper(); + + /** + * This listens for when the outline becomes active + * + * + * @generated + */ + protected IPartListener partListener = + new IPartListener() { + public void partActivated(IWorkbenchPart p) { + if (p instanceof ContentOutline) { + if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) { + getActionBarContributor().setActiveEditor(PetrinetEditor.this); + + setCurrentViewer(contentOutlineViewer); + } + } + else if (p instanceof PropertySheet) { + if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) { + getActionBarContributor().setActiveEditor(PetrinetEditor.this); + handleActivate(); + } + } + else if (p == PetrinetEditor.this) { + handleActivate(); + } + } + public void partBroughtToTop(IWorkbenchPart p) { + // Ignore. + } + public void partClosed(IWorkbenchPart p) { + // Ignore. + } + public void partDeactivated(IWorkbenchPart p) { + // Ignore. + } + public void partOpened(IWorkbenchPart p) { + // Ignore. + } + }; + + /** + * Resources that have been removed since last activation. + * + * + * @generated + */ + protected Collection removedResources = new ArrayList(); + + /** + * Resources that have been changed since last activation. + * + * + * @generated + */ + protected Collection changedResources = new ArrayList(); + + /** + * Resources that have been saved. + * + * + * @generated + */ + protected Collection savedResources = new ArrayList(); + + /** + * Map to store the diagnostic associated with a resource. + * + * + * @generated + */ + protected Map resourceToDiagnosticMap = new LinkedHashMap(); + + /** + * Controls whether the problem indication should be updated. + * + * + * @generated + */ + protected boolean updateProblemIndication = true; + + /** + * Adapter used to update the problem indication when resources are demanded loaded. + * + * + * @generated + */ + protected EContentAdapter problemIndicationAdapter = + new EContentAdapter() { + protected boolean dispatching; + + @Override + public void notifyChanged(Notification notification) { + if (notification.getNotifier() instanceof Resource) { + switch (notification.getFeatureID(Resource.class)) { + case Resource.RESOURCE__IS_LOADED: + case Resource.RESOURCE__ERRORS: + case Resource.RESOURCE__WARNINGS: { + Resource resource = (Resource)notification.getNotifier(); + Diagnostic diagnostic = analyzeResourceProblems(resource, null); + if (diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, diagnostic); + } + else { + resourceToDiagnosticMap.remove(resource); + } + dispatchUpdateProblemIndication(); + break; + } + } + } + else { + super.notifyChanged(notification); + } + } + + protected void dispatchUpdateProblemIndication() { + if (updateProblemIndication && !dispatching) { + dispatching = true; + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + dispatching = false; + updateProblemIndication(); + } + }); + } + } + + @Override + protected void setTarget(Resource target) { + basicSetTarget(target); + } + + @Override + protected void unsetTarget(Resource target) { + basicUnsetTarget(target); + resourceToDiagnosticMap.remove(target); + dispatchUpdateProblemIndication(); + } + }; + + /** + * This listens for workspace changes. + * + * + * @generated + */ + protected IResourceChangeListener resourceChangeListener = + new IResourceChangeListener() { + public void resourceChanged(IResourceChangeEvent event) { + IResourceDelta delta = event.getDelta(); + try { + class ResourceDeltaVisitor implements IResourceDeltaVisitor { + protected ResourceSet resourceSet = editingDomain.getResourceSet(); + protected Collection changedResources = new ArrayList(); + protected Collection removedResources = new ArrayList(); + + public boolean visit(IResourceDelta delta) { + if (delta.getResource().getType() == IResource.FILE) { + if (delta.getKind() == IResourceDelta.REMOVED || + delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) { + Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false); + if (resource != null) { + if (delta.getKind() == IResourceDelta.REMOVED) { + removedResources.add(resource); + } + else if (!savedResources.remove(resource)) { + changedResources.add(resource); + } + } + } + return false; + } + + return true; + } + + public Collection getChangedResources() { + return changedResources; + } + + public Collection getRemovedResources() { + return removedResources; + } + } + + final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor(); + delta.accept(visitor); + + if (!visitor.getRemovedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + removedResources.addAll(visitor.getRemovedResources()); + if (!isDirty()) { + getSite().getPage().closeEditor(PetrinetEditor.this, false); + } + } + }); + } + + if (!visitor.getChangedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + changedResources.addAll(visitor.getChangedResources()); + if (getSite().getPage().getActiveEditor() == PetrinetEditor.this) { + handleActivate(); + } + } + }); + } + } + catch (CoreException exception) { + PetriNetEditorPlugin.INSTANCE.log(exception); + } + } + }; + + /** + * Handles activation of the editor or it's associated views. + * + * + * @generated + */ + protected void handleActivate() { + // Recompute the read only state. + // + if (editingDomain.getResourceToReadOnlyMap() != null) { + editingDomain.getResourceToReadOnlyMap().clear(); + + // Refresh any actions that may become enabled or disabled. + // + setSelection(getSelection()); + } + + if (!removedResources.isEmpty()) { + if (handleDirtyConflict()) { + getSite().getPage().closeEditor(PetrinetEditor.this, false); + } + else { + removedResources.clear(); + changedResources.clear(); + savedResources.clear(); + } + } + else if (!changedResources.isEmpty()) { + changedResources.removeAll(savedResources); + handleChangedResources(); + changedResources.clear(); + savedResources.clear(); + } + } + + /** + * Handles what to do with changed resources on activation. + * + * + * @generated + */ + protected void handleChangedResources() { + if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) { + ResourceSet resourceSet = editingDomain.getResourceSet(); + if (isDirty()) { + changedResources.addAll(resourceSet.getResources()); + } + editingDomain.getCommandStack().flush(); + + updateProblemIndication = false; + for (Resource resource : changedResources) { + if (resource.isLoaded()) { + resource.unload(); + try { + resource.load(resourceSet.getLoadOptions()); + } + catch (IOException exception) { + if (!resourceToDiagnosticMap.containsKey(resource)) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + } + } + } + + if (AdapterFactoryEditingDomain.isStale(editorSelection)) { + setSelection(StructuredSelection.EMPTY); + } + + updateProblemIndication = true; + updateProblemIndication(); + } + } + + /** + * Updates the problems indication with the information described in the specified diagnostic. + * + * + * @generated + */ + protected void updateProblemIndication() { + if (updateProblemIndication) { + BasicDiagnostic diagnostic = + new BasicDiagnostic + (Diagnostic.OK, + "fr.n7.petriNet.editor", + 0, + null, + new Object [] { editingDomain.getResourceSet() }); + for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) { + if (childDiagnostic.getSeverity() != Diagnostic.OK) { + diagnostic.add(childDiagnostic); + } + } + + int lastEditorPage = getPageCount() - 1; + if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) { + ((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic); + if (diagnostic.getSeverity() != Diagnostic.OK) { + setActivePage(lastEditorPage); + } + } + else if (diagnostic.getSeverity() != Diagnostic.OK) { + ProblemEditorPart problemEditorPart = new ProblemEditorPart(); + problemEditorPart.setDiagnostic(diagnostic); + problemEditorPart.setMarkerHelper(markerHelper); + try { + addPage(++lastEditorPage, problemEditorPart, getEditorInput()); + setPageText(lastEditorPage, problemEditorPart.getPartName()); + setActivePage(lastEditorPage); + showTabs(); + } + catch (PartInitException exception) { + PetriNetEditorPlugin.INSTANCE.log(exception); + } + } + + if (markerHelper.hasMarkers(editingDomain.getResourceSet())) { + try { + markerHelper.updateMarkers(diagnostic); + } + catch (CoreException exception) { + PetriNetEditorPlugin.INSTANCE.log(exception); + } + } + } + } + + /** + * Shows a dialog that asks if conflicting changes should be discarded. + * + * + * @generated + */ + protected boolean handleDirtyConflict() { + return + MessageDialog.openQuestion + (getSite().getShell(), + getString("_UI_FileConflict_label"), + getString("_WARN_FileConflict")); + } + + /** + * This creates a model editor. + * + * + * @generated + */ + public PetrinetEditor() { + super(); + initializeEditingDomain(); + } + + /** + * This sets up the editing domain for the model editor. + * + * + * @generated + */ + protected void initializeEditingDomain() { + // Create an adapter factory that yields item providers. + // + adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); + + adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new PetrinetItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); + + // Create the command stack that will notify this editor as commands are executed. + // + BasicCommandStack commandStack = new BasicCommandStack(); + + // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus. + // + commandStack.addCommandStackListener + (new CommandStackListener() { + public void commandStackChanged(final EventObject event) { + getContainer().getDisplay().asyncExec + (new Runnable() { + public void run() { + firePropertyChange(IEditorPart.PROP_DIRTY); + + // Try to select the affected objects. + // + Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand(); + if (mostRecentCommand != null) { + setSelectionToViewer(mostRecentCommand.getAffectedObjects()); + } + for (Iterator i = propertySheetPages.iterator(); i.hasNext(); ) { + PropertySheetPage propertySheetPage = i.next(); + if (propertySheetPage.getControl() == null || propertySheetPage.getControl().isDisposed()) { + i.remove(); + } + else { + propertySheetPage.refresh(); + } + } + } + }); + } + }); + + // Create the editing domain with a special command stack. + // + editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap()); + } + + /** + * This is here for the listener to be able to call it. + * + * + * @generated + */ + @Override + protected void firePropertyChange(int action) { + super.firePropertyChange(action); + } + + /** + * This sets the selection into whichever viewer is active. + * + * + * @generated + */ + public void setSelectionToViewer(Collection collection) { + final Collection theSelection = collection; + // Make sure it's okay. + // + if (theSelection != null && !theSelection.isEmpty()) { + Runnable runnable = + new Runnable() { + public void run() { + // Try to select the items in the current content viewer of the editor. + // + if (currentViewer != null) { + currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true); + } + } + }; + getSite().getShell().getDisplay().asyncExec(runnable); + } + } + + /** + * This returns the editing domain as required by the {@link IEditingDomainProvider} interface. + * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain} + * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}. + * + * + * @generated + */ + public EditingDomain getEditingDomain() { + return editingDomain; + } + + /** + * + * + * @generated + */ + public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider { + /** + * + * + * @generated + */ + public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * + * + * @generated + */ + @Override + public Object [] getElements(Object object) { + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } + + /** + * + * + * @generated + */ + @Override + public Object [] getChildren(Object object) { + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } + + /** + * + * + * @generated + */ + @Override + public boolean hasChildren(Object object) { + Object parent = super.getParent(object); + return parent != null; + } + + /** + * + * + * @generated + */ + @Override + public Object getParent(Object object) { + return null; + } + } + + /** + * + * + * @generated + */ + public void setCurrentViewerPane(ViewerPane viewerPane) { + if (currentViewerPane != viewerPane) { + if (currentViewerPane != null) { + currentViewerPane.showFocus(false); + } + currentViewerPane = viewerPane; + } + setCurrentViewer(currentViewerPane.getViewer()); + } + + /** + * This makes sure that one content viewer, either for the current page or the outline view, if it has focus, + * is the current one. + * + * + * @generated + */ + public void setCurrentViewer(Viewer viewer) { + // If it is changing... + // + if (currentViewer != viewer) { + if (selectionChangedListener == null) { + // Create the listener on demand. + // + selectionChangedListener = + new ISelectionChangedListener() { + // This just notifies those things that are affected by the section. + // + public void selectionChanged(SelectionChangedEvent selectionChangedEvent) { + setSelection(selectionChangedEvent.getSelection()); + } + }; + } + + // Stop listening to the old one. + // + if (currentViewer != null) { + currentViewer.removeSelectionChangedListener(selectionChangedListener); + } + + // Start listening to the new one. + // + if (viewer != null) { + viewer.addSelectionChangedListener(selectionChangedListener); + } + + // Remember it. + // + currentViewer = viewer; + + // Set the editors selection based on the current viewer's selection. + // + setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection()); + } + } + + /** + * This returns the viewer as required by the {@link IViewerProvider} interface. + * + * + * @generated + */ + public Viewer getViewer() { + return currentViewer; + } + + /** + * This creates a context menu for the viewer and adds a listener as well registering the menu for extension. + * + * + * @generated + */ + protected void createContextMenuFor(StructuredViewer viewer) { + MenuManager contextMenu = new MenuManager("#PopUp"); + contextMenu.add(new Separator("additions")); + contextMenu.setRemoveAllWhenShown(true); + contextMenu.addMenuListener(this); + Menu menu= contextMenu.createContextMenu(viewer.getControl()); + viewer.getControl().setMenu(menu); + getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer)); + + int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK; + Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() }; + viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer)); + viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer)); + } + + /** + * This is the method called to load a resource into the editing domain's resource set based on the editor's input. + * + * + * @generated + */ + public void createModel() { + URI resourceURI = EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter()); + Exception exception = null; + Resource resource = null; + try { + // Load the resource through the editing domain. + // + resource = editingDomain.getResourceSet().getResource(resourceURI, true); + } + catch (Exception e) { + exception = e; + resource = editingDomain.getResourceSet().getResource(resourceURI, false); + } + + Diagnostic diagnostic = analyzeResourceProblems(resource, exception); + if (diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter); + } + + /** + * Returns a diagnostic describing the errors and warnings listed in the resource + * and the specified exception (if any). + * + * + * @generated + */ + public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { + boolean hasErrors = !resource.getErrors().isEmpty(); + if (hasErrors || !resource.getWarnings().isEmpty()) { + BasicDiagnostic basicDiagnostic = + new BasicDiagnostic + (hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, + "fr.n7.petriNet.editor", + 0, + getString("_UI_CreateModelError_message", resource.getURI()), + new Object [] { exception == null ? (Object)resource : exception }); + basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); + return basicDiagnostic; + } + else if (exception != null) { + return + new BasicDiagnostic + (Diagnostic.ERROR, + "fr.n7.petriNet.editor", + 0, + getString("_UI_CreateModelError_message", resource.getURI()), + new Object[] { exception }); + } + else { + return Diagnostic.OK_INSTANCE; + } + } + + /** + * This is the method used by the framework to install your own controls. + * + * + * @generated + */ + @Override + public void createPages() { + // Creates the model from the editor input + // + createModel(); + + // Only creates the other pages if there is something that can be edited + // + if (!getEditingDomain().getResourceSet().getResources().isEmpty()) { + // Create a page for the selection tree view. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), PetrinetEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + Tree tree = new Tree(composite, SWT.MULTI); + TreeViewer newTreeViewer = new TreeViewer(tree); + return newTreeViewer; + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + selectionViewer = (TreeViewer)viewerPane.getViewer(); + selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + selectionViewer.setUseHashlookup(true); + + selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + selectionViewer.setInput(editingDomain.getResourceSet()); + selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + viewerPane.setTitle(editingDomain.getResourceSet()); + + new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory); + + createContextMenuFor(selectionViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_SelectionPage_label")); + } + + // Create a page for the parent tree view. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), PetrinetEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + Tree tree = new Tree(composite, SWT.MULTI); + TreeViewer newTreeViewer = new TreeViewer(tree); + return newTreeViewer; + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + parentViewer = (TreeViewer)viewerPane.getViewer(); + parentViewer.setAutoExpandLevel(30); + parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory)); + parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(parentViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_ParentPage_label")); + } + + // This is the page for the list viewer + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), PetrinetEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new ListViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + listViewer = (ListViewer)viewerPane.getViewer(); + listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(listViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_ListPage_label")); + } + + // This is the page for the tree viewer + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), PetrinetEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TreeViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + treeViewer = (TreeViewer)viewerPane.getViewer(); + treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory); + + createContextMenuFor(treeViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TreePage_label")); + } + + // This is the page for the table viewer. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), PetrinetEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TableViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + tableViewer = (TableViewer)viewerPane.getViewer(); + + Table table = tableViewer.getTable(); + TableLayout layout = new TableLayout(); + table.setLayout(layout); + table.setHeaderVisible(true); + table.setLinesVisible(true); + + TableColumn objectColumn = new TableColumn(table, SWT.NONE); + layout.addColumnData(new ColumnWeightData(3, 100, true)); + objectColumn.setText(getString("_UI_ObjectColumn_label")); + objectColumn.setResizable(true); + + TableColumn selfColumn = new TableColumn(table, SWT.NONE); + layout.addColumnData(new ColumnWeightData(2, 100, true)); + selfColumn.setText(getString("_UI_SelfColumn_label")); + selfColumn.setResizable(true); + + tableViewer.setColumnProperties(new String [] {"a", "b"}); + tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(tableViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TablePage_label")); + } + + // This is the page for the table tree viewer. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), PetrinetEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TreeViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + treeViewerWithColumns = (TreeViewer)viewerPane.getViewer(); + + Tree tree = treeViewerWithColumns.getTree(); + tree.setLayoutData(new FillLayout()); + tree.setHeaderVisible(true); + tree.setLinesVisible(true); + + TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE); + objectColumn.setText(getString("_UI_ObjectColumn_label")); + objectColumn.setResizable(true); + objectColumn.setWidth(250); + + TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE); + selfColumn.setText(getString("_UI_SelfColumn_label")); + selfColumn.setResizable(true); + selfColumn.setWidth(200); + + treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); + treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(treeViewerWithColumns); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label")); + } + + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + if (!getContainer().isDisposed()) { + setActivePage(0); + } + } + }); + } + + // Ensures that this editor will only display the page's tab + // area if there are more than one page + // + getContainer().addControlListener + (new ControlAdapter() { + boolean guard = false; + @Override + public void controlResized(ControlEvent event) { + if (!guard) { + guard = true; + hideTabs(); + guard = false; + } + } + }); + + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + + /** + * If there is just one page in the multi-page editor part, + * this hides the single tab at the bottom. + * + * + * @generated + */ + protected void hideTabs() { + if (getPageCount() <= 1) { + setPageText(0, ""); + if (getContainer() instanceof CTabFolder) { + Point point = getContainer().getSize(); + Rectangle clientArea = getContainer().getClientArea(); + getContainer().setSize(point.x, 2 * point.y - clientArea.height - clientArea.y); + } + } + } + + /** + * If there is more than one page in the multi-page editor part, + * this shows the tabs at the bottom. + * + * + * @generated + */ + protected void showTabs() { + if (getPageCount() > 1) { + setPageText(0, getString("_UI_SelectionPage_label")); + if (getContainer() instanceof CTabFolder) { + Point point = getContainer().getSize(); + Rectangle clientArea = getContainer().getClientArea(); + getContainer().setSize(point.x, clientArea.height + clientArea.y); + } + } + } + + /** + * This is used to track the active viewer. + * + * + * @generated + */ + @Override + protected void pageChange(int pageIndex) { + super.pageChange(pageIndex); + + if (contentOutlinePage != null) { + handleContentOutlineSelection(contentOutlinePage.getSelection()); + } + } + + /** + * This is how the framework determines which interfaces we implement. + * + * + * @generated + */ + @Override + public T getAdapter(Class key) { + if (key.equals(IContentOutlinePage.class)) { + return showOutlineView() ? key.cast(getContentOutlinePage()) : null; + } + else if (key.equals(IPropertySheetPage.class)) { + return key.cast(getPropertySheetPage()); + } + else if (key.equals(IGotoMarker.class)) { + return key.cast(this); + } + else { + return super.getAdapter(key); + } + } + + /** + * This accesses a cached version of the content outliner. + * + * + * @generated + */ + public IContentOutlinePage getContentOutlinePage() { + if (contentOutlinePage == null) { + // The content outline is just a tree. + // + class MyContentOutlinePage extends ContentOutlinePage { + @Override + public void createControl(Composite parent) { + super.createControl(parent); + contentOutlineViewer = getTreeViewer(); + contentOutlineViewer.addSelectionChangedListener(this); + + // Set up the tree viewer. + // + contentOutlineViewer.setUseHashlookup(true); + contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + contentOutlineViewer.setInput(editingDomain.getResourceSet()); + + // Make sure our popups work. + // + createContextMenuFor(contentOutlineViewer); + + if (!editingDomain.getResourceSet().getResources().isEmpty()) { + // Select the root object in the view. + // + contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + } + } + + @Override + public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) { + super.makeContributions(menuManager, toolBarManager, statusLineManager); + contentOutlineStatusLineManager = statusLineManager; + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + } + + contentOutlinePage = new MyContentOutlinePage(); + + // Listen to selection so that we can handle it is a special way. + // + contentOutlinePage.addSelectionChangedListener + (new ISelectionChangedListener() { + // This ensures that we handle selections correctly. + // + public void selectionChanged(SelectionChangedEvent event) { + handleContentOutlineSelection(event.getSelection()); + } + }); + } + + return contentOutlinePage; + } + + /** + * This accesses a cached version of the property sheet. + * + * + * @generated + */ + public IPropertySheetPage getPropertySheetPage() { + PropertySheetPage propertySheetPage = + new ExtendedPropertySheetPage(editingDomain, ExtendedPropertySheetPage.Decoration.NONE, null, 0, false) { + @Override + public void setSelectionToViewer(List selection) { + PetrinetEditor.this.setSelectionToViewer(selection); + PetrinetEditor.this.setFocus(); + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + }; + propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory)); + propertySheetPages.add(propertySheetPage); + + return propertySheetPage; + } + + /** + * This deals with how we want selection in the outliner to affect the other views. + * + * + * @generated + */ + public void handleContentOutlineSelection(ISelection selection) { + if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) { + Iterator selectedElements = ((IStructuredSelection)selection).iterator(); + if (selectedElements.hasNext()) { + // Get the first selected element. + // + Object selectedElement = selectedElements.next(); + + // If it's the selection viewer, then we want it to select the same selection as this selection. + // + if (currentViewerPane.getViewer() == selectionViewer) { + ArrayList selectionList = new ArrayList(); + selectionList.add(selectedElement); + while (selectedElements.hasNext()) { + selectionList.add(selectedElements.next()); + } + + // Set the selection to the widget. + // + selectionViewer.setSelection(new StructuredSelection(selectionList)); + } + else { + // Set the input to the widget. + // + if (currentViewerPane.getViewer().getInput() != selectedElement) { + currentViewerPane.getViewer().setInput(selectedElement); + currentViewerPane.setTitle(selectedElement); + } + } + } + } + } + + /** + * This is for implementing {@link IEditorPart} and simply tests the command stack. + * + * + * @generated + */ + @Override + public boolean isDirty() { + return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded(); + } + + /** + * This is for implementing {@link IEditorPart} and simply saves the model file. + * + * + * @generated + */ + @Override + public void doSave(IProgressMonitor progressMonitor) { + // Save only resources that have actually changed. + // + final Map saveOptions = new HashMap(); + saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); + saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED); + + // Do the work within an operation because this is a long running activity that modifies the workbench. + // + WorkspaceModifyOperation operation = + new WorkspaceModifyOperation() { + // This is the method that gets invoked when the operation runs. + // + @Override + public void execute(IProgressMonitor monitor) { + // Save the resources to the file system. + // + boolean first = true; + List resources = editingDomain.getResourceSet().getResources(); + for (int i = 0; i < resources.size(); ++i) { + Resource resource = resources.get(i); + if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) { + try { + long timeStamp = resource.getTimeStamp(); + resource.save(saveOptions); + if (resource.getTimeStamp() != timeStamp) { + savedResources.add(resource); + } + } + catch (Exception exception) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + first = false; + } + } + } + }; + + updateProblemIndication = false; + try { + // This runs the options, and shows progress. + // + new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation); + + // Refresh the necessary state. + // + ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone(); + firePropertyChange(IEditorPart.PROP_DIRTY); + } + catch (Exception exception) { + // Something went wrong that shouldn't. + // + PetriNetEditorPlugin.INSTANCE.log(exception); + } + updateProblemIndication = true; + updateProblemIndication(); + } + + /** + * This returns whether something has been persisted to the URI of the specified resource. + * The implementation uses the URI converter from the editor's resource set to try to open an input stream. + * + * + * @generated + */ + protected boolean isPersisted(Resource resource) { + boolean result = false; + try { + InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI()); + if (stream != null) { + result = true; + stream.close(); + } + } + catch (IOException e) { + // Ignore + } + return result; + } + + /** + * This always returns true because it is not currently supported. + * + * + * @generated + */ + @Override + public boolean isSaveAsAllowed() { + return true; + } + + /** + * This also changes the editor's input. + * + * + * @generated + */ + @Override + public void doSaveAs() { + SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell()); + saveAsDialog.open(); + IPath path = saveAsDialog.getResult(); + if (path != null) { + IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); + if (file != null) { + doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file)); + } + } + } + + /** + * + * + * @generated + */ + protected void doSaveAs(URI uri, IEditorInput editorInput) { + (editingDomain.getResourceSet().getResources().get(0)).setURI(uri); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + IProgressMonitor progressMonitor = + getActionBars().getStatusLineManager() != null ? + getActionBars().getStatusLineManager().getProgressMonitor() : + new NullProgressMonitor(); + doSave(progressMonitor); + } + + /** + * + * + * @generated + */ + public void gotoMarker(IMarker marker) { + List targetObjects = markerHelper.getTargetObjects(editingDomain, marker); + if (!targetObjects.isEmpty()) { + setSelectionToViewer(targetObjects); + } + } + + /** + * This is called during startup. + * + * + * @generated + */ + @Override + public void init(IEditorSite site, IEditorInput editorInput) { + setSite(site); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + site.setSelectionProvider(this); + site.getPage().addPartListener(partListener); + ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE); + } + + /** + * + * + * @generated + */ + @Override + public void setFocus() { + if (currentViewerPane != null) { + currentViewerPane.setFocus(); + } + else { + getControl(getActivePage()).setFocus(); + } + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * + * + * @generated + */ + public void addSelectionChangedListener(ISelectionChangedListener listener) { + selectionChangedListeners.add(listener); + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * + * + * @generated + */ + public void removeSelectionChangedListener(ISelectionChangedListener listener) { + selectionChangedListeners.remove(listener); + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection. + * + * + * @generated + */ + public ISelection getSelection() { + return editorSelection; + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection. + * Calling this result will notify the listeners. + * + * + * @generated + */ + public void setSelection(ISelection selection) { + editorSelection = selection; + + for (ISelectionChangedListener listener : selectionChangedListeners) { + listener.selectionChanged(new SelectionChangedEvent(this, selection)); + } + setStatusLineManager(selection); + } + + /** + * + * + * @generated + */ + public void setStatusLineManager(ISelection selection) { + IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ? + contentOutlineStatusLineManager : getActionBars().getStatusLineManager(); + + if (statusLineManager != null) { + if (selection instanceof IStructuredSelection) { + Collection collection = ((IStructuredSelection)selection).toList(); + switch (collection.size()) { + case 0: { + statusLineManager.setMessage(getString("_UI_NoObjectSelected")); + break; + } + case 1: { + String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next()); + statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); + break; + } + default: { + statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); + break; + } + } + } + else { + statusLineManager.setMessage(""); + } + } + } + + /** + * This looks up a string in the plugin's plugin.properties file. + * + * + * @generated + */ + private static String getString(String key) { + return PetriNetEditorPlugin.INSTANCE.getString(key); + } + + /** + * This looks up a string in plugin.properties, making a substitution. + * + * + * @generated + */ + private static String getString(String key, Object s1) { + return PetriNetEditorPlugin.INSTANCE.getString(key, new Object [] { s1 }); + } + + /** + * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu. + * + * + * @generated + */ + public void menuAboutToShow(IMenuManager menuManager) { + ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager); + } + + /** + * + * + * @generated + */ + public EditingDomainActionBarContributor getActionBarContributor() { + return (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor(); + } + + /** + * + * + * @generated + */ + public IActionBars getActionBars() { + return getActionBarContributor().getActionBars(); + } + + /** + * + * + * @generated + */ + public AdapterFactory getAdapterFactory() { + return adapterFactory; + } + + /** + * + * + * @generated + */ + @Override + public void dispose() { + updateProblemIndication = false; + + ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener); + + getSite().getPage().removePartListener(partListener); + + adapterFactory.dispose(); + + if (getActionBarContributor().getActiveEditor() == this) { + getActionBarContributor().setActiveEditor(null); + } + + for (PropertySheetPage propertySheetPage : propertySheetPages) { + propertySheetPage.dispose(); + } + + if (contentOutlinePage != null) { + contentOutlinePage.dispose(); + } + + super.dispose(); + } + + /** + * Returns whether the outline view should be presented to the user. + * + * + * @generated + */ + protected boolean showOutlineView() { + return true; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/34/4093f2509c22001c10c68e4a8bb21dd1 b/fr.n7.petriNet.editor/src/petrinet/presentation/PetrinetModelWizard.java similarity index 81% rename from .metadata/.plugins/org.eclipse.core.resources/.history/34/4093f2509c22001c10c68e4a8bb21dd1 rename to fr.n7.petriNet.editor/src/petrinet/presentation/PetrinetModelWizard.java index 9475f65..51bd061 100644 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/34/4093f2509c22001c10c68e4a8bb21dd1 +++ b/fr.n7.petriNet.editor/src/petrinet/presentation/PetrinetModelWizard.java @@ -1,6 +1,6 @@ /** */ -package simplepdl.presentation; +package petrinet.presentation; import java.util.ArrayList; @@ -69,9 +69,9 @@ import org.eclipse.ui.dialogs.WizardNewFileCreationPage; import org.eclipse.ui.part.FileEditorInput; import org.eclipse.ui.part.ISetSelectionTarget; -import simplepdl.SimplepdlFactory; -import simplepdl.SimplepdlPackage; -import simplepdl.provider.SimplePDLEditPlugin; +import petrinet.PetrinetFactory; +import petrinet.PetrinetPackage; +import petrinet.provider.PetriNetEditPlugin; import org.eclipse.core.runtime.Path; @@ -91,7 +91,7 @@ import org.eclipse.ui.PartInitException; * * @generated */ -public class SimplepdlModelWizard extends Wizard implements INewWizard { +public class PetrinetModelWizard extends Wizard implements INewWizard { /** * The supported extensions for created files. * @@ -99,7 +99,7 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { * @generated */ public static final List FILE_EXTENSIONS = - Collections.unmodifiableList(Arrays.asList(SimplePDLEditorPlugin.INSTANCE.getString("_UI_SimplepdlEditorFilenameExtensions").split("\\s*,\\s*"))); + Collections.unmodifiableList(Arrays.asList(PetriNetEditorPlugin.INSTANCE.getString("_UI_PetrinetEditorFilenameExtensions").split("\\s*,\\s*"))); /** * A formatted list of supported file extensions, suitable for display. @@ -108,7 +108,7 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { * @generated */ public static final String FORMATTED_FILE_EXTENSIONS = - SimplePDLEditorPlugin.INSTANCE.getString("_UI_SimplepdlEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", "); + PetriNetEditorPlugin.INSTANCE.getString("_UI_PetrinetEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", "); /** * This caches an instance of the model package. @@ -116,7 +116,7 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { * * @generated */ - protected SimplepdlPackage simplepdlPackage = SimplepdlPackage.eINSTANCE; + protected PetrinetPackage petrinetPackage = PetrinetPackage.eINSTANCE; /** * This caches an instance of the model factory. @@ -124,7 +124,7 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { * * @generated */ - protected SimplepdlFactory simplepdlFactory = simplepdlPackage.getSimplepdlFactory(); + protected PetrinetFactory petrinetFactory = petrinetPackage.getPetrinetFactory(); /** * This is the file creation page. @@ -132,7 +132,7 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { * * @generated */ - protected SimplepdlModelWizardNewFileCreationPage newFileCreationPage; + protected PetrinetModelWizardNewFileCreationPage newFileCreationPage; /** * This is the initial object creation page. @@ -140,7 +140,7 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { * * @generated */ - protected SimplepdlModelWizardInitialObjectCreationPage initialObjectCreationPage; + protected PetrinetModelWizardInitialObjectCreationPage initialObjectCreationPage; /** * Remember the selection during initialization for populating the default container. @@ -175,8 +175,8 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { public void init(IWorkbench workbench, IStructuredSelection selection) { this.workbench = workbench; this.selection = selection; - setWindowTitle(SimplePDLEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); - setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(SimplePDLEditorPlugin.INSTANCE.getImage("full/wizban/NewSimplepdl"))); + setWindowTitle(PetriNetEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); + setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(PetriNetEditorPlugin.INSTANCE.getImage("full/wizban/NewPetrinet"))); } /** @@ -188,7 +188,7 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { protected Collection getInitialObjectNames() { if (initialObjectNames == null) { initialObjectNames = new ArrayList(); - for (EClassifier eClassifier : simplepdlPackage.getEClassifiers()) { + for (EClassifier eClassifier : petrinetPackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; if (!eClass.isAbstract()) { @@ -208,8 +208,8 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { * @generated */ protected EObject createInitialModel() { - EClass eClass = (EClass)simplepdlPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); - EObject rootObject = simplepdlFactory.create(eClass); + EClass eClass = (EClass)petrinetPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); + EObject rootObject = petrinetFactory.create(eClass); return rootObject; } @@ -259,7 +259,7 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { resource.save(options); } catch (Exception exception) { - SimplePDLEditorPlugin.INSTANCE.log(exception); + PetriNetEditorPlugin.INSTANCE.log(exception); } finally { progressMonitor.done(); @@ -292,14 +292,14 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId()); } catch (PartInitException exception) { - MessageDialog.openError(workbenchWindow.getShell(), SimplePDLEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage()); + MessageDialog.openError(workbenchWindow.getShell(), PetriNetEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage()); return false; } return true; } catch (Exception exception) { - SimplePDLEditorPlugin.INSTANCE.log(exception); + PetriNetEditorPlugin.INSTANCE.log(exception); return false; } } @@ -310,14 +310,14 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { * * @generated */ - public class SimplepdlModelWizardNewFileCreationPage extends WizardNewFileCreationPage { + public class PetrinetModelWizardNewFileCreationPage extends WizardNewFileCreationPage { /** * Pass in the selection. * * * @generated */ - public SimplepdlModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) { + public PetrinetModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) { super(pageId, selection); } @@ -333,7 +333,7 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { String extension = new Path(getFileName()).getFileExtension(); if (extension == null || !FILE_EXTENSIONS.contains(extension)) { String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; - setErrorMessage(SimplePDLEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS })); + setErrorMessage(PetriNetEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS })); return false; } return true; @@ -357,7 +357,7 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { * * @generated */ - public class SimplepdlModelWizardInitialObjectCreationPage extends WizardPage { + public class PetrinetModelWizardInitialObjectCreationPage extends WizardPage { /** * * @@ -385,7 +385,7 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { * * @generated */ - public SimplepdlModelWizardInitialObjectCreationPage(String pageId) { + public PetrinetModelWizardInitialObjectCreationPage(String pageId) { super(pageId); } @@ -411,7 +411,7 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { Label containerLabel = new Label(composite, SWT.LEFT); { - containerLabel.setText(SimplePDLEditorPlugin.INSTANCE.getString("_UI_ModelObject")); + containerLabel.setText(PetriNetEditorPlugin.INSTANCE.getString("_UI_ModelObject")); GridData data = new GridData(); data.horizontalAlignment = GridData.FILL; @@ -437,7 +437,7 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { Label encodingLabel = new Label(composite, SWT.LEFT); { - encodingLabel.setText(SimplePDLEditorPlugin.INSTANCE.getString("_UI_XMLEncoding")); + encodingLabel.setText(PetriNetEditorPlugin.INSTANCE.getString("_UI_XMLEncoding")); GridData data = new GridData(); data.horizontalAlignment = GridData.FILL; @@ -536,10 +536,10 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { */ protected String getLabel(String typeName) { try { - return SimplePDLEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); + return PetriNetEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); } catch(MissingResourceException mre) { - SimplePDLEditorPlugin.INSTANCE.log(mre); + PetriNetEditorPlugin.INSTANCE.log(mre); } return typeName; } @@ -552,7 +552,7 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { protected Collection getEncodings() { if (encodings == null) { encodings = new ArrayList(); - for (StringTokenizer stringTokenizer = new StringTokenizer(SimplePDLEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) { + for (StringTokenizer stringTokenizer = new StringTokenizer(PetriNetEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) { encodings.add(stringTokenizer.nextToken()); } } @@ -570,10 +570,10 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { public void addPages() { // Create a page, set the title, and the initial model file name. // - newFileCreationPage = new SimplepdlModelWizardNewFileCreationPage("Whatever", selection); - newFileCreationPage.setTitle(SimplePDLEditorPlugin.INSTANCE.getString("_UI_SimplepdlModelWizard_label")); - newFileCreationPage.setDescription(SimplePDLEditorPlugin.INSTANCE.getString("_UI_SimplepdlModelWizard_description")); - newFileCreationPage.setFileName(SimplePDLEditorPlugin.INSTANCE.getString("_UI_SimplepdlEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0)); + newFileCreationPage = new PetrinetModelWizardNewFileCreationPage("Whatever", selection); + newFileCreationPage.setTitle(PetriNetEditorPlugin.INSTANCE.getString("_UI_PetrinetModelWizard_label")); + newFileCreationPage.setDescription(PetriNetEditorPlugin.INSTANCE.getString("_UI_PetrinetModelWizard_description")); + newFileCreationPage.setFileName(PetriNetEditorPlugin.INSTANCE.getString("_UI_PetrinetEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0)); addPage(newFileCreationPage); // Try and get the resource selection to determine a current directory for the file dialog. @@ -599,7 +599,7 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { // Make up a unique new name here. // - String defaultModelBaseFilename = SimplePDLEditorPlugin.INSTANCE.getString("_UI_SimplepdlEditorFilenameDefaultBase"); + String defaultModelBaseFilename = PetriNetEditorPlugin.INSTANCE.getString("_UI_PetrinetEditorFilenameDefaultBase"); String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0); String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension; for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) { @@ -609,9 +609,9 @@ public class SimplepdlModelWizard extends Wizard implements INewWizard { } } } - initialObjectCreationPage = new SimplepdlModelWizardInitialObjectCreationPage("Whatever2"); - initialObjectCreationPage.setTitle(SimplePDLEditorPlugin.INSTANCE.getString("_UI_SimplepdlModelWizard_label")); - initialObjectCreationPage.setDescription(SimplePDLEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description")); + initialObjectCreationPage = new PetrinetModelWizardInitialObjectCreationPage("Whatever2"); + initialObjectCreationPage.setTitle(PetriNetEditorPlugin.INSTANCE.getString("_UI_PetrinetModelWizard_label")); + initialObjectCreationPage.setDescription(PetriNetEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description")); addPage(initialObjectCreationPage); } diff --git a/fr.n7.petriNet.exemple/.project b/fr.n7.petriNet.exemple/.project new file mode 100644 index 0000000..abb236d --- /dev/null +++ b/fr.n7.petriNet.exemple/.project @@ -0,0 +1,11 @@ + + + fr.n7.petriNet.exemple + + + + + + + + diff --git a/fr.n7.petriNet.exemple/My.petrinet b/fr.n7.petriNet.exemple/My.petrinet new file mode 100644 index 0000000..c7168e3 --- /dev/null +++ b/fr.n7.petriNet.exemple/My.petrinet @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/fr.n7.petriNet.feature/.project b/fr.n7.petriNet.feature/.project new file mode 100644 index 0000000..948d1df --- /dev/null +++ b/fr.n7.petriNet.feature/.project @@ -0,0 +1,17 @@ + + + fr.n7.petriNet.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/fr.n7.petriNet.feature/build.properties b/fr.n7.petriNet.feature/build.properties new file mode 100644 index 0000000..64f93a9 --- /dev/null +++ b/fr.n7.petriNet.feature/build.properties @@ -0,0 +1 @@ +bin.includes = feature.xml diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/36/804ec1bbe125001c17c8b331516ef2b0 b/fr.n7.petriNet.feature/feature.xml similarity index 81% rename from .metadata/.plugins/org.eclipse.core.resources/.history/36/804ec1bbe125001c17c8b331516ef2b0 rename to fr.n7.petriNet.feature/feature.xml index 81dcb11..8edae96 100644 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/36/804ec1bbe125001c17c8b331516ef2b0 +++ b/fr.n7.petriNet.feature/feature.xml @@ -1,7 +1,7 @@ @@ -17,28 +17,28 @@ + + + + + + diff --git a/fr.n7.petriNet.tests/.project b/fr.n7.petriNet.tests/.project new file mode 100644 index 0000000..dad5771 --- /dev/null +++ b/fr.n7.petriNet.tests/.project @@ -0,0 +1,28 @@ + + + fr.n7.petriNet.tests + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/fr.n7.petriNet.tests/META-INF/MANIFEST.MF b/fr.n7.petriNet.tests/META-INF/MANIFEST.MF new file mode 100644 index 0000000..c2b9f8c --- /dev/null +++ b/fr.n7.petriNet.tests/META-INF/MANIFEST.MF @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: fr.n7.petriNet.tests;singleton:=true +Automatic-Module-Name: fr.n7.petriNet.tests +Bundle-Version: 1.0.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Export-Package: petrinet.tests +Require-Bundle: org.eclipse.core.runtime, + fr.n7.petriNet;visibility:=reexport, + org.eclipse.emf.ecore.xmi;visibility:=reexport, + org.junit;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/fr.n7.petriNet.tests/build.properties b/fr.n7.petriNet.tests/build.properties new file mode 100644 index 0000000..08af068 --- /dev/null +++ b/fr.n7.petriNet.tests/build.properties @@ -0,0 +1,8 @@ +# + +bin.includes = .,\ + META-INF/,\ + plugin.properties +jars.compile.order = . +source.. = src/ +output.. = bin/ diff --git a/fr.n7.petriNet.tests/plugin.properties b/fr.n7.petriNet.tests/plugin.properties new file mode 100644 index 0000000..e8ecc89 --- /dev/null +++ b/fr.n7.petriNet.tests/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = PetriNet Tests +providerName = www.example.org diff --git a/fr.n7.petriNet.tests/src/petrinet/tests/ArcTest.java b/fr.n7.petriNet.tests/src/petrinet/tests/ArcTest.java new file mode 100644 index 0000000..35e7c5a --- /dev/null +++ b/fr.n7.petriNet.tests/src/petrinet/tests/ArcTest.java @@ -0,0 +1,89 @@ +/** + */ +package petrinet.tests; + +import junit.framework.TestCase; + +import junit.textui.TestRunner; + +import petrinet.Arc; +import petrinet.PetrinetFactory; + +/** + * + * A test case for the model object 'Arc'. + * + * @generated + */ +public class ArcTest extends TestCase { + + /** + * The fixture for this Arc test case. + * + * + * @generated + */ + protected Arc fixture = null; + + /** + * + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(ArcTest.class); + } + + /** + * Constructs a new Arc test case with the given name. + * + * + * @generated + */ + public ArcTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Arc test case. + * + * + * @generated + */ + protected void setFixture(Arc fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Arc test case. + * + * + * @generated + */ + protected Arc getFixture() { + return fixture; + } + + /** + * + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(PetrinetFactory.eINSTANCE.createArc()); + } + + /** + * + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} //ArcTest diff --git a/fr.n7.petriNet.tests/src/petrinet/tests/NoeudTest.java b/fr.n7.petriNet.tests/src/petrinet/tests/NoeudTest.java new file mode 100644 index 0000000..3e82492 --- /dev/null +++ b/fr.n7.petriNet.tests/src/petrinet/tests/NoeudTest.java @@ -0,0 +1,55 @@ +/** + */ +package petrinet.tests; + +import junit.framework.TestCase; + +import petrinet.Noeud; + +/** + * + * A test case for the model object 'Noeud'. + * + * @generated + */ +public abstract class NoeudTest extends TestCase { + + /** + * The fixture for this Noeud test case. + * + * + * @generated + */ + protected Noeud fixture = null; + + /** + * Constructs a new Noeud test case with the given name. + * + * + * @generated + */ + public NoeudTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Noeud test case. + * + * + * @generated + */ + protected void setFixture(Noeud fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Noeud test case. + * + * + * @generated + */ + protected Noeud getFixture() { + return fixture; + } + +} //NoeudTest diff --git a/fr.n7.petriNet.tests/src/petrinet/tests/PetriNetAllTests.java b/fr.n7.petriNet.tests/src/petrinet/tests/PetriNetAllTests.java new file mode 100644 index 0000000..49bf5d2 --- /dev/null +++ b/fr.n7.petriNet.tests/src/petrinet/tests/PetriNetAllTests.java @@ -0,0 +1,46 @@ +/** + */ +package petrinet.tests; + +import junit.framework.Test; +import junit.framework.TestSuite; + +import junit.textui.TestRunner; + +/** + * + * A test suite for the 'PetriNet' model. + * + * @generated + */ +public class PetriNetAllTests extends TestSuite { + + /** + * + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(suite()); + } + + /** + * + * + * @generated + */ + public static Test suite() { + TestSuite suite = new PetriNetAllTests("PetriNet Tests"); + return suite; + } + + /** + * + * + * @generated + */ + public PetriNetAllTests(String name) { + super(name); + } + +} //PetriNetAllTests diff --git a/fr.n7.petriNet.tests/src/petrinet/tests/PetrinetExample.java b/fr.n7.petriNet.tests/src/petrinet/tests/PetrinetExample.java new file mode 100644 index 0000000..d5f9f46 --- /dev/null +++ b/fr.n7.petriNet.tests/src/petrinet/tests/PetrinetExample.java @@ -0,0 +1,121 @@ +/** + */ +package petrinet.tests; + +import java.io.File; +import java.io.IOException; + +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; + +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; + +import org.eclipse.emf.ecore.util.Diagnostician; + +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; + +import petrinet.PetrinetFactory; +import petrinet.PetrinetPackage; +import petrinet.Place; + +/** + * + * A sample utility for the 'petrinet' package. + * + * @generated + */ +public class PetrinetExample { + /** + * + * Load all the argument file paths or URIs as instances of the model. + * + * @param args the file paths or URIs. + * @generated + */ + public static void main(String[] args) { + // Create a resource set to hold the resources. + // + ResourceSet resourceSet = new ResourceSetImpl(); + + // Register the appropriate resource factory to handle all file extensions. + // + resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put + (Resource.Factory.Registry.DEFAULT_EXTENSION, + new XMIResourceFactoryImpl()); + + // Register the package to ensure it is available during loading. + // + resourceSet.getPackageRegistry().put + (PetrinetPackage.eNS_URI, + PetrinetPackage.eINSTANCE); + + // If there are no arguments, emit an appropriate usage message. + // + if (args.length == 0) { + System.out.println("Enter a list of file paths or URIs that have content like this:"); + try { + Resource resource = resourceSet.createResource(URI.createURI("http:///My.petrinet")); + Place root = PetrinetFactory.eINSTANCE.createPlace(); + resource.getContents().add(root); + resource.save(System.out, null); + } + catch (IOException exception) { + exception.printStackTrace(); + } + } + else { + // Iterate over all the arguments. + // + for (int i = 0; i < args.length; ++i) { + // Construct the URI for the instance file. + // The argument is treated as a file path only if it denotes an existing file. + // Otherwise, it's directly treated as a URL. + // + File file = new File(args[i]); + URI uri = file.isFile() ? URI.createFileURI(file.getAbsolutePath()): URI.createURI(args[i]); + + try { + // Demand load resource for this file. + // + Resource resource = resourceSet.getResource(uri, true); + System.out.println("Loaded " + uri); + + // Validate the contents of the loaded resource. + // + for (EObject eObject : resource.getContents()) { + Diagnostic diagnostic = Diagnostician.INSTANCE.validate(eObject); + if (diagnostic.getSeverity() != Diagnostic.OK) { + printDiagnostic(diagnostic, ""); + } + } + } + catch (RuntimeException exception) { + System.out.println("Problem loading " + uri); + exception.printStackTrace(); + } + } + } + } + + /** + * + * Prints diagnostics with indentation. + * + * @param diagnostic the diagnostic to print. + * @param indent the indentation for printing. + * @generated + */ + protected static void printDiagnostic(Diagnostic diagnostic, String indent) { + System.out.print(indent); + System.out.println(diagnostic.getMessage()); + for (Diagnostic child : diagnostic.getChildren()) { + printDiagnostic(child, indent + " "); + } + } + +} //PetrinetExample diff --git a/fr.n7.petriNet.tests/src/petrinet/tests/PetrinetTests.java b/fr.n7.petriNet.tests/src/petrinet/tests/PetrinetTests.java new file mode 100644 index 0000000..0fb58fd --- /dev/null +++ b/fr.n7.petriNet.tests/src/petrinet/tests/PetrinetTests.java @@ -0,0 +1,46 @@ +/** + */ +package petrinet.tests; + +import junit.framework.Test; +import junit.framework.TestSuite; + +import junit.textui.TestRunner; + +/** + * + * A test suite for the 'petrinet' package. + * + * @generated + */ +public class PetrinetTests extends TestSuite { + + /** + * + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(suite()); + } + + /** + * + * + * @generated + */ + public static Test suite() { + TestSuite suite = new PetrinetTests("petrinet Tests"); + return suite; + } + + /** + * + * + * @generated + */ + public PetrinetTests(String name) { + super(name); + } + +} //PetrinetTests diff --git a/fr.n7.petriNet.tests/src/petrinet/tests/PlaceTest.java b/fr.n7.petriNet.tests/src/petrinet/tests/PlaceTest.java new file mode 100644 index 0000000..1122854 --- /dev/null +++ b/fr.n7.petriNet.tests/src/petrinet/tests/PlaceTest.java @@ -0,0 +1,70 @@ +/** + */ +package petrinet.tests; + +import junit.textui.TestRunner; + +import petrinet.PetrinetFactory; +import petrinet.Place; + +/** + * + * A test case for the model object 'Place'. + * + * @generated + */ +public class PlaceTest extends NoeudTest { + + /** + * + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(PlaceTest.class); + } + + /** + * Constructs a new Place test case with the given name. + * + * + * @generated + */ + public PlaceTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Place test case. + * + * + * @generated + */ + @Override + protected Place getFixture() { + return (Place)fixture; + } + + /** + * + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(PetrinetFactory.eINSTANCE.createPlace()); + } + + /** + * + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} //PlaceTest diff --git a/fr.n7.petriNet.tests/src/petrinet/tests/ReseauTest.java b/fr.n7.petriNet.tests/src/petrinet/tests/ReseauTest.java new file mode 100644 index 0000000..01bcc39 --- /dev/null +++ b/fr.n7.petriNet.tests/src/petrinet/tests/ReseauTest.java @@ -0,0 +1,89 @@ +/** + */ +package petrinet.tests; + +import junit.framework.TestCase; + +import junit.textui.TestRunner; + +import petrinet.PetrinetFactory; +import petrinet.Reseau; + +/** + * + * A test case for the model object 'Reseau'. + * + * @generated + */ +public class ReseauTest extends TestCase { + + /** + * The fixture for this Reseau test case. + * + * + * @generated + */ + protected Reseau fixture = null; + + /** + * + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(ReseauTest.class); + } + + /** + * Constructs a new Reseau test case with the given name. + * + * + * @generated + */ + public ReseauTest(String name) { + super(name); + } + + /** + * Sets the fixture for this Reseau test case. + * + * + * @generated + */ + protected void setFixture(Reseau fixture) { + this.fixture = fixture; + } + + /** + * Returns the fixture for this Reseau test case. + * + * + * @generated + */ + protected Reseau getFixture() { + return fixture; + } + + /** + * + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(PetrinetFactory.eINSTANCE.createReseau()); + } + + /** + * + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} //ReseauTest diff --git a/fr.n7.petriNet.tests/src/petrinet/tests/TransitionTest.java b/fr.n7.petriNet.tests/src/petrinet/tests/TransitionTest.java new file mode 100644 index 0000000..83157ec --- /dev/null +++ b/fr.n7.petriNet.tests/src/petrinet/tests/TransitionTest.java @@ -0,0 +1,70 @@ +/** + */ +package petrinet.tests; + +import junit.textui.TestRunner; + +import petrinet.PetrinetFactory; +import petrinet.Transition; + +/** + * + * A test case for the model object 'Transition'. + * + * @generated + */ +public class TransitionTest extends NoeudTest { + + /** + * + * + * @generated + */ + public static void main(String[] args) { + TestRunner.run(TransitionTest.class); + } + + /** + * Constructs a new Transition test case with the given name. + * + * + * @generated + */ + public TransitionTest(String name) { + super(name); + } + + /** + * Returns the fixture for this Transition test case. + * + * + * @generated + */ + @Override + protected Transition getFixture() { + return (Transition)fixture; + } + + /** + * + * + * @see junit.framework.TestCase#setUp() + * @generated + */ + @Override + protected void setUp() throws Exception { + setFixture(PetrinetFactory.eINSTANCE.createTransition()); + } + + /** + * + * + * @see junit.framework.TestCase#tearDown() + * @generated + */ + @Override + protected void tearDown() throws Exception { + setFixture(null); + } + +} //TransitionTest diff --git a/fr.n7.petriNET.toTINA/.classpath b/fr.n7.petriNet.totina/.classpath similarity index 100% rename from fr.n7.petriNET.toTINA/.classpath rename to fr.n7.petriNet.totina/.classpath diff --git a/fr.n7.petriNET.toTINA/.project b/fr.n7.petriNet.totina/.project similarity index 97% rename from fr.n7.petriNET.toTINA/.project rename to fr.n7.petriNet.totina/.project index 10d03d8..a5b4430 100644 --- a/fr.n7.petriNET.toTINA/.project +++ b/fr.n7.petriNet.totina/.project @@ -1,6 +1,6 @@ - fr.n7.petriNET.toTINA + fr.n7.petriNet.totina diff --git a/fr.n7.petriNET.toTINA/META-INF/MANIFEST.MF b/fr.n7.petriNet.totina/META-INF/MANIFEST.MF similarity index 76% rename from fr.n7.petriNET.toTINA/META-INF/MANIFEST.MF rename to fr.n7.petriNet.totina/META-INF/MANIFEST.MF index 05aee54..1970eb3 100644 --- a/fr.n7.petriNET.toTINA/META-INF/MANIFEST.MF +++ b/fr.n7.petriNet.totina/META-INF/MANIFEST.MF @@ -1,9 +1,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 -Bundle-Name: Acceleo ToTINA Module Runtime Plug-in -Bundle-SymbolicName: fr.n7.petriNET.toTINA +Bundle-Name: Acceleo Totina Module Runtime Plug-in +Bundle-SymbolicName: fr.n7.petriNet.totina Bundle-Version: 1.0.0.qualifier -Bundle-Activator: fr.n7.petriNET.toTINA.Activator +Bundle-Activator: fr.n7.petriNet.totina.Activator Bundle-Vendor: Eclipse Modeling Project Require-Bundle: org.eclipse.core.runtime, org.eclipse.emf.ecore, @@ -19,5 +19,5 @@ Require-Bundle: org.eclipse.core.runtime, Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Eclipse-LazyStart: true -Export-Package: fr.n7.petriNET.toTINA.main +Export-Package: fr.n7.petriNet.totina.main diff --git a/fr.n7.petriNET.toTINA/build.properties b/fr.n7.petriNet.totina/build.properties similarity index 100% rename from fr.n7.petriNET.toTINA/build.properties rename to fr.n7.petriNet.totina/build.properties diff --git a/fr.n7.petriNET.toTINA/src/fr/n7/petriNET/toTINA/Activator.java b/fr.n7.petriNet.totina/src/fr/n7/petriNet/totina/Activator.java similarity index 94% rename from fr.n7.petriNET.toTINA/src/fr/n7/petriNET/toTINA/Activator.java rename to fr.n7.petriNet.totina/src/fr/n7/petriNet/totina/Activator.java index 5b6711d..8704f31 100644 --- a/fr.n7.petriNET.toTINA/src/fr/n7/petriNET/toTINA/Activator.java +++ b/fr.n7.petriNet.totina/src/fr/n7/petriNet/totina/Activator.java @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.n7.petriNET.toTINA; +package fr.n7.petriNet.totina; import org.eclipse.core.runtime.Plugin; import org.osgi.framework.BundleContext; @@ -21,7 +21,7 @@ public class Activator extends Plugin { /** * The plug-in ID. */ - public static final String PLUGIN_ID = "fr.n7.petriNET.toTINA"; + public static final String PLUGIN_ID = "fr.n7.petriNet.totina"; /** * The shared instance. diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/6f/505d4c3ef525001c1bd4a5e084302d35 b/fr.n7.petriNet.totina/src/fr/n7/petriNet/totina/main/ToTina.java similarity index 97% rename from .metadata/.plugins/org.eclipse.core.resources/.history/6f/505d4c3ef525001c1bd4a5e084302d35 rename to fr.n7.petriNet.totina/src/fr/n7/petriNet/totina/main/ToTina.java index b72ff3f..0b88e0a 100644 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/6f/505d4c3ef525001c1bd4a5e084302d35 +++ b/fr.n7.petriNet.totina/src/fr/n7/petriNet/totina/main/ToTina.java @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package fr.n7.petriNET.toTINA.main; +package fr.n7.petriNet.totina.main; import java.io.File; import java.io.IOException; @@ -25,24 +25,24 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.ResourceSet; /** - * Entry point of the 'ToTINA' generation module. + * Entry point of the 'ToTina' generation module. * * @generated */ -public class ToTINA extends AbstractAcceleoGenerator { +public class ToTina extends AbstractAcceleoGenerator { /** * The name of the module. * * @generated */ - public static final String MODULE_FILE_NAME = "/fr/n7/petriNET/toTINA/main/toTINA"; + public static final String MODULE_FILE_NAME = "/fr/n7/petriNet/totina/main/toTina"; /** * The name of the templates that are to be generated. * * @generated */ - public static final String[] TEMPLATE_NAMES = { "networkToTINA" }; + public static final String[] TEMPLATE_NAMES = { "reseauToTina" }; /** * The list of properties files from the launch parameters (Launch configuration). @@ -65,7 +65,7 @@ public class ToTINA extends AbstractAcceleoGenerator { * * @generated */ - public ToTINA() { + public ToTina() { // Empty implementation } @@ -85,7 +85,7 @@ public class ToTINA extends AbstractAcceleoGenerator { * the model cannot be loaded. * @generated */ - public ToTINA(URI modelURI, File targetFolder, + public ToTina(URI modelURI, File targetFolder, List arguments) throws IOException { initialize(modelURI, targetFolder, arguments); } @@ -106,7 +106,7 @@ public class ToTINA extends AbstractAcceleoGenerator { * This can be thrown in two scenarios : the module cannot be found, or it cannot be loaded. * @generated */ - public ToTINA(EObject model, File targetFolder, + public ToTina(EObject model, File targetFolder, List arguments) throws IOException { initialize(model, targetFolder, arguments); } @@ -141,7 +141,7 @@ public class ToTINA extends AbstractAcceleoGenerator { * add in "arguments" this "String" attribute. */ - ToTINA generator = new ToTINA(modelURI, folder, arguments); + ToTina generator = new ToTina(modelURI, folder, arguments); /* * Add the properties from the launch arguments. diff --git a/fr.n7.petriNet.totina/src/fr/n7/petriNet/totina/main/toTina.mtl b/fr.n7.petriNet.totina/src/fr/n7/petriNet/totina/main/toTina.mtl new file mode 100644 index 0000000..bae139e --- /dev/null +++ b/fr.n7.petriNet.totina/src/fr/n7/petriNet/totina/main/toTina.mtl @@ -0,0 +1,10 @@ +[comment encoding = UTF-8 /] +[module toTina('http://petrinet')] + + +[template public reseauToTina(anArc : Arc)] +[comment @main/] +[file (anArc.name, false, 'UTF-8')] + +[/file] +[/template] diff --git a/fr.n7.petriNET.toTINA/tasks/toTINA.xml b/fr.n7.petriNet.totina/tasks/toTina.xml similarity index 82% rename from fr.n7.petriNET.toTINA/tasks/toTINA.xml rename to fr.n7.petriNet.totina/tasks/toTina.xml index 84882c9..10e4aa0 100644 --- a/fr.n7.petriNET.toTINA/tasks/toTINA.xml +++ b/fr.n7.petriNet.totina/tasks/toTina.xml @@ -1,11 +1,11 @@ - + - - + + @@ -31,23 +31,23 @@ - - + + - - + + - - + + - - + + @@ -57,8 +57,8 @@ In case of problem you can also try with all the jar available in your Eclipse Keep in mind that having two versions of the same jar can create problems --> - - + + diff --git a/fr.n7.petriNET.toTINA/tasks/toTINATarget.xml b/fr.n7.petriNet.totina/tasks/toTinaTarget.xml similarity index 69% rename from fr.n7.petriNET.toTINA/tasks/toTINATarget.xml rename to fr.n7.petriNet.totina/tasks/toTinaTarget.xml index f6ed663..2d949ef 100644 --- a/fr.n7.petriNET.toTINA/tasks/toTINATarget.xml +++ b/fr.n7.petriNet.totina/tasks/toTinaTarget.xml @@ -3,15 +3,15 @@ - - + + - - + + diff --git a/fr.n7.petriNet/.classpath b/fr.n7.petriNet/.classpath new file mode 100644 index 0000000..c3ba59e --- /dev/null +++ b/fr.n7.petriNet/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/fr.n7.petriNet/.project b/fr.n7.petriNet/.project index 7ed2a3b..5fee183 100644 --- a/fr.n7.petriNet/.project +++ b/fr.n7.petriNet/.project @@ -5,7 +5,24 @@ + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/93/405bf25ac121001c139dafbb58acffc5 b/fr.n7.petriNet/META-INF/MANIFEST.MF similarity index 69% rename from .metadata/.plugins/org.eclipse.core.resources/.history/93/405bf25ac121001c139dafbb58acffc5 rename to fr.n7.petriNet/META-INF/MANIFEST.MF index 5025481..cefd11c 100644 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/93/405bf25ac121001c139dafbb58acffc5 +++ b/fr.n7.petriNet/META-INF/MANIFEST.MF @@ -1,16 +1,16 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName -Bundle-SymbolicName: fr.n7.simplePDL;singleton:=true -Automatic-Module-Name: fr.n7.simplePDL +Bundle-SymbolicName: fr.n7.petriNet;singleton:=true +Automatic-Module-Name: fr.n7.petriNet Bundle-Version: 1.0.0.qualifier Bundle-ClassPath: . Bundle-Vendor: %providerName Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Export-Package: simplepdl, - simplepdl.impl, - simplepdl.util +Export-Package: petrinet, + petrinet.impl, + petrinet.util Require-Bundle: org.eclipse.core.runtime, org.eclipse.emf.ecore;visibility:=reexport Bundle-ActivationPolicy: lazy diff --git a/fr.n7.petriNet/build.properties b/fr.n7.petriNet/build.properties new file mode 100644 index 0000000..4465407 --- /dev/null +++ b/fr.n7.petriNet/build.properties @@ -0,0 +1,10 @@ +# + +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/ +output.. = bin/ diff --git a/fr.n7.petriNet/petriNet.ecore b/fr.n7.petriNet/petriNet.ecore index b78d233..d71d670 100644 --- a/fr.n7.petriNet/petriNet.ecore +++ b/fr.n7.petriNet/petriNet.ecore @@ -6,10 +6,10 @@ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> - + - + diff --git a/fr.n7.petriNet/petriNet.genmodel b/fr.n7.petriNet/petriNet.genmodel new file mode 100644 index 0000000..f454b98 --- /dev/null +++ b/fr.n7.petriNet/petriNet.genmodel @@ -0,0 +1,28 @@ + + + petriNet.ecore + + + + + + + + + + + + + + + + + + + + + diff --git a/fr.n7.petriNet/plugin.properties b/fr.n7.petriNet/plugin.properties new file mode 100644 index 0000000..12deda7 --- /dev/null +++ b/fr.n7.petriNet/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = PetriNet Model +providerName = www.example.org diff --git a/fr.n7.petriNet/plugin.xml b/fr.n7.petriNet/plugin.xml new file mode 100644 index 0000000..8b6168e --- /dev/null +++ b/fr.n7.petriNet/plugin.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + diff --git a/fr.n7.petriNet/src/petrinet/Arc.java b/fr.n7.petriNet/src/petrinet/Arc.java new file mode 100644 index 0000000..7bb8319 --- /dev/null +++ b/fr.n7.petriNet/src/petrinet/Arc.java @@ -0,0 +1,92 @@ +/** + */ +package petrinet; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Arc'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link petrinet.Arc#getPoids Poids}
  • + *
  • {@link petrinet.Arc#isSortant Sortant}
  • + *
  • {@link petrinet.Arc#getCible Cible}
  • + *
+ * + * @see petrinet.PetrinetPackage#getArc() + * @model + * @generated + */ +public interface Arc extends EObject { + /** + * Returns the value of the 'Poids' attribute. + * + * + * @return the value of the 'Poids' attribute. + * @see #setPoids(int) + * @see petrinet.PetrinetPackage#getArc_Poids() + * @model required="true" + * @generated + */ + int getPoids(); + + /** + * Sets the value of the '{@link petrinet.Arc#getPoids Poids}' attribute. + * + * + * @param value the new value of the 'Poids' attribute. + * @see #getPoids() + * @generated + */ + void setPoids(int value); + + /** + * Returns the value of the 'Sortant' attribute. + * + * + * @return the value of the 'Sortant' attribute. + * @see #setSortant(boolean) + * @see petrinet.PetrinetPackage#getArc_Sortant() + * @model required="true" + * @generated + */ + boolean isSortant(); + + /** + * Sets the value of the '{@link petrinet.Arc#isSortant Sortant}' attribute. + * + * + * @param value the new value of the 'Sortant' attribute. + * @see #isSortant() + * @generated + */ + void setSortant(boolean value); + + /** + * Returns the value of the 'Cible' reference. + * + * + * @return the value of the 'Cible' reference. + * @see #setCible(Place) + * @see petrinet.PetrinetPackage#getArc_Cible() + * @model required="true" + * @generated + */ + Place getCible(); + + /** + * Sets the value of the '{@link petrinet.Arc#getCible Cible}' reference. + * + * + * @param value the new value of the 'Cible' reference. + * @see #getCible() + * @generated + */ + void setCible(Place value); + +} // Arc diff --git a/fr.n7.petriNet/src/petrinet/Noeud.java b/fr.n7.petriNet/src/petrinet/Noeud.java new file mode 100644 index 0000000..0bde8f8 --- /dev/null +++ b/fr.n7.petriNet/src/petrinet/Noeud.java @@ -0,0 +1,46 @@ +/** + */ +package petrinet; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Noeud'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link petrinet.Noeud#getName Name}
  • + *
+ * + * @see petrinet.PetrinetPackage#getNoeud() + * @model abstract="true" + * @generated + */ +public interface Noeud extends EObject { + /** + * Returns the value of the 'Name' attribute. + * + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see petrinet.PetrinetPackage#getNoeud_Name() + * @model required="true" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link petrinet.Noeud#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // Noeud diff --git a/fr.n7.petriNet/src/petrinet/PetrinetFactory.java b/fr.n7.petriNet/src/petrinet/PetrinetFactory.java new file mode 100644 index 0000000..aa89329 --- /dev/null +++ b/fr.n7.petriNet/src/petrinet/PetrinetFactory.java @@ -0,0 +1,69 @@ +/** + */ +package petrinet; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see petrinet.PetrinetPackage + * @generated + */ +public interface PetrinetFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + PetrinetFactory eINSTANCE = petrinet.impl.PetrinetFactoryImpl.init(); + + /** + * Returns a new object of class 'Place'. + * + * + * @return a new object of class 'Place'. + * @generated + */ + Place createPlace(); + + /** + * Returns a new object of class 'Transition'. + * + * + * @return a new object of class 'Transition'. + * @generated + */ + Transition createTransition(); + + /** + * Returns a new object of class 'Arc'. + * + * + * @return a new object of class 'Arc'. + * @generated + */ + Arc createArc(); + + /** + * Returns a new object of class 'Reseau'. + * + * + * @return a new object of class 'Reseau'. + * @generated + */ + Reseau createReseau(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + PetrinetPackage getPetrinetPackage(); + +} //PetrinetFactory diff --git a/fr.n7.petriNet/src/petrinet/PetrinetPackage.java b/fr.n7.petriNet/src/petrinet/PetrinetPackage.java new file mode 100644 index 0000000..a50598f --- /dev/null +++ b/fr.n7.petriNet/src/petrinet/PetrinetPackage.java @@ -0,0 +1,567 @@ +/** + */ +package petrinet; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see petrinet.PetrinetFactory + * @model kind="package" + * @generated + */ +public interface PetrinetPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "petrinet"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://petrinet"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "petrinet"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + PetrinetPackage eINSTANCE = petrinet.impl.PetrinetPackageImpl.init(); + + /** + * The meta object id for the '{@link petrinet.impl.NoeudImpl Noeud}' class. + * + * + * @see petrinet.impl.NoeudImpl + * @see petrinet.impl.PetrinetPackageImpl#getNoeud() + * @generated + */ + int NOEUD = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int NOEUD__NAME = 0; + + /** + * The number of structural features of the 'Noeud' class. + * + * + * @generated + * @ordered + */ + int NOEUD_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Noeud' class. + * + * + * @generated + * @ordered + */ + int NOEUD_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link petrinet.impl.PlaceImpl Place}' class. + * + * + * @see petrinet.impl.PlaceImpl + * @see petrinet.impl.PetrinetPackageImpl#getPlace() + * @generated + */ + int PLACE = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int PLACE__NAME = NOEUD__NAME; + + /** + * The feature id for the 'Jetons' attribute. + * + * + * @generated + * @ordered + */ + int PLACE__JETONS = NOEUD_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Place' class. + * + * + * @generated + * @ordered + */ + int PLACE_FEATURE_COUNT = NOEUD_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Place' class. + * + * + * @generated + * @ordered + */ + int PLACE_OPERATION_COUNT = NOEUD_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link petrinet.impl.TransitionImpl Transition}' class. + * + * + * @see petrinet.impl.TransitionImpl + * @see petrinet.impl.PetrinetPackageImpl#getTransition() + * @generated + */ + int TRANSITION = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int TRANSITION__NAME = NOEUD__NAME; + + /** + * The feature id for the 'Arcs' containment reference list. + * + * + * @generated + * @ordered + */ + int TRANSITION__ARCS = NOEUD_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Transition' class. + * + * + * @generated + * @ordered + */ + int TRANSITION_FEATURE_COUNT = NOEUD_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Transition' class. + * + * + * @generated + * @ordered + */ + int TRANSITION_OPERATION_COUNT = NOEUD_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link petrinet.impl.ArcImpl Arc}' class. + * + * + * @see petrinet.impl.ArcImpl + * @see petrinet.impl.PetrinetPackageImpl#getArc() + * @generated + */ + int ARC = 2; + + /** + * The feature id for the 'Poids' attribute. + * + * + * @generated + * @ordered + */ + int ARC__POIDS = 0; + + /** + * The feature id for the 'Sortant' attribute. + * + * + * @generated + * @ordered + */ + int ARC__SORTANT = 1; + + /** + * The feature id for the 'Cible' reference. + * + * + * @generated + * @ordered + */ + int ARC__CIBLE = 2; + + /** + * The number of structural features of the 'Arc' class. + * + * + * @generated + * @ordered + */ + int ARC_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Arc' class. + * + * + * @generated + * @ordered + */ + int ARC_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link petrinet.impl.ReseauImpl Reseau}' class. + * + * + * @see petrinet.impl.ReseauImpl + * @see petrinet.impl.PetrinetPackageImpl#getReseau() + * @generated + */ + int RESEAU = 4; + + /** + * The feature id for the 'Noeuds' containment reference list. + * + * + * @generated + * @ordered + */ + int RESEAU__NOEUDS = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int RESEAU__NAME = 1; + + /** + * The number of structural features of the 'Reseau' class. + * + * + * @generated + * @ordered + */ + int RESEAU_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Reseau' class. + * + * + * @generated + * @ordered + */ + int RESEAU_OPERATION_COUNT = 0; + + + /** + * Returns the meta object for class '{@link petrinet.Place Place}'. + * + * + * @return the meta object for class 'Place'. + * @see petrinet.Place + * @generated + */ + EClass getPlace(); + + /** + * Returns the meta object for the attribute '{@link petrinet.Place#getJetons Jetons}'. + * + * + * @return the meta object for the attribute 'Jetons'. + * @see petrinet.Place#getJetons() + * @see #getPlace() + * @generated + */ + EAttribute getPlace_Jetons(); + + /** + * Returns the meta object for class '{@link petrinet.Transition Transition}'. + * + * + * @return the meta object for class 'Transition'. + * @see petrinet.Transition + * @generated + */ + EClass getTransition(); + + /** + * Returns the meta object for the containment reference list '{@link petrinet.Transition#getArcs Arcs}'. + * + * + * @return the meta object for the containment reference list 'Arcs'. + * @see petrinet.Transition#getArcs() + * @see #getTransition() + * @generated + */ + EReference getTransition_Arcs(); + + /** + * Returns the meta object for class '{@link petrinet.Arc Arc}'. + * + * + * @return the meta object for class 'Arc'. + * @see petrinet.Arc + * @generated + */ + EClass getArc(); + + /** + * Returns the meta object for the attribute '{@link petrinet.Arc#getPoids Poids}'. + * + * + * @return the meta object for the attribute 'Poids'. + * @see petrinet.Arc#getPoids() + * @see #getArc() + * @generated + */ + EAttribute getArc_Poids(); + + /** + * Returns the meta object for the attribute '{@link petrinet.Arc#isSortant Sortant}'. + * + * + * @return the meta object for the attribute 'Sortant'. + * @see petrinet.Arc#isSortant() + * @see #getArc() + * @generated + */ + EAttribute getArc_Sortant(); + + /** + * Returns the meta object for the reference '{@link petrinet.Arc#getCible Cible}'. + * + * + * @return the meta object for the reference 'Cible'. + * @see petrinet.Arc#getCible() + * @see #getArc() + * @generated + */ + EReference getArc_Cible(); + + /** + * Returns the meta object for class '{@link petrinet.Noeud Noeud}'. + * + * + * @return the meta object for class 'Noeud'. + * @see petrinet.Noeud + * @generated + */ + EClass getNoeud(); + + /** + * Returns the meta object for the attribute '{@link petrinet.Noeud#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see petrinet.Noeud#getName() + * @see #getNoeud() + * @generated + */ + EAttribute getNoeud_Name(); + + /** + * Returns the meta object for class '{@link petrinet.Reseau Reseau}'. + * + * + * @return the meta object for class 'Reseau'. + * @see petrinet.Reseau + * @generated + */ + EClass getReseau(); + + /** + * Returns the meta object for the containment reference list '{@link petrinet.Reseau#getNoeuds Noeuds}'. + * + * + * @return the meta object for the containment reference list 'Noeuds'. + * @see petrinet.Reseau#getNoeuds() + * @see #getReseau() + * @generated + */ + EReference getReseau_Noeuds(); + + /** + * Returns the meta object for the attribute '{@link petrinet.Reseau#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see petrinet.Reseau#getName() + * @see #getReseau() + * @generated + */ + EAttribute getReseau_Name(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + PetrinetFactory getPetrinetFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link petrinet.impl.PlaceImpl Place}' class. + * + * + * @see petrinet.impl.PlaceImpl + * @see petrinet.impl.PetrinetPackageImpl#getPlace() + * @generated + */ + EClass PLACE = eINSTANCE.getPlace(); + + /** + * The meta object literal for the 'Jetons' attribute feature. + * + * + * @generated + */ + EAttribute PLACE__JETONS = eINSTANCE.getPlace_Jetons(); + + /** + * The meta object literal for the '{@link petrinet.impl.TransitionImpl Transition}' class. + * + * + * @see petrinet.impl.TransitionImpl + * @see petrinet.impl.PetrinetPackageImpl#getTransition() + * @generated + */ + EClass TRANSITION = eINSTANCE.getTransition(); + + /** + * The meta object literal for the 'Arcs' containment reference list feature. + * + * + * @generated + */ + EReference TRANSITION__ARCS = eINSTANCE.getTransition_Arcs(); + + /** + * The meta object literal for the '{@link petrinet.impl.ArcImpl Arc}' class. + * + * + * @see petrinet.impl.ArcImpl + * @see petrinet.impl.PetrinetPackageImpl#getArc() + * @generated + */ + EClass ARC = eINSTANCE.getArc(); + + /** + * The meta object literal for the 'Poids' attribute feature. + * + * + * @generated + */ + EAttribute ARC__POIDS = eINSTANCE.getArc_Poids(); + + /** + * The meta object literal for the 'Sortant' attribute feature. + * + * + * @generated + */ + EAttribute ARC__SORTANT = eINSTANCE.getArc_Sortant(); + + /** + * The meta object literal for the 'Cible' reference feature. + * + * + * @generated + */ + EReference ARC__CIBLE = eINSTANCE.getArc_Cible(); + + /** + * The meta object literal for the '{@link petrinet.impl.NoeudImpl Noeud}' class. + * + * + * @see petrinet.impl.NoeudImpl + * @see petrinet.impl.PetrinetPackageImpl#getNoeud() + * @generated + */ + EClass NOEUD = eINSTANCE.getNoeud(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute NOEUD__NAME = eINSTANCE.getNoeud_Name(); + + /** + * The meta object literal for the '{@link petrinet.impl.ReseauImpl Reseau}' class. + * + * + * @see petrinet.impl.ReseauImpl + * @see petrinet.impl.PetrinetPackageImpl#getReseau() + * @generated + */ + EClass RESEAU = eINSTANCE.getReseau(); + + /** + * The meta object literal for the 'Noeuds' containment reference list feature. + * + * + * @generated + */ + EReference RESEAU__NOEUDS = eINSTANCE.getReseau_Noeuds(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute RESEAU__NAME = eINSTANCE.getReseau_Name(); + + } + +} //PetrinetPackage diff --git a/fr.n7.petriNet/src/petrinet/Place.java b/fr.n7.petriNet/src/petrinet/Place.java new file mode 100644 index 0000000..1c62c27 --- /dev/null +++ b/fr.n7.petriNet/src/petrinet/Place.java @@ -0,0 +1,45 @@ +/** + */ +package petrinet; + + +/** + * + * A representation of the model object 'Place'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link petrinet.Place#getJetons Jetons}
  • + *
+ * + * @see petrinet.PetrinetPackage#getPlace() + * @model + * @generated + */ +public interface Place extends Noeud { + /** + * Returns the value of the 'Jetons' attribute. + * + * + * @return the value of the 'Jetons' attribute. + * @see #setJetons(int) + * @see petrinet.PetrinetPackage#getPlace_Jetons() + * @model required="true" + * @generated + */ + int getJetons(); + + /** + * Sets the value of the '{@link petrinet.Place#getJetons Jetons}' attribute. + * + * + * @param value the new value of the 'Jetons' attribute. + * @see #getJetons() + * @generated + */ + void setJetons(int value); + +} // Place diff --git a/fr.n7.petriNet/src/petrinet/Reseau.java b/fr.n7.petriNet/src/petrinet/Reseau.java new file mode 100644 index 0000000..8d04f70 --- /dev/null +++ b/fr.n7.petriNet/src/petrinet/Reseau.java @@ -0,0 +1,61 @@ +/** + */ +package petrinet; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Reseau'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link petrinet.Reseau#getNoeuds Noeuds}
  • + *
  • {@link petrinet.Reseau#getName Name}
  • + *
+ * + * @see petrinet.PetrinetPackage#getReseau() + * @model + * @generated + */ +public interface Reseau extends EObject { + /** + * Returns the value of the 'Noeuds' containment reference list. + * The list contents are of type {@link petrinet.Noeud}. + * + * + * @return the value of the 'Noeuds' containment reference list. + * @see petrinet.PetrinetPackage#getReseau_Noeuds() + * @model containment="true" + * @generated + */ + EList getNoeuds(); + + /** + * Returns the value of the 'Name' attribute. + * + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see petrinet.PetrinetPackage#getReseau_Name() + * @model required="true" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link petrinet.Reseau#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // Reseau diff --git a/fr.n7.petriNet/src/petrinet/Transition.java b/fr.n7.petriNet/src/petrinet/Transition.java new file mode 100644 index 0000000..25e59e5 --- /dev/null +++ b/fr.n7.petriNet/src/petrinet/Transition.java @@ -0,0 +1,36 @@ +/** + */ +package petrinet; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Transition'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link petrinet.Transition#getArcs Arcs}
  • + *
+ * + * @see petrinet.PetrinetPackage#getTransition() + * @model + * @generated + */ +public interface Transition extends Noeud { + /** + * Returns the value of the 'Arcs' containment reference list. + * The list contents are of type {@link petrinet.Arc}. + * + * + * @return the value of the 'Arcs' containment reference list. + * @see petrinet.PetrinetPackage#getTransition_Arcs() + * @model containment="true" + * @generated + */ + EList getArcs(); + +} // Transition diff --git a/fr.n7.petriNet/src/petrinet/impl/ArcImpl.java b/fr.n7.petriNet/src/petrinet/impl/ArcImpl.java new file mode 100644 index 0000000..f84929c --- /dev/null +++ b/fr.n7.petriNet/src/petrinet/impl/ArcImpl.java @@ -0,0 +1,279 @@ +/** + */ +package petrinet.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import petrinet.Arc; +import petrinet.PetrinetPackage; +import petrinet.Place; + +/** + * + * An implementation of the model object 'Arc'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link petrinet.impl.ArcImpl#getPoids Poids}
  • + *
  • {@link petrinet.impl.ArcImpl#isSortant Sortant}
  • + *
  • {@link petrinet.impl.ArcImpl#getCible Cible}
  • + *
+ * + * @generated + */ +public class ArcImpl extends MinimalEObjectImpl.Container implements Arc { + /** + * The default value of the '{@link #getPoids() Poids}' attribute. + * + * + * @see #getPoids() + * @generated + * @ordered + */ + protected static final int POIDS_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getPoids() Poids}' attribute. + * + * + * @see #getPoids() + * @generated + * @ordered + */ + protected int poids = POIDS_EDEFAULT; + + /** + * The default value of the '{@link #isSortant() Sortant}' attribute. + * + * + * @see #isSortant() + * @generated + * @ordered + */ + protected static final boolean SORTANT_EDEFAULT = false; + + /** + * The cached value of the '{@link #isSortant() Sortant}' attribute. + * + * + * @see #isSortant() + * @generated + * @ordered + */ + protected boolean sortant = SORTANT_EDEFAULT; + + /** + * The cached value of the '{@link #getCible() Cible}' reference. + * + * + * @see #getCible() + * @generated + * @ordered + */ + protected Place cible; + + /** + * + * + * @generated + */ + protected ArcImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PetrinetPackage.Literals.ARC; + } + + /** + * + * + * @generated + */ + public int getPoids() { + return poids; + } + + /** + * + * + * @generated + */ + public void setPoids(int newPoids) { + int oldPoids = poids; + poids = newPoids; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PetrinetPackage.ARC__POIDS, oldPoids, poids)); + } + + /** + * + * + * @generated + */ + public boolean isSortant() { + return sortant; + } + + /** + * + * + * @generated + */ + public void setSortant(boolean newSortant) { + boolean oldSortant = sortant; + sortant = newSortant; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PetrinetPackage.ARC__SORTANT, oldSortant, sortant)); + } + + /** + * + * + * @generated + */ + public Place getCible() { + if (cible != null && cible.eIsProxy()) { + InternalEObject oldCible = (InternalEObject)cible; + cible = (Place)eResolveProxy(oldCible); + if (cible != oldCible) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, PetrinetPackage.ARC__CIBLE, oldCible, cible)); + } + } + return cible; + } + + /** + * + * + * @generated + */ + public Place basicGetCible() { + return cible; + } + + /** + * + * + * @generated + */ + public void setCible(Place newCible) { + Place oldCible = cible; + cible = newCible; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PetrinetPackage.ARC__CIBLE, oldCible, cible)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PetrinetPackage.ARC__POIDS: + return getPoids(); + case PetrinetPackage.ARC__SORTANT: + return isSortant(); + case PetrinetPackage.ARC__CIBLE: + if (resolve) return getCible(); + return basicGetCible(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PetrinetPackage.ARC__POIDS: + setPoids((Integer)newValue); + return; + case PetrinetPackage.ARC__SORTANT: + setSortant((Boolean)newValue); + return; + case PetrinetPackage.ARC__CIBLE: + setCible((Place)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PetrinetPackage.ARC__POIDS: + setPoids(POIDS_EDEFAULT); + return; + case PetrinetPackage.ARC__SORTANT: + setSortant(SORTANT_EDEFAULT); + return; + case PetrinetPackage.ARC__CIBLE: + setCible((Place)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PetrinetPackage.ARC__POIDS: + return poids != POIDS_EDEFAULT; + case PetrinetPackage.ARC__SORTANT: + return sortant != SORTANT_EDEFAULT; + case PetrinetPackage.ARC__CIBLE: + return cible != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (poids: "); + result.append(poids); + result.append(", sortant: "); + result.append(sortant); + result.append(')'); + return result.toString(); + } + +} //ArcImpl diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3d/60130b339822001c17faa9b6b0561c0f b/fr.n7.petriNet/src/petrinet/impl/NoeudImpl.java similarity index 55% rename from .metadata/.plugins/org.eclipse.core.resources/.history/3d/60130b339822001c17faa9b6b0561c0f rename to fr.n7.petriNet/src/petrinet/impl/NoeudImpl.java index 3c36103..053e8a0 100644 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/3d/60130b339822001c17faa9b6b0561c0f +++ b/fr.n7.petriNet/src/petrinet/impl/NoeudImpl.java @@ -1,51 +1,31 @@ /** */ -package simplepdl.impl; +package petrinet.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; -import simplepdl.Resource; -import simplepdl.SimplepdlPackage; +import petrinet.Noeud; +import petrinet.PetrinetPackage; /** * - * An implementation of the model object 'Resource'. + * An implementation of the model object 'Noeud'. * *

* The following features are implemented: *

*
    - *
  • {@link simplepdl.impl.ResourceImpl#getQuantity Quantity}
  • - *
  • {@link simplepdl.impl.ResourceImpl#getName Name}
  • + *
  • {@link petrinet.impl.NoeudImpl#getName Name}
  • *
* * @generated */ -public class ResourceImpl extends ProcessElementImpl implements Resource { - /** - * The default value of the '{@link #getQuantity() Quantity}' attribute. - * - * - * @see #getQuantity() - * @generated - * @ordered - */ - protected static final int QUANTITY_EDEFAULT = 0; - - /** - * The cached value of the '{@link #getQuantity() Quantity}' attribute. - * - * - * @see #getQuantity() - * @generated - * @ordered - */ - protected int quantity = QUANTITY_EDEFAULT; - +public abstract class NoeudImpl extends MinimalEObjectImpl.Container implements Noeud { /** * The default value of the '{@link #getName() Name}' attribute. * @@ -71,7 +51,7 @@ public class ResourceImpl extends ProcessElementImpl implements Resource { * * @generated */ - protected ResourceImpl() { + protected NoeudImpl() { super(); } @@ -82,28 +62,7 @@ public class ResourceImpl extends ProcessElementImpl implements Resource { */ @Override protected EClass eStaticClass() { - return SimplepdlPackage.Literals.RESOURCE; - } - - /** - * - * - * @generated - */ - public int getQuantity() { - return quantity; - } - - /** - * - * - * @generated - */ - public void setQuantity(int newQuantity) { - int oldQuantity = quantity; - quantity = newQuantity; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.RESOURCE__QUANTITY, oldQuantity, quantity)); + return PetrinetPackage.Literals.NOEUD; } /** @@ -124,7 +83,7 @@ public class ResourceImpl extends ProcessElementImpl implements Resource { String oldName = name; name = newName; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.RESOURCE__NAME, oldName, name)); + eNotify(new ENotificationImpl(this, Notification.SET, PetrinetPackage.NOEUD__NAME, oldName, name)); } /** @@ -135,9 +94,7 @@ public class ResourceImpl extends ProcessElementImpl implements Resource { @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case SimplepdlPackage.RESOURCE__QUANTITY: - return getQuantity(); - case SimplepdlPackage.RESOURCE__NAME: + case PetrinetPackage.NOEUD__NAME: return getName(); } return super.eGet(featureID, resolve, coreType); @@ -151,10 +108,7 @@ public class ResourceImpl extends ProcessElementImpl implements Resource { @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case SimplepdlPackage.RESOURCE__QUANTITY: - setQuantity((Integer)newValue); - return; - case SimplepdlPackage.RESOURCE__NAME: + case PetrinetPackage.NOEUD__NAME: setName((String)newValue); return; } @@ -169,10 +123,7 @@ public class ResourceImpl extends ProcessElementImpl implements Resource { @Override public void eUnset(int featureID) { switch (featureID) { - case SimplepdlPackage.RESOURCE__QUANTITY: - setQuantity(QUANTITY_EDEFAULT); - return; - case SimplepdlPackage.RESOURCE__NAME: + case PetrinetPackage.NOEUD__NAME: setName(NAME_EDEFAULT); return; } @@ -187,9 +138,7 @@ public class ResourceImpl extends ProcessElementImpl implements Resource { @Override public boolean eIsSet(int featureID) { switch (featureID) { - case SimplepdlPackage.RESOURCE__QUANTITY: - return quantity != QUANTITY_EDEFAULT; - case SimplepdlPackage.RESOURCE__NAME: + case PetrinetPackage.NOEUD__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); } return super.eIsSet(featureID); @@ -205,12 +154,10 @@ public class ResourceImpl extends ProcessElementImpl implements Resource { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); - result.append(" (quantity: "); - result.append(quantity); - result.append(", name: "); + result.append(" (name: "); result.append(name); result.append(')'); return result.toString(); } -} //ResourceImpl +} //NoeudImpl diff --git a/fr.n7.petriNet/src/petrinet/impl/PetrinetFactoryImpl.java b/fr.n7.petriNet/src/petrinet/impl/PetrinetFactoryImpl.java new file mode 100644 index 0000000..080ad6c --- /dev/null +++ b/fr.n7.petriNet/src/petrinet/impl/PetrinetFactoryImpl.java @@ -0,0 +1,128 @@ +/** + */ +package petrinet.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import petrinet.*; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class PetrinetFactoryImpl extends EFactoryImpl implements PetrinetFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static PetrinetFactory init() { + try { + PetrinetFactory thePetrinetFactory = (PetrinetFactory)EPackage.Registry.INSTANCE.getEFactory(PetrinetPackage.eNS_URI); + if (thePetrinetFactory != null) { + return thePetrinetFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new PetrinetFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public PetrinetFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case PetrinetPackage.PLACE: return createPlace(); + case PetrinetPackage.TRANSITION: return createTransition(); + case PetrinetPackage.ARC: return createArc(); + case PetrinetPackage.RESEAU: return createReseau(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public Place createPlace() { + PlaceImpl place = new PlaceImpl(); + return place; + } + + /** + * + * + * @generated + */ + public Transition createTransition() { + TransitionImpl transition = new TransitionImpl(); + return transition; + } + + /** + * + * + * @generated + */ + public Arc createArc() { + ArcImpl arc = new ArcImpl(); + return arc; + } + + /** + * + * + * @generated + */ + public Reseau createReseau() { + ReseauImpl reseau = new ReseauImpl(); + return reseau; + } + + /** + * + * + * @generated + */ + public PetrinetPackage getPetrinetPackage() { + return (PetrinetPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static PetrinetPackage getPackage() { + return PetrinetPackage.eINSTANCE; + } + +} //PetrinetFactoryImpl diff --git a/fr.n7.petriNet/src/petrinet/impl/PetrinetPackageImpl.java b/fr.n7.petriNet/src/petrinet/impl/PetrinetPackageImpl.java new file mode 100644 index 0000000..3e95e54 --- /dev/null +++ b/fr.n7.petriNet/src/petrinet/impl/PetrinetPackageImpl.java @@ -0,0 +1,341 @@ +/** + */ +package petrinet.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import petrinet.Arc; +import petrinet.Noeud; +import petrinet.PetrinetFactory; +import petrinet.PetrinetPackage; +import petrinet.Place; +import petrinet.Reseau; +import petrinet.Transition; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class PetrinetPackageImpl extends EPackageImpl implements PetrinetPackage { + /** + * + * + * @generated + */ + private EClass placeEClass = null; + + /** + * + * + * @generated + */ + private EClass transitionEClass = null; + + /** + * + * + * @generated + */ + private EClass arcEClass = null; + + /** + * + * + * @generated + */ + private EClass noeudEClass = null; + + /** + * + * + * @generated + */ + private EClass reseauEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see petrinet.PetrinetPackage#eNS_URI + * @see #init() + * @generated + */ + private PetrinetPackageImpl() { + super(eNS_URI, PetrinetFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link PetrinetPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static PetrinetPackage init() { + if (isInited) return (PetrinetPackage)EPackage.Registry.INSTANCE.getEPackage(PetrinetPackage.eNS_URI); + + // Obtain or create and register package + Object registeredPetrinetPackage = EPackage.Registry.INSTANCE.get(eNS_URI); + PetrinetPackageImpl thePetrinetPackage = registeredPetrinetPackage instanceof PetrinetPackageImpl ? (PetrinetPackageImpl)registeredPetrinetPackage : new PetrinetPackageImpl(); + + isInited = true; + + // Create package meta-data objects + thePetrinetPackage.createPackageContents(); + + // Initialize created meta-data + thePetrinetPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + thePetrinetPackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(PetrinetPackage.eNS_URI, thePetrinetPackage); + return thePetrinetPackage; + } + + /** + * + * + * @generated + */ + public EClass getPlace() { + return placeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getPlace_Jetons() { + return (EAttribute)placeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getTransition() { + return transitionEClass; + } + + /** + * + * + * @generated + */ + public EReference getTransition_Arcs() { + return (EReference)transitionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getArc() { + return arcEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getArc_Poids() { + return (EAttribute)arcEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getArc_Sortant() { + return (EAttribute)arcEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getArc_Cible() { + return (EReference)arcEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getNoeud() { + return noeudEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getNoeud_Name() { + return (EAttribute)noeudEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getReseau() { + return reseauEClass; + } + + /** + * + * + * @generated + */ + public EReference getReseau_Noeuds() { + return (EReference)reseauEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getReseau_Name() { + return (EAttribute)reseauEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public PetrinetFactory getPetrinetFactory() { + return (PetrinetFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + placeEClass = createEClass(PLACE); + createEAttribute(placeEClass, PLACE__JETONS); + + transitionEClass = createEClass(TRANSITION); + createEReference(transitionEClass, TRANSITION__ARCS); + + arcEClass = createEClass(ARC); + createEAttribute(arcEClass, ARC__POIDS); + createEAttribute(arcEClass, ARC__SORTANT); + createEReference(arcEClass, ARC__CIBLE); + + noeudEClass = createEClass(NOEUD); + createEAttribute(noeudEClass, NOEUD__NAME); + + reseauEClass = createEClass(RESEAU); + createEReference(reseauEClass, RESEAU__NOEUDS); + createEAttribute(reseauEClass, RESEAU__NAME); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + placeEClass.getESuperTypes().add(this.getNoeud()); + transitionEClass.getESuperTypes().add(this.getNoeud()); + + // Initialize classes, features, and operations; add parameters + initEClass(placeEClass, Place.class, "Place", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getPlace_Jetons(), ecorePackage.getEInt(), "jetons", null, 1, 1, Place.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(transitionEClass, Transition.class, "Transition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getTransition_Arcs(), this.getArc(), null, "arcs", null, 0, -1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(arcEClass, Arc.class, "Arc", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getArc_Poids(), ecorePackage.getEInt(), "poids", null, 1, 1, Arc.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getArc_Sortant(), ecorePackage.getEBoolean(), "sortant", null, 1, 1, Arc.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getArc_Cible(), this.getPlace(), null, "cible", null, 1, 1, Arc.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(noeudEClass, Noeud.class, "Noeud", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getNoeud_Name(), ecorePackage.getEString(), "name", null, 1, 1, Noeud.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(reseauEClass, Reseau.class, "Reseau", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getReseau_Noeuds(), this.getNoeud(), null, "noeuds", null, 0, -1, Reseau.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getReseau_Name(), ecorePackage.getEString(), "name", null, 1, 1, Reseau.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //PetrinetPackageImpl diff --git a/fr.n7.petriNet/src/petrinet/impl/PlaceImpl.java b/fr.n7.petriNet/src/petrinet/impl/PlaceImpl.java new file mode 100644 index 0000000..c7476d1 --- /dev/null +++ b/fr.n7.petriNet/src/petrinet/impl/PlaceImpl.java @@ -0,0 +1,162 @@ +/** + */ +package petrinet.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import petrinet.PetrinetPackage; +import petrinet.Place; + +/** + * + * An implementation of the model object 'Place'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link petrinet.impl.PlaceImpl#getJetons Jetons}
  • + *
+ * + * @generated + */ +public class PlaceImpl extends NoeudImpl implements Place { + /** + * The default value of the '{@link #getJetons() Jetons}' attribute. + * + * + * @see #getJetons() + * @generated + * @ordered + */ + protected static final int JETONS_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getJetons() Jetons}' attribute. + * + * + * @see #getJetons() + * @generated + * @ordered + */ + protected int jetons = JETONS_EDEFAULT; + + /** + * + * + * @generated + */ + protected PlaceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PetrinetPackage.Literals.PLACE; + } + + /** + * + * + * @generated + */ + public int getJetons() { + return jetons; + } + + /** + * + * + * @generated + */ + public void setJetons(int newJetons) { + int oldJetons = jetons; + jetons = newJetons; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PetrinetPackage.PLACE__JETONS, oldJetons, jetons)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PetrinetPackage.PLACE__JETONS: + return getJetons(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PetrinetPackage.PLACE__JETONS: + setJetons((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PetrinetPackage.PLACE__JETONS: + setJetons(JETONS_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PetrinetPackage.PLACE__JETONS: + return jetons != JETONS_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (jetons: "); + result.append(jetons); + result.append(')'); + return result.toString(); + } + +} //PlaceImpl diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/6b/405408339822001c17faa9b6b0561c0f b/fr.n7.petriNet/src/petrinet/impl/ReseauImpl.java similarity index 66% rename from .metadata/.plugins/org.eclipse.core.resources/.history/6b/405408339822001c17faa9b6b0561c0f rename to fr.n7.petriNet/src/petrinet/impl/ReseauImpl.java index a6908b3..8189967 100644 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/6b/405408339822001c17faa9b6b0561c0f +++ b/fr.n7.petriNet/src/petrinet/impl/ReseauImpl.java @@ -1,6 +1,6 @@ /** */ -package simplepdl.impl; +package petrinet.impl; import java.util.Collection; @@ -18,24 +18,35 @@ import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; -import simplepdl.ProcessElement; -import simplepdl.SimplepdlPackage; +import petrinet.Noeud; +import petrinet.PetrinetPackage; +import petrinet.Reseau; /** * - * An implementation of the model object 'Process'. + * An implementation of the model object 'Reseau'. * *

* The following features are implemented: *

*
    - *
  • {@link simplepdl.impl.ProcessImpl#getName Name}
  • - *
  • {@link simplepdl.impl.ProcessImpl#getProcessElements Process Elements}
  • + *
  • {@link petrinet.impl.ReseauImpl#getNoeuds Noeuds}
  • + *
  • {@link petrinet.impl.ReseauImpl#getName Name}
  • *
* * @generated */ -public class ProcessImpl extends MinimalEObjectImpl.Container implements simplepdl.Process { +public class ReseauImpl extends MinimalEObjectImpl.Container implements Reseau { + /** + * The cached value of the '{@link #getNoeuds() Noeuds}' containment reference list. + * + * + * @see #getNoeuds() + * @generated + * @ordered + */ + protected EList noeuds; + /** * The default value of the '{@link #getName() Name}' attribute. * @@ -56,22 +67,12 @@ public class ProcessImpl extends MinimalEObjectImpl.Container implements simplep */ protected String name = NAME_EDEFAULT; - /** - * The cached value of the '{@link #getProcessElements() Process Elements}' containment reference list. - * - * - * @see #getProcessElements() - * @generated - * @ordered - */ - protected EList processElements; - /** * * * @generated */ - protected ProcessImpl() { + protected ReseauImpl() { super(); } @@ -82,7 +83,19 @@ public class ProcessImpl extends MinimalEObjectImpl.Container implements simplep */ @Override protected EClass eStaticClass() { - return SimplepdlPackage.Literals.PROCESS; + return PetrinetPackage.Literals.RESEAU; + } + + /** + * + * + * @generated + */ + public EList getNoeuds() { + if (noeuds == null) { + noeuds = new EObjectContainmentEList(Noeud.class, this, PetrinetPackage.RESEAU__NOEUDS); + } + return noeuds; } /** @@ -103,19 +116,7 @@ public class ProcessImpl extends MinimalEObjectImpl.Container implements simplep String oldName = name; name = newName; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.PROCESS__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public EList getProcessElements() { - if (processElements == null) { - processElements = new EObjectContainmentEList(ProcessElement.class, this, SimplepdlPackage.PROCESS__PROCESS_ELEMENTS); - } - return processElements; + eNotify(new ENotificationImpl(this, Notification.SET, PetrinetPackage.RESEAU__NAME, oldName, name)); } /** @@ -126,8 +127,8 @@ public class ProcessImpl extends MinimalEObjectImpl.Container implements simplep @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { - case SimplepdlPackage.PROCESS__PROCESS_ELEMENTS: - return ((InternalEList)getProcessElements()).basicRemove(otherEnd, msgs); + case PetrinetPackage.RESEAU__NOEUDS: + return ((InternalEList)getNoeuds()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } @@ -140,10 +141,10 @@ public class ProcessImpl extends MinimalEObjectImpl.Container implements simplep @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case SimplepdlPackage.PROCESS__NAME: + case PetrinetPackage.RESEAU__NOEUDS: + return getNoeuds(); + case PetrinetPackage.RESEAU__NAME: return getName(); - case SimplepdlPackage.PROCESS__PROCESS_ELEMENTS: - return getProcessElements(); } return super.eGet(featureID, resolve, coreType); } @@ -157,12 +158,12 @@ public class ProcessImpl extends MinimalEObjectImpl.Container implements simplep @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case SimplepdlPackage.PROCESS__NAME: - setName((String)newValue); + case PetrinetPackage.RESEAU__NOEUDS: + getNoeuds().clear(); + getNoeuds().addAll((Collection)newValue); return; - case SimplepdlPackage.PROCESS__PROCESS_ELEMENTS: - getProcessElements().clear(); - getProcessElements().addAll((Collection)newValue); + case PetrinetPackage.RESEAU__NAME: + setName((String)newValue); return; } super.eSet(featureID, newValue); @@ -176,11 +177,11 @@ public class ProcessImpl extends MinimalEObjectImpl.Container implements simplep @Override public void eUnset(int featureID) { switch (featureID) { - case SimplepdlPackage.PROCESS__NAME: - setName(NAME_EDEFAULT); + case PetrinetPackage.RESEAU__NOEUDS: + getNoeuds().clear(); return; - case SimplepdlPackage.PROCESS__PROCESS_ELEMENTS: - getProcessElements().clear(); + case PetrinetPackage.RESEAU__NAME: + setName(NAME_EDEFAULT); return; } super.eUnset(featureID); @@ -194,10 +195,10 @@ public class ProcessImpl extends MinimalEObjectImpl.Container implements simplep @Override public boolean eIsSet(int featureID) { switch (featureID) { - case SimplepdlPackage.PROCESS__NAME: + case PetrinetPackage.RESEAU__NOEUDS: + return noeuds != null && !noeuds.isEmpty(); + case PetrinetPackage.RESEAU__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case SimplepdlPackage.PROCESS__PROCESS_ELEMENTS: - return processElements != null && !processElements.isEmpty(); } return super.eIsSet(featureID); } @@ -218,4 +219,4 @@ public class ProcessImpl extends MinimalEObjectImpl.Container implements simplep return result.toString(); } -} //ProcessImpl +} //ReseauImpl diff --git a/fr.n7.petriNet/src/petrinet/impl/TransitionImpl.java b/fr.n7.petriNet/src/petrinet/impl/TransitionImpl.java new file mode 100644 index 0000000..6e05f14 --- /dev/null +++ b/fr.n7.petriNet/src/petrinet/impl/TransitionImpl.java @@ -0,0 +1,150 @@ +/** + */ +package petrinet.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import petrinet.Arc; +import petrinet.PetrinetPackage; +import petrinet.Transition; + +/** + * + * An implementation of the model object 'Transition'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link petrinet.impl.TransitionImpl#getArcs Arcs}
  • + *
+ * + * @generated + */ +public class TransitionImpl extends NoeudImpl implements Transition { + /** + * The cached value of the '{@link #getArcs() Arcs}' containment reference list. + * + * + * @see #getArcs() + * @generated + * @ordered + */ + protected EList arcs; + + /** + * + * + * @generated + */ + protected TransitionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PetrinetPackage.Literals.TRANSITION; + } + + /** + * + * + * @generated + */ + public EList getArcs() { + if (arcs == null) { + arcs = new EObjectContainmentEList(Arc.class, this, PetrinetPackage.TRANSITION__ARCS); + } + return arcs; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PetrinetPackage.TRANSITION__ARCS: + return ((InternalEList)getArcs()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PetrinetPackage.TRANSITION__ARCS: + return getArcs(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PetrinetPackage.TRANSITION__ARCS: + getArcs().clear(); + getArcs().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PetrinetPackage.TRANSITION__ARCS: + getArcs().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PetrinetPackage.TRANSITION__ARCS: + return arcs != null && !arcs.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //TransitionImpl diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ee/30e62e2b9822001c17faa9b6b0561c0f b/fr.n7.petriNet/src/petrinet/util/PetrinetAdapterFactory.java similarity index 65% rename from .metadata/.plugins/org.eclipse.core.resources/.history/ee/30e62e2b9822001c17faa9b6b0561c0f rename to fr.n7.petriNet/src/petrinet/util/PetrinetAdapterFactory.java index 3a354ce..0ac27f2 100644 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ee/30e62e2b9822001c17faa9b6b0561c0f +++ b/fr.n7.petriNet/src/petrinet/util/PetrinetAdapterFactory.java @@ -1,6 +1,6 @@ /** */ -package simplepdl.util; +package petrinet.util; import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier; @@ -9,28 +9,24 @@ import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; import org.eclipse.emf.ecore.EObject; -import simplepdl.Guidance; -import simplepdl.ProcessElement; -import simplepdl.SimplepdlPackage; -import simplepdl.WorkDefinition; -import simplepdl.WorkSequence; +import petrinet.*; /** * * The Adapter Factory for the model. * It provides an adapter createXXX method for each class of the model. * - * @see simplepdl.SimplepdlPackage + * @see petrinet.PetrinetPackage * @generated */ -public class SimplepdlAdapterFactory extends AdapterFactoryImpl { +public class PetrinetAdapterFactory extends AdapterFactoryImpl { /** * The cached model package. * * * @generated */ - protected static SimplepdlPackage modelPackage; + protected static PetrinetPackage modelPackage; /** * Creates an instance of the adapter factory. @@ -38,9 +34,9 @@ public class SimplepdlAdapterFactory extends AdapterFactoryImpl { * * @generated */ - public SimplepdlAdapterFactory() { + public PetrinetAdapterFactory() { if (modelPackage == null) { - modelPackage = SimplepdlPackage.eINSTANCE; + modelPackage = PetrinetPackage.eINSTANCE; } } @@ -69,27 +65,27 @@ public class SimplepdlAdapterFactory extends AdapterFactoryImpl { * * @generated */ - protected SimplepdlSwitch modelSwitch = - new SimplepdlSwitch() { + protected PetrinetSwitch modelSwitch = + new PetrinetSwitch() { @Override - public Adapter caseProcessElement(ProcessElement object) { - return createProcessElementAdapter(); + public Adapter casePlace(Place object) { + return createPlaceAdapter(); } @Override - public Adapter caseWorkDefinition(WorkDefinition object) { - return createWorkDefinitionAdapter(); + public Adapter caseTransition(Transition object) { + return createTransitionAdapter(); } @Override - public Adapter caseWorkSequence(WorkSequence object) { - return createWorkSequenceAdapter(); + public Adapter caseArc(Arc object) { + return createArcAdapter(); } @Override - public Adapter caseGuidance(Guidance object) { - return createGuidanceAdapter(); + public Adapter caseNoeud(Noeud object) { + return createNoeudAdapter(); } @Override - public Adapter caseProcess(simplepdl.Process object) { - return createProcessAdapter(); + public Adapter caseReseau(Reseau object) { + return createReseauAdapter(); } @Override public Adapter defaultCase(EObject object) { @@ -112,72 +108,72 @@ public class SimplepdlAdapterFactory extends AdapterFactoryImpl { /** - * Creates a new adapter for an object of class '{@link simplepdl.ProcessElement Process Element}'. + * Creates a new adapter for an object of class '{@link petrinet.Place Place}'. * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * * @return the new adapter. - * @see simplepdl.ProcessElement + * @see petrinet.Place * @generated */ - public Adapter createProcessElementAdapter() { + public Adapter createPlaceAdapter() { return null; } /** - * Creates a new adapter for an object of class '{@link simplepdl.WorkDefinition Work Definition}'. + * Creates a new adapter for an object of class '{@link petrinet.Transition Transition}'. * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * * @return the new adapter. - * @see simplepdl.WorkDefinition + * @see petrinet.Transition * @generated */ - public Adapter createWorkDefinitionAdapter() { + public Adapter createTransitionAdapter() { return null; } /** - * Creates a new adapter for an object of class '{@link simplepdl.WorkSequence Work Sequence}'. + * Creates a new adapter for an object of class '{@link petrinet.Arc Arc}'. * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * * @return the new adapter. - * @see simplepdl.WorkSequence + * @see petrinet.Arc * @generated */ - public Adapter createWorkSequenceAdapter() { + public Adapter createArcAdapter() { return null; } /** - * Creates a new adapter for an object of class '{@link simplepdl.Guidance Guidance}'. + * Creates a new adapter for an object of class '{@link petrinet.Noeud Noeud}'. * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * * @return the new adapter. - * @see simplepdl.Guidance + * @see petrinet.Noeud * @generated */ - public Adapter createGuidanceAdapter() { + public Adapter createNoeudAdapter() { return null; } /** - * Creates a new adapter for an object of class '{@link simplepdl.Process Process}'. + * Creates a new adapter for an object of class '{@link petrinet.Reseau Reseau}'. * * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * * @return the new adapter. - * @see simplepdl.Process + * @see petrinet.Reseau * @generated */ - public Adapter createProcessAdapter() { + public Adapter createReseauAdapter() { return null; } @@ -193,4 +189,4 @@ public class SimplepdlAdapterFactory extends AdapterFactoryImpl { return null; } -} //SimplepdlAdapterFactory +} //PetrinetAdapterFactory diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/9e/5070252b9822001c17faa9b6b0561c0f b/fr.n7.petriNet/src/petrinet/util/PetrinetSwitch.java similarity index 71% rename from .metadata/.plugins/org.eclipse.core.resources/.history/9e/5070252b9822001c17faa9b6b0561c0f rename to fr.n7.petriNet/src/petrinet/util/PetrinetSwitch.java index 37e6016..33600e7 100644 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/9e/5070252b9822001c17faa9b6b0561c0f +++ b/fr.n7.petriNet/src/petrinet/util/PetrinetSwitch.java @@ -1,17 +1,13 @@ /** */ -package simplepdl.util; +package petrinet.util; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.util.Switch; -import simplepdl.Guidance; -import simplepdl.ProcessElement; -import simplepdl.SimplepdlPackage; -import simplepdl.WorkDefinition; -import simplepdl.WorkSequence; +import petrinet.*; /** * @@ -23,17 +19,17 @@ import simplepdl.WorkSequence; * until a non-null result is returned, * which is the result of the switch. * - * @see simplepdl.SimplepdlPackage + * @see petrinet.PetrinetPackage * @generated */ -public class SimplepdlSwitch extends Switch { +public class PetrinetSwitch extends Switch { /** * The cached model package * * * @generated */ - protected static SimplepdlPackage modelPackage; + protected static PetrinetPackage modelPackage; /** * Creates an instance of the switch. @@ -41,9 +37,9 @@ public class SimplepdlSwitch extends Switch { * * @generated */ - public SimplepdlSwitch() { + public PetrinetSwitch() { if (modelPackage == null) { - modelPackage = SimplepdlPackage.eINSTANCE; + modelPackage = PetrinetPackage.eINSTANCE; } } @@ -70,36 +66,35 @@ public class SimplepdlSwitch extends Switch { @Override protected T doSwitch(int classifierID, EObject theEObject) { switch (classifierID) { - case SimplepdlPackage.PROCESS_ELEMENT: { - ProcessElement processElement = (ProcessElement)theEObject; - T result = caseProcessElement(processElement); + case PetrinetPackage.PLACE: { + Place place = (Place)theEObject; + T result = casePlace(place); + if (result == null) result = caseNoeud(place); if (result == null) result = defaultCase(theEObject); return result; } - case SimplepdlPackage.WORK_DEFINITION: { - WorkDefinition workDefinition = (WorkDefinition)theEObject; - T result = caseWorkDefinition(workDefinition); - if (result == null) result = caseProcessElement(workDefinition); + case PetrinetPackage.TRANSITION: { + Transition transition = (Transition)theEObject; + T result = caseTransition(transition); + if (result == null) result = caseNoeud(transition); if (result == null) result = defaultCase(theEObject); return result; } - case SimplepdlPackage.WORK_SEQUENCE: { - WorkSequence workSequence = (WorkSequence)theEObject; - T result = caseWorkSequence(workSequence); - if (result == null) result = caseProcessElement(workSequence); + case PetrinetPackage.ARC: { + Arc arc = (Arc)theEObject; + T result = caseArc(arc); if (result == null) result = defaultCase(theEObject); return result; } - case SimplepdlPackage.GUIDANCE: { - Guidance guidance = (Guidance)theEObject; - T result = caseGuidance(guidance); - if (result == null) result = caseProcessElement(guidance); + case PetrinetPackage.NOEUD: { + Noeud noeud = (Noeud)theEObject; + T result = caseNoeud(noeud); if (result == null) result = defaultCase(theEObject); return result; } - case SimplepdlPackage.PROCESS: { - simplepdl.Process process = (simplepdl.Process)theEObject; - T result = caseProcess(process); + case PetrinetPackage.RESEAU: { + Reseau reseau = (Reseau)theEObject; + T result = caseReseau(reseau); if (result == null) result = defaultCase(theEObject); return result; } @@ -108,77 +103,77 @@ public class SimplepdlSwitch extends Switch { } /** - * Returns the result of interpreting the object as an instance of 'Process Element'. + * Returns the result of interpreting the object as an instance of 'Place'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Process Element'. + * @return the result of interpreting the object as an instance of 'Place'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseProcessElement(ProcessElement object) { + public T casePlace(Place object) { return null; } /** - * Returns the result of interpreting the object as an instance of 'Work Definition'. + * Returns the result of interpreting the object as an instance of 'Transition'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Work Definition'. + * @return the result of interpreting the object as an instance of 'Transition'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseWorkDefinition(WorkDefinition object) { + public T caseTransition(Transition object) { return null; } /** - * Returns the result of interpreting the object as an instance of 'Work Sequence'. + * Returns the result of interpreting the object as an instance of 'Arc'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Work Sequence'. + * @return the result of interpreting the object as an instance of 'Arc'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseWorkSequence(WorkSequence object) { + public T caseArc(Arc object) { return null; } /** - * Returns the result of interpreting the object as an instance of 'Guidance'. + * Returns the result of interpreting the object as an instance of 'Noeud'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Guidance'. + * @return the result of interpreting the object as an instance of 'Noeud'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseGuidance(Guidance object) { + public T caseNoeud(Noeud object) { return null; } /** - * Returns the result of interpreting the object as an instance of 'Process'. + * Returns the result of interpreting the object as an instance of 'Reseau'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Process'. + * @return the result of interpreting the object as an instance of 'Reseau'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseProcess(simplepdl.Process object) { + public T caseReseau(Reseau object) { return null; } @@ -198,4 +193,4 @@ public class SimplepdlSwitch extends Switch { return null; } -} //SimplepdlSwitch +} //PetrinetSwitch diff --git a/fr.n7.simplePDL.samples/developpement.xmi b/fr.n7.simplePDL.samples/developpement.xmi new file mode 100644 index 0000000..a51fd4b --- /dev/null +++ b/fr.n7.simplePDL.samples/developpement.xmi @@ -0,0 +1,49 @@ + + + + + + + + + + + + diff --git a/fr.n7.simplePDL.samples/representations.aird b/fr.n7.simplePDL.samples/representations.aird index 53f300f..730d2cd 100644 --- a/fr.n7.simplePDL.samples/representations.aird +++ b/fr.n7.simplePDL.samples/representations.aird @@ -2,6 +2,7 @@ developpement.simplepdl + developpement.xmi diff --git a/fr.n7.simplePDL/process1-ko.xmi b/fr.n7.simplePDL/Process-ko.xmi similarity index 81% rename from fr.n7.simplePDL/process1-ko.xmi rename to fr.n7.simplePDL/Process-ko.xmi index 7b75b5a..7399f30 100644 --- a/fr.n7.simplePDL/process1-ko.xmi +++ b/fr.n7.simplePDL/Process-ko.xmi @@ -4,29 +4,28 @@ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:simplepdl="http://simplepdl" - xsi:schemaLocation="http://simplepdl SimplePDL.ecore" - name="ExempleProcess1"> + name="Exemple foireux"> + + + - - - diff --git a/fr.n7.simplePDL/Process.xmi b/fr.n7.simplePDL/Process.xmi new file mode 100644 index 0000000..2a1b973 --- /dev/null +++ b/fr.n7.simplePDL/Process.xmi @@ -0,0 +1,48 @@ + + + + + + + + + + + + diff --git a/fr.n7.simplePDL/SimplePDL.ocl b/fr.n7.simplePDL/SimplePDL.ocl index 2db1ed8..22c784a 100644 --- a/fr.n7.simplePDL/SimplePDL.ocl +++ b/fr.n7.simplePDL/SimplePDL.ocl @@ -20,9 +20,8 @@ def: process(): Process = context WorkSequence inv successorAndPredecessorInSameProcess('Activities not in the same process : ' + self.predecessor.name + ' in ' + self.predecessor.process().name+ ' and ' - + self.successor.name + ' in ' + self.successor.process().name -): + + self.successor.name + ' in ' + self.successor.process().name): self.process() = self.successor.process() and self.process() = self.predecessor.process() -endpackage \ No newline at end of file +endpackage diff --git a/fr.n7.simplePDL/models/SimplePDLCreator_Created_Process.xmi b/fr.n7.simplePDL/models/SimplePDLCreator_Created_Process.xmi index e77e0c4..a79bd87 100644 --- a/fr.n7.simplePDL/models/SimplePDLCreator_Created_Process.xmi +++ b/fr.n7.simplePDL/models/SimplePDLCreator_Created_Process.xmi @@ -1,7 +1,7 @@ - - + + diff --git a/fr.n7.simplePDL/nouveau.ocl b/fr.n7.simplePDL/nouveau.ocl index 24a0088..46d5b49 100644 --- a/fr.n7.simplePDL/nouveau.ocl +++ b/fr.n7.simplePDL/nouveau.ocl @@ -22,5 +22,5 @@ inv weirdName: self.processElements ->select(pe | pe.oclIsKindOf(WorkDefinition)) ->collect(pe | pe.oclAsType(WorkDefinition)) ->forAll(w | not w.name.matches('([0-9]*|[a-zA-Z]*|_*)')) - -endpackage + +endpackage \ No newline at end of file diff --git a/fr.n7.simplePDL/src/simplepdl/manip/SimplePDLCreator.java b/fr.n7.simplePDL/src/simplepdl/manip/SimplePDLCreator.java new file mode 100644 index 0000000..a81782f --- /dev/null +++ b/fr.n7.simplePDL/src/simplepdl/manip/SimplePDLCreator.java @@ -0,0 +1,85 @@ +package simplepdl.manip; + +import java.io.IOException; +import java.util.Collections; +import java.util.Map; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; + +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlFactory; +import simplepdl.SimplepdlPackage; + +public class SimplePDLCreator { + + public static void main(String[] args) { + + // Charger le package SimplePDL afin de l'enregistrer dans le registre d'Eclipse. + SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE; + + // Enregistrer l'extension ".xmi" comme devant être ouverte à  + // l'aide d'un objet "XMIResourceFactoryImpl" + Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE; + Map m = reg.getExtensionToFactoryMap(); + m.put("xmi", new XMIResourceFactoryImpl()); + + // Créer un objet resourceSetImpl qui contiendra une ressource EMF (le modèle) + ResourceSet resSet = new ResourceSetImpl(); + + // Définir la ressource (le modèle) + URI modelURI = URI.createURI("models/SimplePDLCreator_Created_Process.xmi"); + Resource resource = resSet.createResource(modelURI); + + // La fabrique pour fabriquer les éléments de SimplePDL + SimplepdlFactory myFactory = SimplepdlFactory.eINSTANCE; + + // Créer un élément Process + Process process = myFactory.createProcess(); + process.setName("Mon premier processus"); + + // Ajouter le Process dans le modèle + resource.getContents().add(process); + + // Ajouter deux WorkDefinitions + WorkDefinition wd1 = myFactory.createWorkDefinition(); + wd1.setName("Ma première WorkDefinition, quelle émotion"); + + WorkDefinition wd2 = myFactory.createWorkDefinition(); + wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); + + process.getProcessElements().add(wd1); + process.getProcessElements().add(wd2); + + // Ajouter une WorkSequence entre les deux WorkDefinitions + WorkSequence seq = myFactory.createWorkSequence(); + seq.setPredecessor(wd1); + seq.setSuccessor(wd2); + seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); + + process.getProcessElements().add(seq); + + // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions + WorkSequence seq2 = myFactory.createWorkSequence(); + seq2.setPredecessor(wd1); + seq2.setSuccessor(wd2); + seq2.setLinkType(WorkSequenceType.START_TO_START); + + process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/fr.n7.simplePDL/src/simplepdl/manip/SimplePDLManipulator.java b/fr.n7.simplePDL/src/simplepdl/manip/SimplePDLManipulator.java new file mode 100644 index 0000000..61131d8 --- /dev/null +++ b/fr.n7.simplePDL/src/simplepdl/manip/SimplePDLManipulator.java @@ -0,0 +1,62 @@ +package simplepdl.manip; + +import java.util.Collections; +import java.util.Map; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; + +import simplepdl.Process; +import simplepdl.SimplepdlFactory; +import simplepdl.SimplepdlPackage; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; + +public class SimplePDLManipulator { + + public static void main(String[] args) { + + // Chargement du package SimplePDL afin de l'enregistrer dans le registre d'Eclipse. + SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE; + + // Enregistrer l'extension ".xmi" comme devant être ouverte à + // l'aide d'un objet "XMIResourceFactoryImpl" + Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE; + Map m = reg.getExtensionToFactoryMap(); + m.put("xmi", new XMIResourceFactoryImpl()); + + // Créer un objet resourceSetImpl qui contiendra une ressource EMF (notre modèle) + ResourceSet resSet = new ResourceSetImpl(); + + // Charger la ressource (notre modèle) + URI modelURI = URI.createURI("models/SimplePDLCreator_Created_Process.xmi"); + Resource resource = resSet.getResource(modelURI, true); + + // Récupérer le premier élément du modèle (élément racine) + Process process = (Process) resource.getContents().get(0); + + /** + * Manipulation de notre instance + */ + // Accéder aux informations du processus chargé + System.out.println("Processus : " + process.getName()); + // Naviguer dans les références + Integer nbPE = process.getProcessElements().size(); + System.out.println("Nombre de ProcessElement dans " + process.getName() + " : " + nbPE); + + // Afficher les sous-activités + System.out.println("Les sous-activités sont :"); + for (Object o : process.getProcessElements()) { + if (o instanceof WorkDefinition) { + WorkDefinition wd = (WorkDefinition) o; + System.out.println(" - " + wd.getName()); + } + } + + } + +}