diff --git a/eclipse-workspace/.metadata/.log b/eclipse-workspace/.metadata/.log index c5e54ec..ff7cf1a 100644 --- a/eclipse-workspace/.metadata/.log +++ b/eclipse-workspace/.metadata/.log @@ -31,3 +31,43 @@ 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-10 00:17:29.406 ----------------------------------------------- +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.emf.cdo.explorer 4 0 2021-10-10 00:27:51.311 +!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/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/11/809ec3bbbd29001c1427db6275755878 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/11/809ec3bbbd29001c1427db6275755878 new file mode 100644 index 0000000..c49bf0b --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/11/809ec3bbbd29001c1427db6275755878 @@ -0,0 +1,187 @@ +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 petrinet.PetrinetPackage; +import petrinet.Place; +import petrinet.Transition; +import petrinet.Arc; +import petrinet.Network; +import petrinet.Node; +import petrinet.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlPackage; + +public class simplepdl2petrinet { + + public static void main(String[] args) { + + // Charger les package SimplePDL et Petrinet afin de les enregistrer dans le registre d'Eclipse. + SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE; + PetrinetPackage packageInstance2 = PetrinetPackage.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(); + + // Charger la ressource (notre modèle) + URI modelURI = URI.createURI("pdl-sujet.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); + + // La fabrique pour fabriquer les éléments de PetriNET + PetrinetFactory myFactory = PetrinetFactory.eINSTANCE; + + // Créer un élément Network + Network network = myFactory.createNetwork(); + network.setName(process.getName()); + + // Conversion des WorkDefinition en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkDefinition) { + WorkDefinition wd = (WorkDefinition) o; + String name = wd.getName(); + + Place idle = myFactory.createPlace(); + idle.setName(name + "_idle"); + idle.setTokens(1); + Place started = myFactory.createPlace(); + started.setName(name + "_started"); + started.setTokens(0); + Place running = myFactory.createPlace(); + running.setName(name + "_running"); + running.setTokens(0); + Place finished = myFactory.createPlace(); + finished.setName(name + "_finished"); + finished.setTokens(0); + + Arc pause2start = myFactory.createArc(); + pause2start.setTarget(idle); + pause2start.setOutgoing(false); + pause2start.setWeight(1); + Arc start2running = myFactory.createArc(); + start2running.setTarget(running); + start2running.setOutgoing(true); + start2running.setWeight(1); + Arc start2started = myFactory.createArc(); + start2started.setTarget(started); + start2started.setOutgoing(true); + start2started.setWeight(1); + Transition start = myFactory.createTransition(); + start.setName(name + "_start"); + start.getArcs().add(pause2start); + start.getArcs().add(start2running); + start.getArcs().add(start2started); + + Arc running2finish = myFactory.createArc(); + running2finish.setTarget(running); + running2finish.setOutgoing(false); + running2finish.setWeight(1); + Arc finish2finished = myFactory.createArc(); + finish2finished.setTarget(finished); + finish2finished.setOutgoing(true); + finish2finished.setWeight(1); + Transition finish = myFactory.createTransition(); + finish.setName(name + "_finish"); + finish.getArcs().add(running2finish); + finish.getArcs().add(finish2finished); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(started); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Conversion des WorkSequence en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkSequence) { + WorkSequence ws = (WorkSequence) o; + WorkSequenceType type = ws.getLinkType(); + WorkDefinition predecessor = ws.getPredecessor(); + WorkDefinition successor = ws.getSuccessor(); + + Arc arc = myFactory.createArc(); + arc.setOutgoing(false); + + + String predecessor_suffix = new String(); + String successor_suffix = new String(); + switch (type) { + case START_TO_START: + predecessor_suffix = "_started"; + successor_suffix = "_start"; + break; + case START_TO_FINISH: + predecessor_suffix = "_started"; + successor_suffix = "_finished"; + break; + case FINISH_TO_START: + predecessor_suffix = "_finished"; + successor_suffix = "_start"; + break; + case FINISH_TO_FINISH: + predecessor_suffix = "_finished"; + successor_suffix = "_finish"; + break; + default: + System.out.print("the fuck ?"); + break; + } + + for (Node node : network.getNodes()) { + if (node instanceof Place) { + Place place = (Place) node; + if (place.getName().equals(predecessor.getName() + predecessor_suffix)) { + arc.setTarget(place); + } + } + if (node instanceof Transition) { + Transition transition = (Transition) node; + if (transition.getName().equals(successor.getName() + successor_suffix)) { + transition.getArcs().add(arc); + } + } + } + + + + } + } + + // Créer le nouveau xmi (modèle convertit) + URI convURI = URI.createURI("models/test.xmi"); + Resource conv = resSet.createResource(convURI); + + // Ajouter le Network dans le nouveau modèle + conv.getContents().add(network); + + // Sauver la ressource + try { + conv.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/26/90e19699be29001c1427db6275755878 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/26/90e19699be29001c1427db6275755878 new file mode 100644 index 0000000..18aba37 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/26/90e19699be29001c1427db6275755878 @@ -0,0 +1,193 @@ +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 petrinet.PetrinetPackage; +import petrinet.Place; +import petrinet.Transition; +import petrinet.Arc; +import petrinet.Network; +import petrinet.Node; +import petrinet.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlPackage; + +public class simplepdl2petrinet { + + public static void main(String[] args) { + + // Charger les package SimplePDL et Petrinet afin de les enregistrer dans le registre d'Eclipse. + SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE; + PetrinetPackage packageInstance2 = PetrinetPackage.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(); + + // Charger la ressource (notre modèle) + URI modelURI = URI.createURI("pdl-sujet.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); + + // La fabrique pour fabriquer les éléments de PetriNET + PetrinetFactory myFactory = PetrinetFactory.eINSTANCE; + + // Créer un élément Network + Network network = myFactory.createNetwork(); + network.setName(process.getName()); + + // Conversion des WorkDefinition en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkDefinition) { + WorkDefinition wd = (WorkDefinition) o; + String name = wd.getName(); + + Place idle = myFactory.createPlace(); + idle.setName(name + "_idle"); + idle.setTokens(1); + Place started = myFactory.createPlace(); + started.setName(name + "_started"); + started.setTokens(0); + Place running = myFactory.createPlace(); + running.setName(name + "_running"); + running.setTokens(0); + Place finished = myFactory.createPlace(); + finished.setName(name + "_finished"); + finished.setTokens(0); + + Arc pause2start = myFactory.createArc(); + pause2start.setTarget(idle); + pause2start.setOutgoing(false); + pause2start.setWeight(1); + Arc start2running = myFactory.createArc(); + start2running.setTarget(running); + start2running.setOutgoing(true); + start2running.setWeight(1); + Arc start2started = myFactory.createArc(); + start2started.setTarget(started); + start2started.setOutgoing(true); + start2started.setWeight(1); + Transition start = myFactory.createTransition(); + start.setName(name + "_start"); + start.getArcs().add(pause2start); + start.getArcs().add(start2running); + start.getArcs().add(start2started); + + Arc running2finish = myFactory.createArc(); + running2finish.setTarget(running); + running2finish.setOutgoing(false); + running2finish.setWeight(1); + Arc finish2finished = myFactory.createArc(); + finish2finished.setTarget(finished); + finish2finished.setOutgoing(true); + finish2finished.setWeight(1); + Transition finish = myFactory.createTransition(); + finish.setName(name + "_finish"); + finish.getArcs().add(running2finish); + finish.getArcs().add(finish2finished); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(started); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Conversion des WorkSequence en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkSequence) { + WorkSequence ws = (WorkSequence) o; + WorkSequenceType type = ws.getLinkType(); + WorkDefinition predecessor = ws.getPredecessor(); + WorkDefinition successor = ws.getSuccessor(); + + System.out.println(predecessor.getName()); + + // creation des suffixs permettant la recherche des noeuds + String predecessor_suffix = new String(); + String successor_suffix = new String(); + switch (type) { + case START_TO_START: + predecessor_suffix = "_started"; + successor_suffix = "_start"; + break; + case START_TO_FINISH: + predecessor_suffix = "_started"; + successor_suffix = "_finished"; + break; + case FINISH_TO_START: + predecessor_suffix = "_finished"; + successor_suffix = "_start"; + break; + case FINISH_TO_FINISH: + predecessor_suffix = "_finished"; + successor_suffix = "_finish"; + break; + default: + System.out.print("the fuck ?"); + break; + } + + // creation du read-arc + Arc arc1 = myFactory.createArc(); + arc1.setOutgoing(false); + arc1.setWeight(1); + Arc arc2 = myFactory.createArc(); + arc2.setOutgoing(true); + arc2.setWeight(1); + + for (Node node : network.getNodes()) { + if (node instanceof Place) { + Place place = (Place) node; + if (place.getName().equals(predecessor.getName() + predecessor_suffix)) { + arc1.setTarget(place); + arc2.setTarget(place); + } + } + if (node instanceof Transition) { + Transition transition = (Transition) node; + if (transition.getName().equals(successor.getName() + successor_suffix)) { + transition.getArcs().add(arc1); + transition.getArcs().add(arc2); + } + } + } + } + } + + // Créer le nouveau xmi (modèle convertit) + URI convURI = URI.createURI("models/Developpement_petrinet.xmi"); + Resource conv = resSet.createResource(convURI); + + // Ajouter le Network dans le nouveau modèle + conv.getContents().add(network); + + // Sauver la ressource + try { + conv.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2a/50ece4f9bd29001c1427db6275755878 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2a/50ece4f9bd29001c1427db6275755878 new file mode 100644 index 0000000..44728fb --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2a/50ece4f9bd29001c1427db6275755878 @@ -0,0 +1,194 @@ +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 petrinet.PetrinetPackage; +import petrinet.Place; +import petrinet.Transition; +import petrinet.Arc; +import petrinet.Network; +import petrinet.Node; +import petrinet.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlPackage; + +public class simplepdl2petrinet { + + public static void main(String[] args) { + + // Charger les package SimplePDL et Petrinet afin de les enregistrer dans le registre d'Eclipse. + SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE; + PetrinetPackage packageInstance2 = PetrinetPackage.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(); + + // Charger la ressource (notre modèle) + URI modelURI = URI.createURI("pdl-sujet.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); + + // La fabrique pour fabriquer les éléments de PetriNET + PetrinetFactory myFactory = PetrinetFactory.eINSTANCE; + + // Créer un élément Network + Network network = myFactory.createNetwork(); + network.setName(process.getName()); + + // Conversion des WorkDefinition en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkDefinition) { + WorkDefinition wd = (WorkDefinition) o; + String name = wd.getName(); + + Place idle = myFactory.createPlace(); + idle.setName(name + "_idle"); + idle.setTokens(1); + Place started = myFactory.createPlace(); + started.setName(name + "_started"); + started.setTokens(0); + Place running = myFactory.createPlace(); + running.setName(name + "_running"); + running.setTokens(0); + Place finished = myFactory.createPlace(); + finished.setName(name + "_finished"); + finished.setTokens(0); + + Arc pause2start = myFactory.createArc(); + pause2start.setTarget(idle); + pause2start.setOutgoing(false); + pause2start.setWeight(1); + Arc start2running = myFactory.createArc(); + start2running.setTarget(running); + start2running.setOutgoing(true); + start2running.setWeight(1); + Arc start2started = myFactory.createArc(); + start2started.setTarget(started); + start2started.setOutgoing(true); + start2started.setWeight(1); + Transition start = myFactory.createTransition(); + start.setName(name + "_start"); + start.getArcs().add(pause2start); + start.getArcs().add(start2running); + start.getArcs().add(start2started); + + Arc running2finish = myFactory.createArc(); + running2finish.setTarget(running); + running2finish.setOutgoing(false); + running2finish.setWeight(1); + Arc finish2finished = myFactory.createArc(); + finish2finished.setTarget(finished); + finish2finished.setOutgoing(true); + finish2finished.setWeight(1); + Transition finish = myFactory.createTransition(); + finish.setName(name + "_finish"); + finish.getArcs().add(running2finish); + finish.getArcs().add(finish2finished); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(started); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Conversion des WorkSequence en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkSequence) { + WorkSequence ws = (WorkSequence) o; + WorkSequenceType type = ws.getLinkType(); + WorkDefinition predecessor = ws.getPredecessor(); + WorkDefinition successor = ws.getSuccessor(); + + // creation des suffixs permettant la recherche des noeuds + String predecessor_suffix = new String(); + String successor_suffix = new String(); + switch (type) { + case START_TO_START: + predecessor_suffix = "_started"; + successor_suffix = "_start"; + break; + case START_TO_FINISH: + predecessor_suffix = "_started"; + successor_suffix = "_finished"; + break; + case FINISH_TO_START: + predecessor_suffix = "_finished"; + successor_suffix = "_start"; + break; + case FINISH_TO_FINISH: + predecessor_suffix = "_finished"; + successor_suffix = "_finish"; + break; + default: + System.out.print("the fuck ?"); + break; + } + + // creation du read-arc + Arc arc1 = myFactory.createArc(); + arc1.setOutgoing(false); + arc1.setWeight(1); + Arc arc2 = myFactory.createArc(); + arc2.setOutgoing(true); + arc2.setWeight(1); + + for (Node node : network.getNodes()) { + if (node instanceof Place) { + Place place = (Place) node; + if (place.getName().equals(predecessor.getName() + predecessor_suffix)) { + arc1.setTarget(place); + arc2.setTarget(place); + } + } + if (node instanceof Transition) { + Transition transition = (Transition) node; + if (transition.getName().equals(successor.getName() + successor_suffix)) { + transition.getArcs().add(arc1); + transition.getArcs().add(arc2); + } + } + } + + + + } + } + + // Créer le nouveau xmi (modèle convertit) + URI convURI = URI.createURI("models/test.xmi"); + Resource conv = resSet.createResource(convURI); + + // Ajouter le Network dans le nouveau modèle + conv.getContents().add(network); + + // Sauver la ressource + try { + conv.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2a/60a542a1bd29001c1427db6275755878 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2a/60a542a1bd29001c1427db6275755878 new file mode 100644 index 0000000..23e9b55 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2a/60a542a1bd29001c1427db6275755878 @@ -0,0 +1,130 @@ +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 petrinet.PetrinetPackage; +import petrinet.Place; +import petrinet.Transition; +import petrinet.Arc; +import petrinet.Network; +import petrinet.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlPackage; + +public class simplepdl2petrinet { + + public static void main(String[] args) { + + // Charger les package SimplePDL et Petrinet afin de les enregistrer dans le registre d'Eclipse. + SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE; + PetrinetPackage packageInstance2 = PetrinetPackage.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(); + + // Charger la ressource (notre modèle) + URI modelURI = URI.createURI("pdl-sujet.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); + + // La fabrique pour fabriquer les éléments de PetriNET + PetrinetFactory myFactory = PetrinetFactory.eINSTANCE; + + // Créer un élément Network + Network network = myFactory.createNetwork(); + network.setName(process.getName()); + + // Conversion des WorkDefinition en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkDefinition) { + WorkDefinition wd = (WorkDefinition) o; + String name = wd.getName(); + + Place idle = myFactory.createPlace(); + idle.setName(name + "_idle"); + idle.setTokens(1); + Place started = myFactory.createPlace(); + started.setName(name + "_started"); + started.setTokens(0); + Place running = myFactory.createPlace(); + running.setName(name + "_running"); + running.setTokens(0); + Place finished = myFactory.createPlace(); + finished.setName(name + "_finished"); + finished.setTokens(0); + + Arc pause2start = myFactory.createArc(); + pause2start.setTarget(idle); + pause2start.setOutgoing(false); + pause2start.setWeight(1); + Arc start2running = myFactory.createArc(); + start2running.setTarget(running); + start2running.setOutgoing(true); + start2running.setWeight(1); + Arc start2started = myFactory.createArc(); + start2started.setTarget(started); + start2started.setOutgoing(true); + start2started.setWeight(1); + Transition start = myFactory.createTransition(); + start.setName(name + "_start"); + start.getArcs().add(pause2start); + start.getArcs().add(start2running); + start.getArcs().add(start2started); + + Arc running2finish = myFactory.createArc(); + running2finish.setTarget(running); + running2finish.setOutgoing(false); + running2finish.setWeight(1); + Arc finish2finished = myFactory.createArc(); + finish2finished.setTarget(finished); + finish2finished.setOutgoing(true); + finish2finished.setWeight(1); + Transition finish = myFactory.createTransition(); + finish.setName(name + "_finish"); + finish.getArcs().add(running2finish); + finish.getArcs().add(finish2finished); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(started); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Créer le nouveau xmi (modèle convertit) + URI convURI = URI.createURI("models/test.xmi"); + Resource conv = resSet.createResource(convURI); + + // Ajouter le Network dans le nouveau modèle + conv.getContents().add(network); + + // Sauver la ressource + try { + conv.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/4/80d4e7f2bd29001c1427db6275755878 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/4/80d4e7f2bd29001c1427db6275755878 new file mode 100644 index 0000000..a982e1c --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/4/80d4e7f2bd29001c1427db6275755878 @@ -0,0 +1,192 @@ +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 petrinet.PetrinetPackage; +import petrinet.Place; +import petrinet.Transition; +import petrinet.Arc; +import petrinet.Network; +import petrinet.Node; +import petrinet.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlPackage; + +public class simplepdl2petrinet { + + public static void main(String[] args) { + + // Charger les package SimplePDL et Petrinet afin de les enregistrer dans le registre d'Eclipse. + SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE; + PetrinetPackage packageInstance2 = PetrinetPackage.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(); + + // Charger la ressource (notre modèle) + URI modelURI = URI.createURI("pdl-sujet.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); + + // La fabrique pour fabriquer les éléments de PetriNET + PetrinetFactory myFactory = PetrinetFactory.eINSTANCE; + + // Créer un élément Network + Network network = myFactory.createNetwork(); + network.setName(process.getName()); + + // Conversion des WorkDefinition en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkDefinition) { + WorkDefinition wd = (WorkDefinition) o; + String name = wd.getName(); + + Place idle = myFactory.createPlace(); + idle.setName(name + "_idle"); + idle.setTokens(1); + Place started = myFactory.createPlace(); + started.setName(name + "_started"); + started.setTokens(0); + Place running = myFactory.createPlace(); + running.setName(name + "_running"); + running.setTokens(0); + Place finished = myFactory.createPlace(); + finished.setName(name + "_finished"); + finished.setTokens(0); + + Arc pause2start = myFactory.createArc(); + pause2start.setTarget(idle); + pause2start.setOutgoing(false); + pause2start.setWeight(1); + Arc start2running = myFactory.createArc(); + start2running.setTarget(running); + start2running.setOutgoing(true); + start2running.setWeight(1); + Arc start2started = myFactory.createArc(); + start2started.setTarget(started); + start2started.setOutgoing(true); + start2started.setWeight(1); + Transition start = myFactory.createTransition(); + start.setName(name + "_start"); + start.getArcs().add(pause2start); + start.getArcs().add(start2running); + start.getArcs().add(start2started); + + Arc running2finish = myFactory.createArc(); + running2finish.setTarget(running); + running2finish.setOutgoing(false); + running2finish.setWeight(1); + Arc finish2finished = myFactory.createArc(); + finish2finished.setTarget(finished); + finish2finished.setOutgoing(true); + finish2finished.setWeight(1); + Transition finish = myFactory.createTransition(); + finish.setName(name + "_finish"); + finish.getArcs().add(running2finish); + finish.getArcs().add(finish2finished); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(started); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Conversion des WorkSequence en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkSequence) { + WorkSequence ws = (WorkSequence) o; + WorkSequenceType type = ws.getLinkType(); + WorkDefinition predecessor = ws.getPredecessor(); + WorkDefinition successor = ws.getSuccessor(); + + String predecessor_suffix = new String(); + String successor_suffix = new String(); + switch (type) { + case START_TO_START: + predecessor_suffix = "_started"; + successor_suffix = "_start"; + break; + case START_TO_FINISH: + predecessor_suffix = "_started"; + successor_suffix = "_finished"; + break; + case FINISH_TO_START: + predecessor_suffix = "_finished"; + successor_suffix = "_start"; + break; + case FINISH_TO_FINISH: + predecessor_suffix = "_finished"; + successor_suffix = "_finish"; + break; + default: + System.out.print("the fuck ?"); + break; + } + + Arc arc1 = myFactory.createArc(); + arc1.setOutgoing(false); + arc1.setWeight(1); + Arc arc2 = myFactory.createArc(); + arc2.setOutgoing(true); + arc2.setWeight(1); + + for (Node node : network.getNodes()) { + if (node instanceof Place) { + Place place = (Place) node; + if (place.getName().equals(predecessor.getName() + predecessor_suffix)) { + arc1.setTarget(place); + arc2.setTarget(place); + } + } + if (node instanceof Transition) { + Transition transition = (Transition) node; + if (transition.getName().equals(successor.getName() + successor_suffix)) { + transition.getArcs().add(arc1); + transition.getArcs().add(arc2); + } + } + } + + + + } + } + + // Créer le nouveau xmi (modèle convertit) + URI convURI = URI.createURI("models/test.xmi"); + Resource conv = resSet.createResource(convURI); + + // Ajouter le Network dans le nouveau modèle + conv.getContents().add(network); + + // Sauver la ressource + try { + conv.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/50/40ed6ef74f29001c15a7c9c2336a037e b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/50/40ed6ef74f29001c15a7c9c2336a037e new file mode 100644 index 0000000..d2d6215 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/50/40ed6ef74f29001c15a7c9c2336a037e @@ -0,0 +1,127 @@ +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 petrinet.PetrinetPackage; +import petrinet.Place; +import petrinet.Transition; +import petrinet.Arc; +import petrinet.Network; +import petrinet.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlPackage; + +public class simplepdl2petrinet { + + public static void main(String[] args) { + + // Charger les package SimplePDL et Petrinet afin de les enregistrer dans le registre d'Eclipse. + SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE; + PetrinetPackage packageInstance2 = PetrinetPackage.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(); + + // Charger la ressource (notre modèle) + URI modelURI = URI.createURI("pdl-sujet.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); + + // La fabrique pour fabriquer les éléments de PetriNET + PetrinetFactory myFactory = PetrinetFactory.eINSTANCE; + + // Créer un élément Network + Network network = myFactory.createNetwork(); + network.setName(process.getName()); + + // Conversion des WorkDefinition en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkDefinition) { + WorkDefinition wd = (WorkDefinition) o; + String name = wd.getName(); + System.out.println(" - " + name); + + Place idle = myFactory.createPlace(); + idle.setName(name + "_idle"); + idle.setTokens(1); + Place started = myFactory.createPlace(); + idle.setName(name + "_started"); + idle.setTokens(0); + Place running = myFactory.createPlace(); + running.setName(name + "_running"); + running.setTokens(0); + Place finished = myFactory.createPlace(); + finished.setName(name + "_finished"); + finished.setTokens(0); + + Arc pause2start = myFactory.createArc(); + pause2start.setTarget(idle); + pause2start.setOutgoing(false); + pause2start.setWeight(1); + Arc start2running = myFactory.createArc(); + start2running.setTarget(running); + start2running.setOutgoing(true); + start2running.setWeight(1); + Transition start = myFactory.createTransition(); + start.setName(name + "_start"); + start.getArcs().add(pause2start); + start.getArcs().add(start2running); + + Arc running2finish = myFactory.createArc(); + running2finish.setTarget(running); + running2finish.setOutgoing(false); + running2finish.setWeight(1); + Arc finish2finished = myFactory.createArc(); + finish2finished.setTarget(finished); + finish2finished.setOutgoing(true); + finish2finished.setWeight(1); + Transition finish = myFactory.createTransition(); + finish.setName(name + "_finish"); + finish.getArcs().add(running2finish); + finish.getArcs().add(finish2finished); + + System.out.println(" + " + idle.getName() + " (" + idle.getTokens() + ")"); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Créer le nouveau xmi (modèle convertit) + URI convURI = URI.createURI("models/test.xmi"); + Resource conv = resSet.createResource(convURI); + + // Ajouter le Network dans le nouveau modèle + conv.getContents().add(network); + + // Sauver la ressource + try { + conv.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/7a/60862ad3bd29001c1427db6275755878 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/7a/60862ad3bd29001c1427db6275755878 new file mode 100644 index 0000000..4cf25dc --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/7a/60862ad3bd29001c1427db6275755878 @@ -0,0 +1,190 @@ +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 petrinet.PetrinetPackage; +import petrinet.Place; +import petrinet.Transition; +import petrinet.Arc; +import petrinet.Network; +import petrinet.Node; +import petrinet.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlPackage; + +public class simplepdl2petrinet { + + public static void main(String[] args) { + + // Charger les package SimplePDL et Petrinet afin de les enregistrer dans le registre d'Eclipse. + SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE; + PetrinetPackage packageInstance2 = PetrinetPackage.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(); + + // Charger la ressource (notre modèle) + URI modelURI = URI.createURI("pdl-sujet.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); + + // La fabrique pour fabriquer les éléments de PetriNET + PetrinetFactory myFactory = PetrinetFactory.eINSTANCE; + + // Créer un élément Network + Network network = myFactory.createNetwork(); + network.setName(process.getName()); + + // Conversion des WorkDefinition en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkDefinition) { + WorkDefinition wd = (WorkDefinition) o; + String name = wd.getName(); + + Place idle = myFactory.createPlace(); + idle.setName(name + "_idle"); + idle.setTokens(1); + Place started = myFactory.createPlace(); + started.setName(name + "_started"); + started.setTokens(0); + Place running = myFactory.createPlace(); + running.setName(name + "_running"); + running.setTokens(0); + Place finished = myFactory.createPlace(); + finished.setName(name + "_finished"); + finished.setTokens(0); + + Arc pause2start = myFactory.createArc(); + pause2start.setTarget(idle); + pause2start.setOutgoing(false); + pause2start.setWeight(1); + Arc start2running = myFactory.createArc(); + start2running.setTarget(running); + start2running.setOutgoing(true); + start2running.setWeight(1); + Arc start2started = myFactory.createArc(); + start2started.setTarget(started); + start2started.setOutgoing(true); + start2started.setWeight(1); + Transition start = myFactory.createTransition(); + start.setName(name + "_start"); + start.getArcs().add(pause2start); + start.getArcs().add(start2running); + start.getArcs().add(start2started); + + Arc running2finish = myFactory.createArc(); + running2finish.setTarget(running); + running2finish.setOutgoing(false); + running2finish.setWeight(1); + Arc finish2finished = myFactory.createArc(); + finish2finished.setTarget(finished); + finish2finished.setOutgoing(true); + finish2finished.setWeight(1); + Transition finish = myFactory.createTransition(); + finish.setName(name + "_finish"); + finish.getArcs().add(running2finish); + finish.getArcs().add(finish2finished); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(started); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Conversion des WorkSequence en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkSequence) { + WorkSequence ws = (WorkSequence) o; + WorkSequenceType type = ws.getLinkType(); + WorkDefinition predecessor = ws.getPredecessor(); + WorkDefinition successor = ws.getSuccessor(); + + String predecessor_suffix = new String(); + String successor_suffix = new String(); + switch (type) { + case START_TO_START: + predecessor_suffix = "_started"; + successor_suffix = "_start"; + break; + case START_TO_FINISH: + predecessor_suffix = "_started"; + successor_suffix = "_finished"; + break; + case FINISH_TO_START: + predecessor_suffix = "_finished"; + successor_suffix = "_start"; + break; + case FINISH_TO_FINISH: + predecessor_suffix = "_finished"; + successor_suffix = "_finish"; + break; + default: + System.out.print("the fuck ?"); + break; + } + + Arc arc1 = myFactory.createArc(); + arc1.setOutgoing(false); + arc1.setWeight(1); + Arc arc2 = myFactory.createArc(); + arc2.setOutgoing(true); + arc2.setWeight(2); + + for (Node node : network.getNodes()) { + if (node instanceof Place) { + Place place = (Place) node; + if (place.getName().equals(predecessor.getName() + predecessor_suffix)) { + arc.setTarget(place); + } + } + if (node instanceof Transition) { + Transition transition = (Transition) node; + if (transition.getName().equals(successor.getName() + successor_suffix)) { + transition.getArcs().add(arc); + } + } + } + + + + } + } + + // Créer le nouveau xmi (modèle convertit) + URI convURI = URI.createURI("models/test.xmi"); + Resource conv = resSet.createResource(convURI); + + // Ajouter le Network dans le nouveau modèle + conv.getContents().add(network); + + // Sauver la ressource + try { + conv.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/7e/00fb5ddabe29001c1427db6275755878 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/7e/00fb5ddabe29001c1427db6275755878 new file mode 100644 index 0000000..2dbe4c0 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/7e/00fb5ddabe29001c1427db6275755878 @@ -0,0 +1,44 @@ +[comment encoding = UTF-8 /] +[module toTINA('http://petrinet')] + +[template public networkToTINA(aNetwork : Network)] +[comment @main/] +[file (aNetwork.name + '.net', false, 'UTF-8')] +net [aNetwork.name/] +[let places : OrderedSet(Place) = aNetwork.getPlaces() ] + [if (places->size() > 0)] + [for (place : Place | places)] +pl [place.name/] ([place.tokens/]) + [/for] + [else] + [/if] +[/let] +[let transitions : OrderedSet(Transition) = aNetwork.getTransitions() ] + [if (transitions->size() > 0)] + [for (transition : Transition | transitions)] +[transition.afficher()/] + [/for] + [else] + [/if] +[/let] +[/file] +[/template] + +[query public getPlaces(n: Network) : OrderedSet(Place) = + n.nodes + ->select( e | e.oclIsTypeOf(Place) ) + ->collect( e | e.oclAsType(Place) ) + ->asOrderedSet() +/] + +[query public getTransitions(n: Network) : OrderedSet(Transition) = + n.nodes + ->select( e | e.oclIsTypeOf(Transition) ) + ->collect( e | e.oclAsType(Transition) ) + ->asOrderedSet() +/] + +[template public afficher(t : Transition) post (trim()) ] +[comment][let outgoing = t.getArcs()->select( e | e.isOutgoing() ) /][/comment] +tr [t.name/] [for (a : Arc | t.arcs)][if (not a.outgoing)][a.target.name/]*[a.weight/] [/if][/for]-> [for (a : Arc | t.arcs)][if (a.outgoing)][a.target.name/]*[a.weight/][/if][/for] +[/template] \ No newline at end of file diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/91/701cacd34f29001c15a7c9c2336a037e b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/91/701cacd34f29001c15a7c9c2336a037e new file mode 100644 index 0000000..8f0d125 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/91/701cacd34f29001c15a7c9c2336a037e @@ -0,0 +1,124 @@ +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 petrinet.PetrinetPackage; +import petrinet.Place; +import petrinet.Transition; +import petrinet.Arc; +import petrinet.Network; +import petrinet.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlPackage; + +public class simplepdl2petrinet { + + public static void main(String[] args) { + + // Charger les package SimplePDL et Petrinet afin de les enregistrer dans le registre d'Eclipse. + SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE; + PetrinetPackage packageInstance2 = PetrinetPackage.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(); + + // Charger la ressource (notre modèle) + URI modelURI = URI.createURI("pdl-sujet.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); + + // La fabrique pour fabriquer les éléments de PetriNET + PetrinetFactory myFactory = PetrinetFactory.eINSTANCE; + + // Créer un élément Network + Network network = myFactory.createNetwork(); + network.setName(process.getName()); + + // Conversion des WorkDefinition en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkDefinition) { + WorkDefinition wd = (WorkDefinition) o; + String name = wd.getName(); + System.out.println(" - " + name); + + Place idle = myFactory.createPlace(); + idle.setName(name + "_idle"); + idle.setTokens(1); + Place running = myFactory.createPlace(); + running.setName(name + "_running"); + running.setTokens(1); + Place finished = myFactory.createPlace(); + finished.setName(name + "_finished"); + finished.setTokens(1); + + Arc pause2start = myFactory.createArc(); + pause2start.setTarget(idle); + pause2start.setOutgoing(false); + pause2start.setWeight(1); + Arc start2running = myFactory.createArc(); + start2running.setTarget(running); + start2running.setOutgoing(true); + start2running.setWeight(1); + Transition start = myFactory.createTransition(); + start.setName(name + "_start"); + start.getArcs().add(pause2start); + start.getArcs().add(start2running); + + Arc running2finish = myFactory.createArc(); + running2finish.setTarget(running); + running2finish.setOutgoing(false); + running2finish.setWeight(1); + Arc finish2finished = myFactory.createArc(); + finish2finished.setTarget(finished); + finish2finished.setOutgoing(true); + finish2finished.setWeight(1); + Transition finish = myFactory.createTransition(); + finish.setName(name + "_finish"); + finish.getArcs().add(running2finish); + finish.getArcs().add(finish2finished); + + System.out.println(" + " + idle.getName() + " (" + idle.getTokens() + ")"); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Créer le nouveau xmi (modèle convertit) + URI convURI = URI.createURI("models/test.xmi"); + Resource conv = resSet.createResource(convURI); + + // Ajouter le Network dans le nouveau modèle + conv.getContents().add(network); + + // Sauver la ressource + try { + conv.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/97/404058d9bd29001c1427db6275755878 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/97/404058d9bd29001c1427db6275755878 new file mode 100644 index 0000000..677c8e4 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/97/404058d9bd29001c1427db6275755878 @@ -0,0 +1,191 @@ +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 petrinet.PetrinetPackage; +import petrinet.Place; +import petrinet.Transition; +import petrinet.Arc; +import petrinet.Network; +import petrinet.Node; +import petrinet.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlPackage; + +public class simplepdl2petrinet { + + public static void main(String[] args) { + + // Charger les package SimplePDL et Petrinet afin de les enregistrer dans le registre d'Eclipse. + SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE; + PetrinetPackage packageInstance2 = PetrinetPackage.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(); + + // Charger la ressource (notre modèle) + URI modelURI = URI.createURI("pdl-sujet.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); + + // La fabrique pour fabriquer les éléments de PetriNET + PetrinetFactory myFactory = PetrinetFactory.eINSTANCE; + + // Créer un élément Network + Network network = myFactory.createNetwork(); + network.setName(process.getName()); + + // Conversion des WorkDefinition en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkDefinition) { + WorkDefinition wd = (WorkDefinition) o; + String name = wd.getName(); + + Place idle = myFactory.createPlace(); + idle.setName(name + "_idle"); + idle.setTokens(1); + Place started = myFactory.createPlace(); + started.setName(name + "_started"); + started.setTokens(0); + Place running = myFactory.createPlace(); + running.setName(name + "_running"); + running.setTokens(0); + Place finished = myFactory.createPlace(); + finished.setName(name + "_finished"); + finished.setTokens(0); + + Arc pause2start = myFactory.createArc(); + pause2start.setTarget(idle); + pause2start.setOutgoing(false); + pause2start.setWeight(1); + Arc start2running = myFactory.createArc(); + start2running.setTarget(running); + start2running.setOutgoing(true); + start2running.setWeight(1); + Arc start2started = myFactory.createArc(); + start2started.setTarget(started); + start2started.setOutgoing(true); + start2started.setWeight(1); + Transition start = myFactory.createTransition(); + start.setName(name + "_start"); + start.getArcs().add(pause2start); + start.getArcs().add(start2running); + start.getArcs().add(start2started); + + Arc running2finish = myFactory.createArc(); + running2finish.setTarget(running); + running2finish.setOutgoing(false); + running2finish.setWeight(1); + Arc finish2finished = myFactory.createArc(); + finish2finished.setTarget(finished); + finish2finished.setOutgoing(true); + finish2finished.setWeight(1); + Transition finish = myFactory.createTransition(); + finish.setName(name + "_finish"); + finish.getArcs().add(running2finish); + finish.getArcs().add(finish2finished); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(started); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Conversion des WorkSequence en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkSequence) { + WorkSequence ws = (WorkSequence) o; + WorkSequenceType type = ws.getLinkType(); + WorkDefinition predecessor = ws.getPredecessor(); + WorkDefinition successor = ws.getSuccessor(); + + String predecessor_suffix = new String(); + String successor_suffix = new String(); + switch (type) { + case START_TO_START: + predecessor_suffix = "_started"; + successor_suffix = "_start"; + break; + case START_TO_FINISH: + predecessor_suffix = "_started"; + successor_suffix = "_finished"; + break; + case FINISH_TO_START: + predecessor_suffix = "_finished"; + successor_suffix = "_start"; + break; + case FINISH_TO_FINISH: + predecessor_suffix = "_finished"; + successor_suffix = "_finish"; + break; + default: + System.out.print("the fuck ?"); + break; + } + + Arc arc1 = myFactory.createArc(); + arc1.setOutgoing(false); + arc1.setWeight(1); + Arc arc2 = myFactory.createArc(); + arc2.setOutgoing(true); + arc2.setWeight(1); + + for (Node node : network.getNodes()) { + if (node instanceof Place) { + Place place = (Place) node; + if (place.getName().equals(predecessor.getName() + predecessor_suffix)) { + arc1.setTarget(place); + arc2.setTarget(place); + } + } + if (node instanceof Transition) { + Transition transition = (Transition) node; + if (transition.getName().equals(successor.getName() + successor_suffix)) { + transition.getArcs().add(arc1); + } + } + } + + + + } + } + + // Créer le nouveau xmi (modèle convertit) + URI convURI = URI.createURI("models/test.xmi"); + Resource conv = resSet.createResource(convURI); + + // Ajouter le Network dans le nouveau modèle + conv.getContents().add(network); + + // Sauver la ressource + try { + conv.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/a/602f5c93be29001c1427db6275755878 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/a/602f5c93be29001c1427db6275755878 new file mode 100644 index 0000000..974c90b --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/a/602f5c93be29001c1427db6275755878 @@ -0,0 +1,193 @@ +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 petrinet.PetrinetPackage; +import petrinet.Place; +import petrinet.Transition; +import petrinet.Arc; +import petrinet.Network; +import petrinet.Node; +import petrinet.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlPackage; + +public class simplepdl2petrinet { + + public static void main(String[] args) { + + // Charger les package SimplePDL et Petrinet afin de les enregistrer dans le registre d'Eclipse. + SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE; + PetrinetPackage packageInstance2 = PetrinetPackage.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(); + + // Charger la ressource (notre modèle) + URI modelURI = URI.createURI("pdl-sujet.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); + + // La fabrique pour fabriquer les éléments de PetriNET + PetrinetFactory myFactory = PetrinetFactory.eINSTANCE; + + // Créer un élément Network + Network network = myFactory.createNetwork(); + network.setName(process.getName()); + + // Conversion des WorkDefinition en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkDefinition) { + WorkDefinition wd = (WorkDefinition) o; + String name = wd.getName(); + + Place idle = myFactory.createPlace(); + idle.setName(name + "_idle"); + idle.setTokens(1); + Place started = myFactory.createPlace(); + started.setName(name + "_started"); + started.setTokens(0); + Place running = myFactory.createPlace(); + running.setName(name + "_running"); + running.setTokens(0); + Place finished = myFactory.createPlace(); + finished.setName(name + "_finished"); + finished.setTokens(0); + + Arc pause2start = myFactory.createArc(); + pause2start.setTarget(idle); + pause2start.setOutgoing(false); + pause2start.setWeight(1); + Arc start2running = myFactory.createArc(); + start2running.setTarget(running); + start2running.setOutgoing(true); + start2running.setWeight(1); + Arc start2started = myFactory.createArc(); + start2started.setTarget(started); + start2started.setOutgoing(true); + start2started.setWeight(1); + Transition start = myFactory.createTransition(); + start.setName(name + "_start"); + start.getArcs().add(pause2start); + start.getArcs().add(start2running); + start.getArcs().add(start2started); + + Arc running2finish = myFactory.createArc(); + running2finish.setTarget(running); + running2finish.setOutgoing(false); + running2finish.setWeight(1); + Arc finish2finished = myFactory.createArc(); + finish2finished.setTarget(finished); + finish2finished.setOutgoing(true); + finish2finished.setWeight(1); + Transition finish = myFactory.createTransition(); + finish.setName(name + "_finish"); + finish.getArcs().add(running2finish); + finish.getArcs().add(finish2finished); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(started); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Conversion des WorkSequence en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkSequence) { + WorkSequence ws = (WorkSequence) o; + WorkSequenceType type = ws.getLinkType(); + WorkDefinition predecessor = ws.getPredecessor(); + WorkDefinition successor = ws.getSuccessor(); + + System.out.println(predecessor.getName()); + + // creation des suffixs permettant la recherche des noeuds + String predecessor_suffix = new String(); + String successor_suffix = new String(); + switch (type) { + case START_TO_START: + predecessor_suffix = "_started"; + successor_suffix = "_start"; + break; + case START_TO_FINISH: + predecessor_suffix = "_started"; + successor_suffix = "_finished"; + break; + case FINISH_TO_START: + predecessor_suffix = "_finished"; + successor_suffix = "_start"; + break; + case FINISH_TO_FINISH: + predecessor_suffix = "_finished"; + successor_suffix = "_finish"; + break; + default: + System.out.print("the fuck ?"); + break; + } + + // creation du read-arc + Arc arc1 = myFactory.createArc(); + arc1.setOutgoing(false); + arc1.setWeight(1); + Arc arc2 = myFactory.createArc(); + arc2.setOutgoing(true); + arc2.setWeight(1); + + for (Node node : network.getNodes()) { + if (node instanceof Place) { + Place place = (Place) node; + if (place.getName().equals(predecessor.getName() + predecessor_suffix)) { + arc1.setTarget(place); + arc2.setTarget(place); + } + } + if (node instanceof Transition) { + Transition transition = (Transition) node; + if (transition.getName().equals(successor.getName() + successor_suffix)) { + transition.getArcs().add(arc1); + transition.getArcs().add(arc2); + } + } + } + } + } + + // Créer le nouveau xmi (modèle convertit) + URI convURI = URI.createURI("models/test.xmi"); + Resource conv = resSet.createResource(convURI); + + // Ajouter le Network dans le nouveau modèle + conv.getContents().add(network); + + // Sauver la ressource + try { + conv.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/a2/00579c045029001c15a7c9c2336a037e b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/a2/00579c045029001c15a7c9c2336a037e new file mode 100644 index 0000000..66067c9 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/a2/00579c045029001c15a7c9c2336a037e @@ -0,0 +1,133 @@ +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 petrinet.PetrinetPackage; +import petrinet.Place; +import petrinet.Transition; +import petrinet.Arc; +import petrinet.Network; +import petrinet.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlPackage; + +public class simplepdl2petrinet { + + public static void main(String[] args) { + + // Charger les package SimplePDL et Petrinet afin de les enregistrer dans le registre d'Eclipse. + SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE; + PetrinetPackage packageInstance2 = PetrinetPackage.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(); + + // Charger la ressource (notre modèle) + URI modelURI = URI.createURI("pdl-sujet.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); + + // La fabrique pour fabriquer les éléments de PetriNET + PetrinetFactory myFactory = PetrinetFactory.eINSTANCE; + + // Créer un élément Network + Network network = myFactory.createNetwork(); + network.setName(process.getName()); + + // Conversion des WorkDefinition en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkDefinition) { + WorkDefinition wd = (WorkDefinition) o; + String name = wd.getName(); + System.out.println(" - " + name); + + Place idle = myFactory.createPlace(); + idle.setName(name + "_idle"); + idle.setTokens(1); + Place started = myFactory.createPlace(); + started.setName(name + "_started"); + started.setTokens(0); + Place running = myFactory.createPlace(); + running.setName(name + "_running"); + running.setTokens(0); + Place finished = myFactory.createPlace(); + finished.setName(name + "_finished"); + finished.setTokens(0); + + Arc pause2start = myFactory.createArc(); + pause2start.setTarget(idle); + pause2start.setOutgoing(false); + pause2start.setWeight(1); + Arc start2running = myFactory.createArc(); + start2running.setTarget(running); + start2running.setOutgoing(true); + start2running.setWeight(1); + Arc start2started = myFactory.createArc(); + start2started.setTarget(started); + start2started.setOutgoing(true); + start2started.setWeight(1); + Transition start = myFactory.createTransition(); + start.setName(name + "_start"); + start.getArcs().add(pause2start); + start.getArcs().add(start2running); + start.getArcs().add(start2started); + + Arc running2finish = myFactory.createArc(); + running2finish.setTarget(running); + running2finish.setOutgoing(false); + running2finish.setWeight(1); + Arc finish2finished = myFactory.createArc(); + finish2finished.setTarget(finished); + finish2finished.setOutgoing(true); + finish2finished.setWeight(1); + Transition finish = myFactory.createTransition(); + finish.setName(name + "_finish"); + finish.getArcs().add(running2finish); + finish.getArcs().add(finish2finished); + + System.out.println(" + " + idle.getName() + " (" + idle.getTokens() + ")"); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(started); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Créer le nouveau xmi (modèle convertit) + URI convURI = URI.createURI("models/test.xmi"); + Resource conv = resSet.createResource(convURI); + + // Ajouter le Network dans le nouveau modèle + conv.getContents().add(network); + + // Sauver la ressource + try { + conv.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/fr.n7.simplepdl/models/test.xmi b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/cf/7018d79cbe29001c1427db6275755878 similarity index 53% rename from eclipse-workspace/fr.n7.simplepdl/models/test.xmi rename to eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/cf/7018d79cbe29001c1427db6275755878 index 9e7734e..22698a8 100644 --- a/eclipse-workspace/fr.n7.simplepdl/models/test.xmi +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/cf/7018d79cbe29001c1427db6275755878 @@ -3,45 +3,63 @@ + - + + - - + + - + - - - - - - + + + + - + + + + + + + - - - - - + + + - - - + + + + + - + + + + + + + + + + + - - + + + + - + diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/e0/b0c68456be29001c1427db6275755878 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/e0/b0c68456be29001c1427db6275755878 new file mode 100644 index 0000000..11609f2 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/e0/b0c68456be29001c1427db6275755878 @@ -0,0 +1,191 @@ +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 petrinet.PetrinetPackage; +import petrinet.Place; +import petrinet.Transition; +import petrinet.Arc; +import petrinet.Network; +import petrinet.Node; +import petrinet.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlPackage; + +public class simplepdl2petrinet { + + public static void main(String[] args) { + + // Charger les package SimplePDL et Petrinet afin de les enregistrer dans le registre d'Eclipse. + SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE; + PetrinetPackage packageInstance2 = PetrinetPackage.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(); + + // Charger la ressource (notre modèle) + URI modelURI = URI.createURI("pdl-sujet.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); + + // La fabrique pour fabriquer les éléments de PetriNET + PetrinetFactory myFactory = PetrinetFactory.eINSTANCE; + + // Créer un élément Network + Network network = myFactory.createNetwork(); + network.setName(process.getName()); + + // Conversion des WorkDefinition en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkDefinition) { + WorkDefinition wd = (WorkDefinition) o; + String name = wd.getName(); + + Place idle = myFactory.createPlace(); + idle.setName(name + "_idle"); + idle.setTokens(1); + Place started = myFactory.createPlace(); + started.setName(name + "_started"); + started.setTokens(0); + Place running = myFactory.createPlace(); + running.setName(name + "_running"); + running.setTokens(0); + Place finished = myFactory.createPlace(); + finished.setName(name + "_finished"); + finished.setTokens(0); + + Arc pause2start = myFactory.createArc(); + pause2start.setTarget(idle); + pause2start.setOutgoing(false); + pause2start.setWeight(1); + Arc start2running = myFactory.createArc(); + start2running.setTarget(running); + start2running.setOutgoing(true); + start2running.setWeight(1); + Arc start2started = myFactory.createArc(); + start2started.setTarget(started); + start2started.setOutgoing(true); + start2started.setWeight(1); + Transition start = myFactory.createTransition(); + start.setName(name + "_start"); + start.getArcs().add(pause2start); + start.getArcs().add(start2running); + start.getArcs().add(start2started); + + Arc running2finish = myFactory.createArc(); + running2finish.setTarget(running); + running2finish.setOutgoing(false); + running2finish.setWeight(1); + Arc finish2finished = myFactory.createArc(); + finish2finished.setTarget(finished); + finish2finished.setOutgoing(true); + finish2finished.setWeight(1); + Transition finish = myFactory.createTransition(); + finish.setName(name + "_finish"); + finish.getArcs().add(running2finish); + finish.getArcs().add(finish2finished); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(started); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Conversion des WorkSequence en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkSequence) { + WorkSequence ws = (WorkSequence) o; + WorkSequenceType type = ws.getLinkType(); + WorkDefinition predecessor = ws.getPredecessor(); + WorkDefinition successor = ws.getSuccessor(); + + // creation des suffixs permettant la recherche des noeuds + String predecessor_suffix = new String(); + String successor_suffix = new String(); + switch (type) { + case START_TO_START: + predecessor_suffix = "_started"; + successor_suffix = "_start"; + break; + case START_TO_FINISH: + predecessor_suffix = "_started"; + successor_suffix = "_finished"; + break; + case FINISH_TO_START: + predecessor_suffix = "_finished"; + successor_suffix = "_start"; + break; + case FINISH_TO_FINISH: + predecessor_suffix = "_finished"; + successor_suffix = "_finish"; + break; + default: + System.out.print("the fuck ?"); + break; + } + + // creation du read-arc + Arc arc1 = myFactory.createArc(); + arc1.setOutgoing(false); + arc1.setWeight(1); + Arc arc2 = myFactory.createArc(); + arc2.setOutgoing(true); + arc2.setWeight(1); + + for (Node node : network.getNodes()) { + if (node instanceof Place) { + Place place = (Place) node; + if (place.getName().equals(predecessor.getName() + predecessor_suffix)) { + arc1.setTarget(place); + arc2.setTarget(place); + } + } + if (node instanceof Transition) { + Transition transition = (Transition) node; + if (transition.getName().equals(successor.getName() + successor_suffix)) { + transition.getArcs().add(arc1); + transition.getArcs().add(arc2); + } + } + } + } + } + + // Créer le nouveau xmi (modèle convertit) + URI convURI = URI.createURI("models/test.xmi"); + Resource conv = resSet.createResource(convURI); + + // Ajouter le Network dans le nouveau modèle + conv.getContents().add(network); + + // Sauver la ressource + try { + conv.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/f8/e0aeac34be29001c1427db6275755878 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/f8/e0aeac34be29001c1427db6275755878 new file mode 100644 index 0000000..22698a8 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/f8/e0aeac34be29001c1427db6275755878 @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.design/.markers b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.design/.markers index 274460f..9f91ee8 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.design/.markers and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.design/.markers differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.design/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.design/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.design/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.design/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.design/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.design/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.design/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.design/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.edit/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.edit/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.edit/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.edit/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.edit/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.edit/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.edit/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.edit/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.editor/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.editor/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.editor/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.editor/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.editor/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.editor/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.editor/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.editor/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.exemples/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.exemples/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.exemples/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.exemples/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.exemples/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.exemples/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.exemples/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.exemples/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.feature/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.feature/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.feature/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.feature/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.feature/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.feature/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.feature/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.feature/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.samples/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.samples/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.samples/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.samples/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.samples/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.samples/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.samples/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.samples/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.tests/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.tests/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.tests/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.tests/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.tests/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.tests/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.tests/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.tests/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA.ui/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA.ui/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA.ui/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA.ui/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA.ui/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA.ui/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA.ui/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA.ui/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.indexes/7/cc/89/47/1d/b9/history.index b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.indexes/7/cc/89/47/1d/b9/history.index index a0e7770..185d0c1 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.indexes/7/cc/89/47/1d/b9/history.index and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.indexes/7/cc/89/47/1d/b9/history.index differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.indexes/e4/cc/89/47/1d/b9/history.index b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.indexes/e4/cc/89/47/1d/b9/history.index index 3d8ee78..4bc843c 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.indexes/e4/cc/89/47/1d/b9/history.index and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.indexes/e4/cc/89/47/1d/b9/history.index differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.markers b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.markers index d1a0dea..4604593 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.markers and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.markers differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.markers.snap index 91d6c54..b25888d 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/org.eclipse.jdt.core/state.dat b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/org.eclipse.jdt.core/state.dat deleted file mode 100644 index 154e26b..0000000 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/org.eclipse.jdt.core/state.dat and /dev/null differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/.markers b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/.markers index 830978d..d2485d9 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/.markers and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/.markers differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/.markers.snap index 52bc7d0..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/org.eclipse.jdt.core/state.dat b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/org.eclipse.jdt.core/state.dat new file mode 100644 index 0000000..715a036 Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/org.eclipse.jdt.core/state.dat differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.design/.markers b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.design/.markers index 2bc8c76..c3d8231 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.design/.markers and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.design/.markers differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.design/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.design/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.design/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.design/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.design/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.design/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.design/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.design/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.edit/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.edit/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.edit/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.edit/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.edit/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.edit/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.edit/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.edit/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.editor/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.editor/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.editor/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.editor/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.editor/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.editor/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.editor/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.editor/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.exemples/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.exemples/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.exemples/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.exemples/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.exemples/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.exemples/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.exemples/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.exemples/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.feature/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.feature/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.feature/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.feature/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.feature/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.feature/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.feature/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.feature/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.samples/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.samples/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.samples/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.samples/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.samples/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.samples/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.samples/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.samples/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.tests/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.tests/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.tests/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.tests/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.tests/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.tests/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.tests/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.tests/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT.ui/.markers b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT.ui/.markers index 6a14afa..7203596 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT.ui/.markers and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT.ui/.markers differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT.ui/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT.ui/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT.ui/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT.ui/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT.ui/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT.ui/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT.ui/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT.ui/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT/.markers b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT/.markers index b1a69a1..af22036 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT/.markers and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT/.markers differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML.ui/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML.ui/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML.ui/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML.ui/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML.ui/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML.ui/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML.ui/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML.ui/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML/.markers.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.indexes/96/history.index b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.indexes/96/history.index new file mode 100644 index 0000000..822566b Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.indexes/96/history.index differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.indexes/e4/fa/1/history.index b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.indexes/e4/fa/1/history.index index b3fcda3..879fc40 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.indexes/e4/fa/1/history.index and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.indexes/e4/fa/1/history.index differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.indexes/history.index b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.indexes/history.index index 7b7b95a..d15f78b 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.indexes/history.index and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.indexes/history.index differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.markers b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.markers index 24fe987..42e24d2 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.markers and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.markers differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.markers.snap index ae98a72..57f89ad 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.syncinfo.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.syncinfo.snap index 91d6c54..0b368ce 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.syncinfo.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl/.syncinfo.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap index bdb00bf..54be962 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/21.tree b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/22.tree similarity index 97% rename from eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/21.tree rename to eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/22.tree index c4cb479..a173a7c 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/21.tree and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/22.tree differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources index 05db1a8..7199452 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/21.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/21.snap deleted file mode 100644 index 3df0427..0000000 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/21.snap and /dev/null differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/22.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/22.snap new file mode 100644 index 0000000..203141b Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/22.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs index f204514..a2fbced 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs +++ b/eclipse-workspace/.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=1631777710672 +platformState=1631777710673 quickStart=false tipsAndTricks=true diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.debug.core/.launches/simplepdl2petrinet.launch b/eclipse-workspace/.metadata/.plugins/org.eclipse.debug.core/.launches/simplepdl2petrinet.launch index b25a176..6039e3e 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.debug.core/.launches/simplepdl2petrinet.launch +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.debug.core/.launches/simplepdl2petrinet.launch @@ -7,7 +7,8 @@ + - + diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.debug.core/.launches/toTINA.launch b/eclipse-workspace/.metadata/.plugins/org.eclipse.debug.core/.launches/toTINA.launch index 79ea897..2d7d080 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.debug.core/.launches/toTINA.launch +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.debug.core/.launches/toTINA.launch @@ -4,7 +4,7 @@ - + @@ -17,6 +17,6 @@ - + diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml b/eclipse-workspace/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml index 9bbf6bb..80adeba 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml @@ -2,8 +2,8 @@ - + @@ -24,8 +24,8 @@ - + diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi b/eclipse-workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi index 42bf923..5da0dc7 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi @@ -1,8 +1,8 @@ - - + + activeSchemeId:org.eclipse.ui.defaultAcceleratorConfiguration - + @@ -11,9 +11,9 @@ topLevel shellMaximized - - - + + + persp.actionSet:org.eclipse.acceleo.ide.ui.editors.template.actionSet persp.actionSet:org.eclipse.ui.cheatsheets.actionSet @@ -35,34 +35,34 @@ persp.viewSC:org.eclipse.ui.views.ProblemView persp.actionSet:org.eclipse.debug.ui.launchActionSet persp.newWizSC:org.eclipse.ecoretools.emf.design.wizardID - - - + + + noFocus - + View categoryTag:Sirius - - + + View categoryTag:General - + View categoryTag:General - - - - + + + + View categoryTag:General - + View categoryTag:General @@ -70,7 +70,7 @@ - + persp.actionSet:org.eclipse.acceleo.ide.ui.editors.template.actionSet persp.actionSet:org.eclipse.ui.cheatsheets.actionSet @@ -83,53 +83,53 @@ persp.actionSet:org.eclipse.ui.actionSet.keyBindings persp.actionSet:org.eclipse.ui.actionSet.openFiles persp.newWizSC:org.eclipse.ecoretools.emf.design.wizardID - - - + + + noFocus - + View categoryTag:General NoClose - - + + View categoryTag:General NoClose - + View categoryTag:General - - - - - + + + + + View categoryTag:General NoClose - + View categoryTag:General - + General - + View categoryTag:Ecore Tools - + View categoryTag:Ecore Tools - + View categoryTag:General @@ -138,7 +138,7 @@ - + persp.actionSet:org.eclipse.acceleo.ide.ui.editors.template.actionSet persp.actionSet:org.eclipse.ui.cheatsheets.actionSet @@ -186,57 +186,57 @@ persp.viewSC:org.eclipse.jdt.ui.PackageExplorer persp.viewSC:org.eclipse.pde.ui.TargetPlatformState persp.newWizSC:org.eclipse.pde.ds.ui.wizard - - + + org.eclipse.e4.primaryNavigationStack noFocus - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Java - + View categoryTag:Plug-in Development - - - - - + + + + + View categoryTag:General - + View categoryTag:General - + org.eclipse.e4.secondaryDataStack General - + View categoryTag:General - + View categoryTag:Plug-in Development - + View categoryTag:General - + View categoryTag:General @@ -244,7 +244,7 @@ - + persp.actionSet:org.eclipse.acceleo.ide.ui.editors.template.actionSet persp.actionSet:org.eclipse.ui.cheatsheets.actionSet @@ -280,61 +280,61 @@ persp.newWizSC:org.eclipse.ui.editors.wizards.UntitledTextFileWizard persp.perspSC:org.eclipse.acceleo.ide.ui.AcceleoPerspective persp.actionSet:org.eclipse.ui.edit.text.actionSet.presentation - - - + + + View categoryTag:Java - - - - - + + + + + View categoryTag:General - + View categoryTag:General - - - + + + View categoryTag:Acceleo Model to Text - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + Minimized - + View categoryTag:Acceleo Model to Text - + View categoryTag:Acceleo Model to Text @@ -343,7 +343,7 @@ - + persp.actionSet:org.eclipse.acceleo.ide.ui.editors.template.actionSet persp.actionSet:org.eclipse.ui.cheatsheets.actionSet @@ -367,38 +367,38 @@ persp.newWizSC:org.eclipse.ecoretools.emf.design.wizardID persp.newWizSC:org.eclipse.sirius.presentation.DescriptionModelWizardID persp.newWizSC:org.eclipse.sirius.ui.specificationproject.wizard - - - + + + noFocus - + View categoryTag:Sirius - - + + View categoryTag:General - + View categoryTag:General - - - - + + + + View categoryTag:General - + View categoryTag:Acceleo Model to Text - + View categoryTag:General @@ -407,2351 +407,2352 @@ - - + + View categoryTag:Help - + View categoryTag:General - + View categoryTag:Help - + View categoryTag:Help - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:Help - - + + org.eclipse.e4.primaryDataStack EditorStack active - - + noFocus + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor - - + + Editor removeOnHide - org.eclipse.jdt.ui.CompilationUnitEditor + org.eclipse.emf.ecore.presentation.EcoreEditorID - - + + Editor removeOnHide - org.eclipse.jdt.ui.CompilationUnitEditor + org.eclipse.emf.ecore.presentation.EcoreEditorID - - + + Editor removeOnHide org.eclipse.emf.ecore.presentation.ReflectiveEditorID - - + + Editor removeOnHide - org.eclipse.emf.ecore.presentation.ReflectiveEditorID - - - - Editor - removeOnHide - org.eclipse.emf.ecore.presentation.ReflectiveEditorID + org.eclipse.ui.DefaultTextEditor active - + View categoryTag:Sirius - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:Ecore Tools - + ViewMenu menuContribution:menu - + - + View categoryTag:Ecore Tools - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:Java - + View categoryTag:Plug-in Development - + ViewMenu menuContribution:menu - + - + View categoryTag:Plug-in Development - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:Java - + ViewMenu menuContribution:menu - + - + View categoryTag:Acceleo Model to Text - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Acceleo Model to Text - + ViewMenu menuContribution:menu - + - + View categoryTag:Acceleo Model to Text - + ViewMenu menuContribution:menu - + - - + + toolbarSeparator - + - + Draggable - + - + toolbarSeparator - + - + Draggable - + toolbarSeparator - + - + Draggable - + Draggable - + Draggable - + Draggable - + toolbarSeparator - + - + Draggable - + - + Draggable - + Draggable - + + Draggable + + + Draggable + + toolbarSeparator - + - + toolbarSeparator - + - + Draggable - + stretch SHOW_RESTORE_MENU - + Draggable HIDEABLE SHOW_RESTORE_MENU - - + + stretch - + Draggable - + Draggable - - + + TrimStack Draggable - - + + TrimStack Draggable - - - - - - - - - - - - - + + + + + + + + + + + + + platform:gtk - - - - + + + + platform:gtk - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - + + - - - - - - - - + + + + + + + + - - + + - - - + + + - - - - - + + + + + - - + + - - - + + + - - - - - - - + + + + + + + platform:gtk - - - - - + + + + + - - + + - - + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + - - - - - - - - + + + + + + + + locale:fr - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - + + + + + + + + + + + + platform:gtk - + platform:gtk - + platform:gtk - - - - - - + + + + + + - - + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - - + + - - - - - - + + + + + + - - - + + + - - - + + + - - + + - - - - - - + + + + + + - - + + - - - - - - - - + + + + + + + + - - - - + + + + - - + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - - - - + + + + + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Editor removeOnHide - + View categoryTag:Acceleo Model to Text - + View categoryTag:Acceleo Model to Text - + View categoryTag:Acceleo Model to Text - + View categoryTag:Ant - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:CDO - + View categoryTag:CDO - + View categoryTag:CDO - + View categoryTag:CDO - + View categoryTag:CDO - + View categoryTag:CDO - + View categoryTag:EMF Compare - + View categoryTag:Ecore Tools - + View categoryTag:Ecore Tools - + View categoryTag:General - + View categoryTag:Help - + View categoryTag:Debug - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:Java Browsing - + View categoryTag:Java Browsing - + View categoryTag:Java Browsing - + View categoryTag:Java Browsing - + View categoryTag:Java - + View categoryTag:General - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:ATL Profiler - + View categoryTag:ATL Profiler - + View categoryTag:Debug - + View categoryTag:Net4j - + View categoryTag:Net4j - + View categoryTag:Net4j Debug - + View categoryTag:Net4j Debug - + View categoryTag:OCL - + View categoryTag:Oomph - + View categoryTag:API Tools - + View categoryTag:Plug-in Development - + View categoryTag:Plug-in Development - + View categoryTag:Plug-in Development - + View categoryTag:Plug-in Development - + View categoryTag:Plug-in Development - + View categoryTag:Plug-in Development - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Sirius Profiler - + View categoryTag:Sirius - + View categoryTag:Team - + View categoryTag:Team - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Help - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Xtend - + View categoryTag:Xtext - + View categoryTag:Xtext - - + + glue move_after:PerspectiveSpacer SHOW_RESTORE_MENU - + move_after:Spacer Glue HIDEABLE SHOW_RESTORE_MENU - + glue move_after:SearchField SHOW_RESTORE_MENU - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/1610757853.index b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/1610757853.index index 1630950..a4f8ceb 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/1610757853.index and b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/1610757853.index differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache index d05f27f..a5c8253 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache and b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps index 7b36c0c..cb88a8a 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps and b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt index 0821c0d..10b8e83 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt @@ -22,13 +22,13 @@ INDEX VERSION 1.131+/home/lfainsin/miniproj_idm/eclipse-workspace/.metadata/.plu 2320756977.index 3761123150.index 649822626.index +1610757853.index 3144173601.index 3144547538.index 638382064.index 1366149182.index 2662280364.index 3977823992.index -686276266.index 1027991553.index 2344539973.index 997444292.index diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/0.png b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/0.png index 2343273..956a366 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/0.png and b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/0.png differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/1.png b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/1.png index 221d50e..e091ec4 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/1.png and b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/1.png differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/2.png b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/2.png new file mode 100644 index 0000000..672f75e Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/2.png differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/3.png b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/3.png new file mode 100644 index 0000000..5bec8a6 Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/3.png differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/4.png b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/4.png new file mode 100644 index 0000000..9d52779 Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/4.png differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.simplepdl/2021/10/40/refactorings.history b/eclipse-workspace/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.simplepdl/2021/10/40/refactorings.history index 189999a..1e1a5fd 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.simplepdl/2021/10/40/refactorings.history +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.simplepdl/2021/10/40/refactorings.history @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.simplepdl/2021/10/40/refactorings.index b/eclipse-workspace/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.simplepdl/2021/10/40/refactorings.index index abb30ea..32ea946 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.simplepdl/2021/10/40/refactorings.index +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.simplepdl/2021/10/40/refactorings.index @@ -13,3 +13,6 @@ 1633794227791 Delete element 1633817925558 Move file 1633818171927 Delete element +1633865744611 Delete element +1633865919357 Delete element +1633865970104 Copy file diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties b/eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties index 9210a1a..966585e 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties @@ -1,2 +1,2 @@ #Cached timestamps -#Sun Oct 10 00:17:26 CEST 2021 +#Sun Oct 10 00:27:50 CEST 2021 diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/.extensions/.manager/.tmp6998723412611004271.instance b/eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/.extensions/.manager/.tmp8285188654093497702.instance similarity index 100% rename from eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/.extensions/.manager/.tmp6998723412611004271.instance rename to eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/.extensions/.manager/.tmp8285188654093497702.instance diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/SavedExternalPluginList.txt b/eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/SavedExternalPluginList.txt index 524590f..7a35baa 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/SavedExternalPluginList.txt +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/SavedExternalPluginList.txt @@ -1,4 +1,4 @@ -# List of external plug-in models previously loaded. Timestamp: 1633817862111 +# List of external plug-in models previously loaded. Timestamp: 1633863537523 file:/mnt/n7fs/ens/tp_cregut/eclipse-gls-2020-09/plugins/com.google.guava_27.1.0.v20190517-1946.jar file:/mnt/n7fs/ens/tp_cregut/eclipse-gls-2020-09/plugins/com.google.inject_3.0.0.v201605172100.jar file:/mnt/n7fs/ens/tp_cregut/eclipse-gls-2020-09/plugins/com.ibm.icu_67.1.0.v20200706-1749.jar diff --git a/eclipse-workspace/.metadata/version.ini b/eclipse-workspace/.metadata/version.ini index b4c9cf4..3d73f2a 100644 --- a/eclipse-workspace/.metadata/version.ini +++ b/eclipse-workspace/.metadata/version.ini @@ -1,3 +1,3 @@ -#Sun Oct 10 00:17:33 CEST 2021 +#Sun Oct 10 12:58:52 CEST 2021 org.eclipse.core.runtime=2 org.eclipse.platform=4.17.0.v20200902-1800 diff --git a/eclipse-workspace/fr.n7.petrinet.exemples/Developpement_petrinet.xmi b/eclipse-workspace/fr.n7.petrinet.exemples/Developpement_petrinet.xmi new file mode 100644 index 0000000..22698a8 --- /dev/null +++ b/eclipse-workspace/fr.n7.petrinet.exemples/Developpement_petrinet.xmi @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eclipse-workspace/fr.n7.petrinet.exemples/gen/Developpement.net b/eclipse-workspace/fr.n7.petrinet.exemples/gen/Developpement.net new file mode 100644 index 0000000..56c8406 --- /dev/null +++ b/eclipse-workspace/fr.n7.petrinet.exemples/gen/Developpement.net @@ -0,0 +1,25 @@ +net Developpement +pl Conception_idle (1) +pl Conception_started (0) +pl Conception_running (0) +pl Conception_finished (0) +pl Programmation_idle (1) +pl Programmation_started (0) +pl Programmation_running (0) +pl Programmation_finished (0) +pl RedactionTests_idle (1) +pl RedactionTests_started (0) +pl RedactionTests_running (0) +pl RedactionTests_finished (0) +pl RedactionDocs_idle (1) +pl RedactionDocs_started (0) +pl RedactionDocs_running (0) +pl RedactionDocs_finished (0) +tr Conception_start Conception_idle*1 -> Conception_running*1 Conception_started*1 +tr Conception_finish Conception_running*1 -> Conception_finished*1 +tr Programmation_start Programmation_idle*1 Conception_finished*1 -> Programmation_running*1 Programmation_started*1 Conception_finished*1 +tr Programmation_finish Programmation_running*1 -> Programmation_finished*1 +tr RedactionTests_start RedactionTests_idle*1 Conception_started*1 -> RedactionTests_running*1 RedactionTests_started*1 Conception_started*1 +tr RedactionTests_finish RedactionTests_running*1 Programmation_finished*1 -> RedactionTests_finished*1 Programmation_finished*1 +tr RedactionDocs_start RedactionDocs_idle*1 Conception_started*1 -> RedactionDocs_running*1 RedactionDocs_started*1 Conception_started*1 +tr RedactionDocs_finish RedactionDocs_running*1 Conception_finished*1 -> RedactionDocs_finished*1 Conception_finished*1 diff --git a/eclipse-workspace/fr.n7.petrinet.toTINA/src/fr/n7/petrinet/toTINA/main/toTINA.mtl b/eclipse-workspace/fr.n7.petrinet.toTINA/src/fr/n7/petrinet/toTINA/main/toTINA.mtl index 2dbe4c0..1eb0768 100644 --- a/eclipse-workspace/fr.n7.petrinet.toTINA/src/fr/n7/petrinet/toTINA/main/toTINA.mtl +++ b/eclipse-workspace/fr.n7.petrinet.toTINA/src/fr/n7/petrinet/toTINA/main/toTINA.mtl @@ -40,5 +40,5 @@ pl [place.name/] ([place.tokens/]) [template public afficher(t : Transition) post (trim()) ] [comment][let outgoing = t.getArcs()->select( e | e.isOutgoing() ) /][/comment] -tr [t.name/] [for (a : Arc | t.arcs)][if (not a.outgoing)][a.target.name/]*[a.weight/] [/if][/for]-> [for (a : Arc | t.arcs)][if (a.outgoing)][a.target.name/]*[a.weight/][/if][/for] +tr [t.name/] [for (a : Arc | t.arcs)][if (not a.outgoing)][a.target.name/]*[a.weight/] [/if][/for]-> [for (a : Arc | t.arcs)][if (a.outgoing)][a.target.name/]*[a.weight/] [/if][/for] [/template] \ No newline at end of file diff --git a/eclipse-workspace/fr.n7.simplepdl/models/Developpement_petrinet.xmi b/eclipse-workspace/fr.n7.simplepdl/models/Developpement_petrinet.xmi new file mode 100644 index 0000000..22698a8 --- /dev/null +++ b/eclipse-workspace/fr.n7.simplepdl/models/Developpement_petrinet.xmi @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eclipse-workspace/fr.n7.simplepdl/src/simplepdl/manip/simplepdl2petrinet.java b/eclipse-workspace/fr.n7.simplepdl/src/simplepdl/manip/simplepdl2petrinet.java index 8f0d125..8990466 100644 --- a/eclipse-workspace/fr.n7.simplepdl/src/simplepdl/manip/simplepdl2petrinet.java +++ b/eclipse-workspace/fr.n7.simplepdl/src/simplepdl/manip/simplepdl2petrinet.java @@ -15,6 +15,7 @@ import petrinet.Place; import petrinet.Transition; import petrinet.Arc; import petrinet.Network; +import petrinet.Node; import petrinet.PetrinetFactory; import simplepdl.Process; import simplepdl.WorkDefinition; @@ -58,17 +59,19 @@ public class simplepdl2petrinet { if (o instanceof WorkDefinition) { WorkDefinition wd = (WorkDefinition) o; String name = wd.getName(); - System.out.println(" - " + name); Place idle = myFactory.createPlace(); idle.setName(name + "_idle"); idle.setTokens(1); + Place started = myFactory.createPlace(); + started.setName(name + "_started"); + started.setTokens(0); Place running = myFactory.createPlace(); running.setName(name + "_running"); - running.setTokens(1); + running.setTokens(0); Place finished = myFactory.createPlace(); finished.setName(name + "_finished"); - finished.setTokens(1); + finished.setTokens(0); Arc pause2start = myFactory.createArc(); pause2start.setTarget(idle); @@ -78,10 +81,15 @@ public class simplepdl2petrinet { start2running.setTarget(running); start2running.setOutgoing(true); start2running.setWeight(1); + Arc start2started = myFactory.createArc(); + start2started.setTarget(started); + start2started.setOutgoing(true); + start2started.setWeight(1); Transition start = myFactory.createTransition(); start.setName(name + "_start"); start.getArcs().add(pause2start); start.getArcs().add(start2running); + start.getArcs().add(start2started); Arc running2finish = myFactory.createArc(); running2finish.setTarget(running); @@ -95,19 +103,78 @@ public class simplepdl2petrinet { finish.setName(name + "_finish"); finish.getArcs().add(running2finish); finish.getArcs().add(finish2finished); - - System.out.println(" + " + idle.getName() + " (" + idle.getTokens() + ")"); - + network.getNodes().add(idle); network.getNodes().add(start); + network.getNodes().add(started); network.getNodes().add(running); network.getNodes().add(finish); network.getNodes().add(finished); } } + // Conversion des WorkSequence en Node et Transition + for (Object o : process.getProcessElements()) { + if (o instanceof WorkSequence) { + WorkSequence ws = (WorkSequence) o; + WorkSequenceType type = ws.getLinkType(); + WorkDefinition predecessor = ws.getPredecessor(); + WorkDefinition successor = ws.getSuccessor(); + + // creation des suffixs permettant la recherche des noeuds + String predecessor_suffix = new String(); + String successor_suffix = new String(); + switch (type) { + case START_TO_START: + predecessor_suffix = "_started"; + successor_suffix = "_start"; + break; + case START_TO_FINISH: + predecessor_suffix = "_started"; + successor_suffix = "_finished"; + break; + case FINISH_TO_START: + predecessor_suffix = "_finished"; + successor_suffix = "_start"; + break; + case FINISH_TO_FINISH: + predecessor_suffix = "_finished"; + successor_suffix = "_finish"; + break; + default: + System.out.print("the fuck ?"); + break; + } + + // creation du read-arc + Arc arc1 = myFactory.createArc(); + arc1.setOutgoing(false); + arc1.setWeight(1); + Arc arc2 = myFactory.createArc(); + arc2.setOutgoing(true); + arc2.setWeight(1); + + for (Node node : network.getNodes()) { + if (node instanceof Place) { + Place place = (Place) node; + if (place.getName().equals(predecessor.getName() + predecessor_suffix)) { + arc1.setTarget(place); + arc2.setTarget(place); + } + } + if (node instanceof Transition) { + Transition transition = (Transition) node; + if (transition.getName().equals(successor.getName() + successor_suffix)) { + transition.getArcs().add(arc1); + transition.getArcs().add(arc2); + } + } + } + } + } + // Créer le nouveau xmi (modèle convertit) - URI convURI = URI.createURI("models/test.xmi"); + URI convURI = URI.createURI("models/Developpement_petrinet.xmi"); Resource conv = resSet.createResource(convURI); // Ajouter le Network dans le nouveau modèle