diff --git a/eclipse-workspace/.metadata/.log b/eclipse-workspace/.metadata/.log index d625042..c5e54ec 100644 --- a/eclipse-workspace/.metadata/.log +++ b/eclipse-workspace/.metadata/.log @@ -1,477 +1,33 @@ -!ENTRY fr.n7.simplepdl.toHTML.ui 4 0 2021-10-09 21:26:13.352 -!MESSAGE '/fr/n7/simplepdl/toHTML/main/toHTML.emtl' not found +!ENTRY org.eclipse.emf.cdo.explorer 4 0 2021-10-10 00:17:27.091 +!MESSAGE InterruptedException !STACK 0 -java.io.IOException: '/fr/n7/simplepdl/toHTML/main/toHTML.emtl' not found - at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.initialize(AbstractAcceleoGenerator.java:481) - at fr.n7.simplepdl.toHTML.main.ToHTML.(ToHTML.java:91) - at fr.n7.simplepdl.toHTML.ui.common.GenerateAll.doGenerate(GenerateAll.java:77) - at fr.n7.simplepdl.toHTML.ui.popupMenus.AcceleoGenerateToHTMLAction$1.run(AcceleoGenerateToHTMLAction.java:78) - at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122) - -!ENTRY org.eclipse.jdt.core 4 969 2021-10-09 22:03:20.149 -!MESSAGE fr.n7.petrinet.toTINA.ui does not exist - -!ENTRY org.eclipse.jdt.core 4 969 2021-10-09 22:03:20.151 -!MESSAGE fr.n7.petrinet.toTINA.ui does not exist - -!ENTRY org.eclipse.jdt.core 4 969 2021-10-09 22:03:20.154 -!MESSAGE fr.n7.petrinet.toTINA.ui does not exist - -!ENTRY org.eclipse.jdt.core 4 969 2021-10-09 22:03:20.166 -!MESSAGE fr.n7.petrinet.toTINA.ui does not exist - -!ENTRY org.eclipse.ui 4 0 2021-10-09 22:13:54.733 -!MESSAGE Unhandled event loop exception -!STACK 0 -java.lang.NullPointerException - at org.eclipse.ui.internal.PartSite.getKeyBindingService(PartSite.java:549) - at org.eclipse.ui.part.MultiPageEditorPart.deactivateSite(MultiPageEditorPart.java:869) - at org.eclipse.ui.part.MultiPageEditorPart.dispose(MultiPageEditorPart.java:482) - at org.eclipse.sirius.editor.editorPlugin.SiriusEditor.dispose(SiriusEditor.java:1342) - at org.eclipse.sirius.editor.tools.internal.presentation.CustomSiriusEditor.dispose(CustomSiriusEditor.java:465) - at org.eclipse.sirius.editor.editorPlugin.SiriusEditor$3$1.run(SiriusEditor.java:423) - at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40) - at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185) - at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4988) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4510) - at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:166) - at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:368) - at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.run(RefactoringWizardDialog2.java:324) - at org.eclipse.ltk.ui.refactoring.RefactoringWizard.internalPerformFinish(RefactoringWizard.java:636) - at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.performFinish(UserInputWizardPage.java:148) - at org.eclipse.ltk.ui.refactoring.resource.DeleteResourcesWizard$DeleteResourcesRefactoringConfigurationPage.performFinish(DeleteResourcesWizard.java:284) - at org.eclipse.ltk.ui.refactoring.RefactoringWizard.performFinish(RefactoringWizard.java:710) - at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.okPressed(RefactoringWizardDialog2.java:450) - at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:468) - at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:619) - at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84) - at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5745) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1427) - at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5013) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4507) - at org.eclipse.jface.window.Window.runEventLoop(Window.java:823) - at org.eclipse.jface.window.Window.open(Window.java:799) - at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.lambda$0(RefactoringWizardOpenOperation.java:190) - at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74) - at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:209) - at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:126) - at org.eclipse.ltk.internal.ui.refactoring.actions.DeleteResourcesHandler.execute(DeleteResourcesHandler.java:44) - at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283) - at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97) - at jdk.internal.reflect.GeneratedMethodAccessor83.invoke(Unknown Source) - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.base/java.lang.reflect.Method.invoke(Method.java:566) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58) - at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:319) - at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:253) - at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173) - at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156) - at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488) - at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487) - at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213) - at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommandInContext(LegacyHandlerService.java:440) - at org.eclipse.ui.internal.ide.actions.LTKLauncher.runCommand(LTKLauncher.java:140) - at org.eclipse.ui.internal.ide.actions.LTKLauncher.openDeleteWizard(LTKLauncher.java:57) - at org.eclipse.ui.actions.DeleteResourceAction.run(DeleteResourceAction.java:452) - at org.eclipse.jdt.internal.ui.refactoring.reorg.DeleteAction.run(DeleteAction.java:196) - at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274) - at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:252) - at org.eclipse.jface.action.Action.runWithEvent(Action.java:474) - at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:121) - at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97) - at jdk.internal.reflect.GeneratedMethodAccessor83.invoke(Unknown Source) - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.base/java.lang.reflect.Method.invoke(Method.java:566) - at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58) - at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:319) - at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:253) - at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173) - at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156) - at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488) - at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487) - at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213) - at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:308) - at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:584) - at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:653) - at org.eclipse.e4.ui.bindings.keys.OutOfOrderListener.handleEvent(OutOfOrderListener.java:75) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5745) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1427) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1453) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1436) - at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1475) - at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:838) - at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:4021) - at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:850) - at org.eclipse.swt.widgets.Tree.gtk_key_press_event(Tree.java:2294) - at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2326) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:6795) - at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:4206) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5979) - at org.eclipse.swt.internal.gtk.GTK.gtk_main_do_event(Native Method) - at org.eclipse.swt.widgets.Display.eventProc(Display.java:1517) - at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(Native Method) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4505) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:153) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.base/java.lang.reflect.Method.invoke(Method.java:566) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594) - at org.eclipse.equinox.launcher.Main.run(Main.java:1465) - at org.eclipse.equinox.launcher.Main.main(Main.java:1438) - -!ENTRY org.eclipse.acceleo.parser 4 0 2021-10-09 22:23:58.397 -!MESSAGE Compilation error for expression [name/] : Unrecognized variable: (name) - -!ENTRY org.eclipse.acceleo.parser 4 0 2021-10-09 22:23:58.406 -!MESSAGE Compilation error for expression [name/] : Unrecognized variable: (name) - -!ENTRY org.eclipse.acceleo.parser 4 0 2021-10-09 22:23:58.413 -!MESSAGE Compilation error for expression [name/] : Unrecognized variable: (name) - -!ENTRY org.eclipse.acceleo.parser 4 0 2021-10-09 22:23:58.420 -!MESSAGE Compilation error for expression [name/] : Unrecognized variable: (name) - -!ENTRY org.eclipse.acceleo.parser 4 0 2021-10-09 22:23:58.427 -!MESSAGE Compilation error for expression [name/] : Unrecognized variable: (name) - -!ENTRY org.eclipse.jface 4 2 2021-10-09 22:41:40.936 -!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface". -!STACK 0 -java.lang.NullPointerException - at simplepdl.provider.RequestItemProvider.getText(RequestItemProvider.java:133) - at org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider.getText(AdapterFactoryLabelProvider.java:424) - at org.eclipse.jface.viewers.WrappedViewerLabelProvider.getText(WrappedViewerLabelProvider.java:99) - at org.eclipse.jface.viewers.WrappedViewerLabelProvider.update(WrappedViewerLabelProvider.java:148) - at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:144) - at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:959) - at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:126) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) - at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174) - at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1037) - at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:427) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) - at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174) - at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2111) - at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:853) - at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:831) - at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:604) - at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:779) - at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpand(AbstractTreeViewer.java:1690) - at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:2557) - at org.eclipse.jface.viewers.StructuredViewer.setSelectionToWidget(StructuredViewer.java:1704) - at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:3029) - at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1660) - at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1084) - at simplepdl.presentation.SimplepdlEditor$5.run(SimplepdlEditor.java:773) - at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40) - at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185) - at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4988) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4510) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:153) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.base/java.lang.reflect.Method.invoke(Method.java:566) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594) - at org.eclipse.equinox.launcher.Main.run(Main.java:1465) - at org.eclipse.equinox.launcher.Main.main(Main.java:1438) - -!ENTRY org.eclipse.jface 4 2 2021-10-09 22:41:40.988 -!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface". -!STACK 0 -java.lang.NullPointerException - at simplepdl.provider.RequestItemProvider.getText(RequestItemProvider.java:133) - at org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator.getText(AdapterFactoryItemDelegator.java:84) - at simplepdl.presentation.SimplepdlEditor.setStatusLineManager(SimplepdlEditor.java:1711) - at simplepdl.presentation.SimplepdlEditor.setSelection(SimplepdlEditor.java:1690) - at simplepdl.presentation.SimplepdlEditor$6.selectionChanged(SimplepdlEditor.java:886) - at org.eclipse.jface.viewers.Viewer$1.run(Viewer.java:151) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) - at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174) - at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:148) - at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2132) - at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1662) - at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1084) - at simplepdl.presentation.SimplepdlEditor$5.run(SimplepdlEditor.java:773) - at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40) - at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185) - at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4988) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4510) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:153) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.base/java.lang.reflect.Method.invoke(Method.java:566) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594) - at org.eclipse.equinox.launcher.Main.run(Main.java:1465) - at org.eclipse.equinox.launcher.Main.main(Main.java:1438) - -!ENTRY org.eclipse.jface 4 2 2021-10-09 22:42:00.253 -!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface". -!STACK 0 -java.lang.NullPointerException - at simplepdl.provider.RequestItemProvider.getText(RequestItemProvider.java:133) - at org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator.getText(AdapterFactoryItemDelegator.java:84) - at simplepdl.presentation.SimplepdlEditor.setStatusLineManager(SimplepdlEditor.java:1711) - at simplepdl.presentation.SimplepdlEditor.setSelection(SimplepdlEditor.java:1690) - at simplepdl.presentation.SimplepdlEditor$6.selectionChanged(SimplepdlEditor.java:886) - at org.eclipse.jface.viewers.Viewer$1.run(Viewer.java:151) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) - at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174) - at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:148) - at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2132) - at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1178) - at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1207) - at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:242) - at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:237) - at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:402) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5745) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1427) - at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5013) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4507) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:153) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.base/java.lang.reflect.Method.invoke(Method.java:566) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594) - at org.eclipse.equinox.launcher.Main.run(Main.java:1465) - at org.eclipse.equinox.launcher.Main.main(Main.java:1438) - -!ENTRY org.eclipse.ui.workbench 4 2 2021-10-09 22:42:03.727 -!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench". -!STACK 0 -java.lang.NullPointerException - at simplepdl.provider.RequestItemProvider.getText(RequestItemProvider.java:133) - at org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator.getText(AdapterFactoryItemDelegator.java:84) - at simplepdl.presentation.SimplepdlEditor.setStatusLineManager(SimplepdlEditor.java:1711) - at simplepdl.presentation.SimplepdlEditor.setSelection(SimplepdlEditor.java:1690) - at simplepdl.presentation.SimplepdlEditor.handleActivate(SimplepdlEditor.java:553) - at simplepdl.presentation.SimplepdlEditor$1.partActivated(SimplepdlEditor.java:339) - at org.eclipse.ui.internal.WorkbenchPage$3.run(WorkbenchPage.java:4896) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) - at org.eclipse.ui.internal.WorkbenchPage.firePartActivated(WorkbenchPage.java:4893) - at org.eclipse.ui.internal.WorkbenchPage.access$3(WorkbenchPage.java:4878) - at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partActivated(WorkbenchPage.java:219) - at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$2.run(PartServiceImpl.java:249) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) - at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.firePartActivated(PartServiceImpl.java:246) - at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:770) - at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:679) - at org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer.activate(AbstractPartRenderer.java:97) - at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.lambda$0(ContributedPartRenderer.java:63) - at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) - at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5745) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1427) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1453) - at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1436) - at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:2129) - at org.eclipse.swt.widgets.Control.gtk_button_press_event(Control.java:3649) - at org.eclipse.swt.widgets.Control.gtk_button_press_event(Control.java:3532) - at org.eclipse.swt.widgets.Composite.gtk_button_press_event(Composite.java:829) - at org.eclipse.swt.widgets.Tree.gtk_button_press_event(Tree.java:2158) - at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2309) - at org.eclipse.swt.widgets.Control.windowProc(Control.java:6795) - at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:4206) - at org.eclipse.swt.widgets.Display.windowProc(Display.java:5979) - at org.eclipse.swt.internal.gtk.GTK.gtk_main_do_event(Native Method) - at org.eclipse.swt.widgets.Display.eventProc(Display.java:1517) - at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(Native Method) - at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4505) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) - at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046) - at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) - at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644) - at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) - at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551) - at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:153) - at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150) - at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) - at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) - at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.base/java.lang.reflect.Method.invoke(Method.java:566) - at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657) - at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594) - at org.eclipse.equinox.launcher.Main.run(Main.java:1465) - at org.eclipse.equinox.launcher.Main.main(Main.java:1438) - -!ENTRY org.eclipse.sirius 2 0 2021-10-09 22:42:16.170 -!MESSAGE the following edge mapping source finder expression could not be correctly evaluated : feature:requests -!STACK 0 -org.eclipse.sirius.common.tools.api.interpreter.EvaluationException: Unknown feature name requests - at org.eclipse.sirius.common.tools.internal.interpreter.FeatureInterpreter.evaluate(FeatureInterpreter.java:98) - at org.eclipse.sirius.tools.internal.interpreter.SessionInterpreter.evaluate(SessionInterpreter.java:179) - at org.eclipse.sirius.common.tools.api.interpreter.IInterpreter.evaluateCollection(IInterpreter.java:148) - at org.eclipse.sirius.diagram.business.api.query.EdgeMappingQuery.evaluateSourceFinderExpression(EdgeMappingQuery.java:148) - at org.eclipse.sirius.diagram.business.internal.sync.DEdgeSynchronizerHelper.handleCandidatesFromSemanticTargets(DEdgeSynchronizerHelper.java:203) - at org.eclipse.sirius.diagram.business.internal.sync.DEdgeSynchronizerHelper.computeEdgeCandidatesWithDomain(DEdgeSynchronizerHelper.java:129) - at org.eclipse.sirius.diagram.business.internal.sync.DEdgeSynchronizerHelper.computeNowEdgeCandidates(DEdgeSynchronizerHelper.java:108) - at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.computeEdgeCandidates(DDiagramSynchronizer.java:1004) - at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.createEdgeCandidates(DDiagramSynchronizer.java:1272) - at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.refreshEdgeMapping(DDiagramSynchronizer.java:1224) - at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.processEdgeMappingsRefresh(DDiagramSynchronizer.java:481) - at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.refreshOperation(DDiagramSynchronizer.java:396) - at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.refresh(DDiagramSynchronizer.java:317) - at org.eclipse.sirius.diagram.business.internal.dialect.DiagramDialectServices.refresh(DiagramDialectServices.java:240) - at org.eclipse.sirius.business.internal.dialect.DialectManagerImpl.refresh(DialectManagerImpl.java:106) - at org.eclipse.sirius.business.api.dialect.command.RefreshRepresentationsCommand.doExecute(RefreshRepresentationsCommand.java:124) - at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135) - at org.eclipse.emf.common.command.CompoundCommand.execute(CompoundCommand.java:261) - at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFCommandOperation.java:119) - at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150) - at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:496) - at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208) - at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165) - at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219) - at org.eclipse.sirius.tools.api.ui.RefreshEditorsPrecommitListener.notify(RefreshEditorsPrecommitListener.java:260) - at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.notifyListeners(DAnalysisSessionImpl.java:1253) - at org.eclipse.sirius.business.internal.session.danalysis.SessionResourcesSynchronizer.reloadResource(SessionResourcesSynchronizer.java:237) - at org.eclipse.sirius.business.internal.session.danalysis.SessionResourcesSynchronizer.processAction(SessionResourcesSynchronizer.java:174) - at org.eclipse.sirius.business.internal.session.danalysis.SessionResourcesSynchronizer.processActions(SessionResourcesSynchronizer.java:163) - at org.eclipse.sirius.business.internal.session.danalysis.SessionResourcesSynchronizer.statusesChanged(SessionResourcesSynchronizer.java:113) - at org.eclipse.sirius.common.tools.api.resource.ResourceSetSync.notifyClientsInBatch(ResourceSetSync.java:424) - at org.eclipse.sirius.common.tools.api.resource.ResourceSetSync.statusesChanged(ResourceSetSync.java:479) - at org.eclipse.sirius.common.tools.internal.resource.ResourceSyncClientNotifier.run(ResourceSyncClientNotifier.java:80) - at org.eclipse.sirius.common.tools.internal.resource.EditingSessionWorkspaceListener.resourceChanged(EditingSessionWorkspaceListener.java:63) - at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:305) - at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) - at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:295) - at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:158) - at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:380) - at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1502) - at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2306) - at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2317) - at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:131) - at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122) - -!ENTRY org.eclipse.sirius 2 0 2021-10-09 22:44:35.000 -!MESSAGE the following edge mapping source finder expression could not be correctly evaluated : feature:requests -!STACK 0 -org.eclipse.sirius.common.tools.api.interpreter.EvaluationException: Unknown feature name requests - at org.eclipse.sirius.common.tools.internal.interpreter.FeatureInterpreter.evaluate(FeatureInterpreter.java:98) - at org.eclipse.sirius.tools.internal.interpreter.SessionInterpreter.evaluate(SessionInterpreter.java:179) - at org.eclipse.sirius.common.tools.api.interpreter.IInterpreter.evaluateCollection(IInterpreter.java:148) - at org.eclipse.sirius.diagram.business.api.query.EdgeMappingQuery.evaluateSourceFinderExpression(EdgeMappingQuery.java:148) - at org.eclipse.sirius.diagram.business.internal.sync.DEdgeSynchronizerHelper.handleCandidatesFromSemanticTargets(DEdgeSynchronizerHelper.java:203) - at org.eclipse.sirius.diagram.business.internal.sync.DEdgeSynchronizerHelper.computeEdgeCandidatesWithDomain(DEdgeSynchronizerHelper.java:129) - at org.eclipse.sirius.diagram.business.internal.sync.DEdgeSynchronizerHelper.computeNowEdgeCandidates(DEdgeSynchronizerHelper.java:108) - at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.computeEdgeCandidates(DDiagramSynchronizer.java:1004) - at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.createEdgeCandidates(DDiagramSynchronizer.java:1272) - at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.refreshEdgeMapping(DDiagramSynchronizer.java:1224) - at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.processEdgeMappingsRefresh(DDiagramSynchronizer.java:481) - at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.refreshOperation(DDiagramSynchronizer.java:396) - at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.refresh(DDiagramSynchronizer.java:317) - at org.eclipse.sirius.diagram.business.internal.dialect.DiagramDialectServices.refresh(DiagramDialectServices.java:240) - at org.eclipse.sirius.business.internal.dialect.DialectManagerImpl.refresh(DialectManagerImpl.java:106) - at org.eclipse.sirius.business.api.dialect.command.RefreshRepresentationsCommand.doExecute(RefreshRepresentationsCommand.java:124) - at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135) - at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFCommandOperation.java:119) - at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150) - at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:496) - at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208) - at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165) - at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219) - at org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramEditorImpl.launchRefresh(DDiagramEditorImpl.java:1480) - at org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramEditorImpl.access$2(DDiagramEditorImpl.java:1451) - at org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramEditorImpl$1.run(DDiagramEditorImpl.java:796) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) - -!ENTRY org.eclipse.sirius 2 0 2021-10-09 23:01:57.687 -!MESSAGE the following edge mapping source finder expression could not be correctly evaluated : feature:requests -!STACK 0 -org.eclipse.sirius.common.tools.api.interpreter.EvaluationException: Unknown feature name requests - at org.eclipse.sirius.common.tools.internal.interpreter.FeatureInterpreter.evaluate(FeatureInterpreter.java:98) - at org.eclipse.sirius.tools.internal.interpreter.SessionInterpreter.evaluate(SessionInterpreter.java:179) - at org.eclipse.sirius.common.tools.api.interpreter.IInterpreter.evaluateCollection(IInterpreter.java:148) - at org.eclipse.sirius.diagram.business.api.query.EdgeMappingQuery.evaluateSourceFinderExpression(EdgeMappingQuery.java:148) - at org.eclipse.sirius.diagram.business.internal.sync.DEdgeSynchronizerHelper.handleCandidatesFromSemanticTargets(DEdgeSynchronizerHelper.java:203) - at org.eclipse.sirius.diagram.business.internal.sync.DEdgeSynchronizerHelper.computeEdgeCandidatesWithDomain(DEdgeSynchronizerHelper.java:129) - at org.eclipse.sirius.diagram.business.internal.sync.DEdgeSynchronizerHelper.computeNowEdgeCandidates(DEdgeSynchronizerHelper.java:108) - at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.computeEdgeCandidates(DDiagramSynchronizer.java:1004) - at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.createEdgeCandidates(DDiagramSynchronizer.java:1272) - at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.refreshEdgeMapping(DDiagramSynchronizer.java:1224) - at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.processEdgeMappingsRefresh(DDiagramSynchronizer.java:481) - at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.refreshOperation(DDiagramSynchronizer.java:396) - at org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.refresh(DDiagramSynchronizer.java:317) - at org.eclipse.sirius.diagram.business.internal.dialect.DiagramDialectServices.refresh(DiagramDialectServices.java:240) - at org.eclipse.sirius.business.internal.dialect.DialectManagerImpl.refresh(DialectManagerImpl.java:106) - at org.eclipse.sirius.business.api.dialect.command.RefreshRepresentationsCommand.doExecute(RefreshRepresentationsCommand.java:124) - at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135) - at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFCommandOperation.java:119) - at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150) - at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:496) - at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208) - at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165) - at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219) - at org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramEditorImpl.launchRefresh(DDiagramEditorImpl.java:1480) - at org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramEditorImpl.access$2(DDiagramEditorImpl.java:1451) - at org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramEditorImpl$1.run(DDiagramEditorImpl.java:796) - at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) +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/30028daf4c29001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/11/30028daf4c29001c101babefb5abd0b0 new file mode 100644 index 0000000..dc4526a --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/11/30028daf4c29001c101babefb5abd0b0 @@ -0,0 +1,86 @@ +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 simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlFactory; +import simplepdl.SimplepdlPackage; + +public class SimplePDLCreator { + + public static void main(String[] args) { + + // Charger le package SimplePDL afin de l'enregistrer dans le registre d'Eclipse. + SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE; + 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(); + + // Définir la ressource (le modèle) + URI modelURI = URI.createURI("models/SimplePDLCreator_Created_Process.xmi"); + Resource resource = resSet.createResource(modelURI); + + // La fabrique pour fabriquer les éléments de SimplePDL + SimplepdlFactory myFactory = SimplepdlFactory.eINSTANCE; + + // Créer un élément Process + Process process = myFactory.createProcess(); + process.setName("Mon premier processus"); + + // Ajouter le Process dans le modèle + resource.getContents().add(process); + + // Ajouter deux WorkDefinitions + WorkDefinition wd1 = myFactory.createWorkDefinition(); + wd1.setName("Ma première WorkDefinition, quelle émotion"); + + WorkDefinition wd2 = myFactory.createWorkDefinition(); + wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); + + process.getProcessElements().add(wd1); + process.getProcessElements().add(wd2); + + // Ajouter une WorkSequence entre les deux WorkDefinitions + WorkSequence seq = myFactory.createWorkSequence(); + seq.setPredecessor(wd1); + seq.setSuccessor(wd2); + seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); + + process.getProcessElements().add(seq); + + // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions + WorkSequence seq2 = myFactory.createWorkSequence(); + seq2.setPredecessor(wd1); + seq2.setSuccessor(wd2); + seq2.setLinkType(WorkSequenceType.START_TO_START); + + process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/1e/f0a969be4929001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/1e/f0a969be4929001c101babefb5abd0b0 new file mode 100644 index 0000000..7e5eaf8 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/1e/f0a969be4929001c101babefb5abd0b0 @@ -0,0 +1,129 @@ +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.SimplepdlFactory; +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 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); + + Transition finish = myFactory.createTransition(); + finish.setName(name + "_finish"); + } + } +// +// // Ajouter le Process dans le modèle +// resource.getContents().add(process); +// +// // Ajouter deux WorkDefinitions +// WorkDefinition wd1 = myFactory.createWorkDefinition(); +// wd1.setName("Ma première WorkDefinition, quelle émotion"); +// +// WorkDefinition wd2 = myFactory.createWorkDefinition(); +// wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); +// +// process.getProcessElements().add(wd1); +// process.getProcessElements().add(wd2); +// +// // Ajouter une WorkSequence entre les deux WorkDefinitions +// WorkSequence seq = myFactory.createWorkSequence(); +// seq.setPredecessor(wd1); +// seq.setSuccessor(wd2); +// seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); +// +// process.getProcessElements().add(seq); +// +// // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions +// WorkSequence seq2 = myFactory.createWorkSequence(); +// seq2.setPredecessor(wd1); +// seq2.setSuccessor(wd2); +// seq2.setLinkType(WorkSequenceType.START_TO_START); +// +// process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2a/80996e0a4729001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2a/80996e0a4729001c101babefb5abd0b0 new file mode 100644 index 0000000..9149c78 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2a/80996e0a4729001c101babefb5abd0b0 @@ -0,0 +1,88 @@ +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.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlFactory; +import simplepdl.SimplepdlPackage; + +public class simplepdl2petrinet { + + public static void main(String[] args) { + + // Charger le package SimplePDL afin de l'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(); + + // Définir la ressource (le modèle) + URI modelURI = URI.createURI("models/SimplePDLCreator_Created_Process.xmi"); + Resource resource = resSet.createResource(modelURI); + + // La fabrique pour fabriquer les éléments de SimplePDL + SimplepdlFactory myFactory = SimplepdlFactory.eINSTANCE; + + // Créer un élément Process + Process process = myFactory.createProcess(); + process.setName("Mon premier processus"); + + // Ajouter le Process dans le modèle + resource.getContents().add(process); + + // Ajouter deux WorkDefinitions + WorkDefinition wd1 = myFactory.createWorkDefinition(); + wd1.setName("Ma première WorkDefinition, quelle émotion"); + + WorkDefinition wd2 = myFactory.createWorkDefinition(); + wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); + + process.getProcessElements().add(wd1); + process.getProcessElements().add(wd2); + + // Ajouter une WorkSequence entre les deux WorkDefinitions + WorkSequence seq = myFactory.createWorkSequence(); + seq.setPredecessor(wd1); + seq.setSuccessor(wd2); + seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); + + process.getProcessElements().add(seq); + + // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions + WorkSequence seq2 = myFactory.createWorkSequence(); + seq2.setPredecessor(wd1); + seq2.setSuccessor(wd2); + seq2.setLinkType(WorkSequenceType.START_TO_START); + + process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2f/1026742d4d29001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2f/1026742d4d29001c101babefb5abd0b0 new file mode 100644 index 0000000..25a7a08 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2f/1026742d4d29001c101babefb5abd0b0 @@ -0,0 +1,125 @@ +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.SimplepdlFactory; +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 resGet = new ResourceSetImpl(); + + // Charger la ressource (notre modèle) + URI modelURI = URI.createURI("pdl-sujet.xmi"); + Resource resource = resGet.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()); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Créer un objet resourceSetImpl qui contiendra une ressource EMF (le modèle) + ResourceSet resSet = new ResourceSetImpl(); + + // Créer le nouveau xmi (modèle convertit) + URI convURI = URI.createURI("test.xmi"); + Resource conv = resSet.createResource(convURI); + + // 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/2f/305600fd4629001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2f/305600fd4629001c101babefb5abd0b0 new file mode 100644 index 0000000..26fe106 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/2f/305600fd4629001c101babefb5abd0b0 @@ -0,0 +1,87 @@ +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 simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlFactory; +import simplepdl.SimplepdlPackage; + +public class simplepdl2petrinet { + + public static void main(String[] args) { + + // Charger le package SimplePDL afin de l'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(); + + // Définir la ressource (le modèle) + URI modelURI = URI.createURI("models/SimplePDLCreator_Created_Process.xmi"); + Resource resource = resSet.createResource(modelURI); + + // La fabrique pour fabriquer les éléments de SimplePDL + SimplepdlFactory myFactory = SimplepdlFactory.eINSTANCE; + + // Créer un élément Process + Process process = myFactory.createProcess(); + process.setName("Mon premier processus"); + + // Ajouter le Process dans le modèle + resource.getContents().add(process); + + // Ajouter deux WorkDefinitions + WorkDefinition wd1 = myFactory.createWorkDefinition(); + wd1.setName("Ma première WorkDefinition, quelle émotion"); + + WorkDefinition wd2 = myFactory.createWorkDefinition(); + wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); + + process.getProcessElements().add(wd1); + process.getProcessElements().add(wd2); + + // Ajouter une WorkSequence entre les deux WorkDefinitions + WorkSequence seq = myFactory.createWorkSequence(); + seq.setPredecessor(wd1); + seq.setSuccessor(wd2); + seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); + + process.getProcessElements().add(seq); + + // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions + WorkSequence seq2 = myFactory.createWorkSequence(); + seq2.setPredecessor(wd1); + seq2.setSuccessor(wd2); + seq2.setLinkType(WorkSequenceType.START_TO_START); + + process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/3/f0ca83674729001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/3/f0ca83674729001c101babefb5abd0b0 new file mode 100644 index 0000000..d3d0413 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/3/f0ca83674729001c101babefb5abd0b0 @@ -0,0 +1,88 @@ +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.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlFactory; +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(); + + // Définir la ressource (le modèle) + URI modelURI = URI.createURI("models/SimplePDL2PetriNET.xmi"); + Resource resource = resSet.createResource(modelURI); + + // La fabrique pour fabriquer les éléments de SimplePDL + SimplepdlFactory myFactory = SimplepdlFactory.eINSTANCE; + + // Créer un élément Process + Process process = myFactory.createProcess(); + process.setName("Mon premier processus"); + + // Ajouter le Process dans le modèle + resource.getContents().add(process); + + // Ajouter deux WorkDefinitions + WorkDefinition wd1 = myFactory.createWorkDefinition(); + wd1.setName("Ma première WorkDefinition, quelle émotion"); + + WorkDefinition wd2 = myFactory.createWorkDefinition(); + wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); + + process.getProcessElements().add(wd1); + process.getProcessElements().add(wd2); + + // Ajouter une WorkSequence entre les deux WorkDefinitions + WorkSequence seq = myFactory.createWorkSequence(); + seq.setPredecessor(wd1); + seq.setSuccessor(wd2); + seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); + + process.getProcessElements().add(seq); + + // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions + WorkSequence seq2 = myFactory.createWorkSequence(); + seq2.setPredecessor(wd1); + seq2.setSuccessor(wd2); + seq2.setLinkType(WorkSequenceType.START_TO_START); + + process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/4b/20db4a4f4929001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/4b/20db4a4f4929001c101babefb5abd0b0 new file mode 100644 index 0000000..c0ac3c0 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/4b/20db4a4f4929001c101babefb5abd0b0 @@ -0,0 +1,104 @@ +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.Network; +import petrinet.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlFactory; +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"); + } + } +// +// // Ajouter le Process dans le modèle +// resource.getContents().add(process); +// +// // Ajouter deux WorkDefinitions +// WorkDefinition wd1 = myFactory.createWorkDefinition(); +// wd1.setName("Ma première WorkDefinition, quelle émotion"); +// +// WorkDefinition wd2 = myFactory.createWorkDefinition(); +// wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); +// +// process.getProcessElements().add(wd1); +// process.getProcessElements().add(wd2); +// +// // Ajouter une WorkSequence entre les deux WorkDefinitions +// WorkSequence seq = myFactory.createWorkSequence(); +// seq.setPredecessor(wd1); +// seq.setSuccessor(wd2); +// seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); +// +// process.getProcessElements().add(seq); +// +// // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions +// WorkSequence seq2 = myFactory.createWorkSequence(); +// seq2.setPredecessor(wd1); +// seq2.setSuccessor(wd2); +// seq2.setLinkType(WorkSequenceType.START_TO_START); +// +// process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/58/a041dcef4e29001c15a7c9c2336a037e b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/58/a041dcef4e29001c15a7c9c2336a037e new file mode 100644 index 0000000..3435f09 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/58/a041dcef4e29001c15a7c9c2336a037e @@ -0,0 +1,22 @@ + + + + + + + + + diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/5b/d0cf346f4f29001c15a7c9c2336a037e b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/5b/d0cf346f4f29001c15a7c9c2336a037e new file mode 100644 index 0000000..30d68ee --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/5b/d0cf346f4f29001c15a7c9c2336a037e @@ -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("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/6a/d01b9a044a29001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/6a/d01b9a044a29001c101babefb5abd0b0 new file mode 100644 index 0000000..5a67a85 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/6a/d01b9a044a29001c101babefb5abd0b0 @@ -0,0 +1,145 @@ +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.SimplepdlFactory; +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 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); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } +// +// // Ajouter le Process dans le modèle +// resource.getContents().add(process); +// +// // Ajouter deux WorkDefinitions +// WorkDefinition wd1 = myFactory.createWorkDefinition(); +// wd1.setName("Ma première WorkDefinition, quelle émotion"); +// +// WorkDefinition wd2 = myFactory.createWorkDefinition(); +// wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); +// +// process.getProcessElements().add(wd1); +// process.getProcessElements().add(wd2); +// +// // Ajouter une WorkSequence entre les deux WorkDefinitions +// WorkSequence seq = myFactory.createWorkSequence(); +// seq.setPredecessor(wd1); +// seq.setSuccessor(wd2); +// seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); +// +// process.getProcessElements().add(seq); +// +// // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions +// WorkSequence seq2 = myFactory.createWorkSequence(); +// seq2.setPredecessor(wd1); +// seq2.setSuccessor(wd2); +// seq2.setLinkType(WorkSequenceType.START_TO_START); +// +// process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/6f/a0ab9def4629001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/6f/a0ab9def4629001c101babefb5abd0b0 new file mode 100644 index 0000000..1e15a1b --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/6f/a0ab9def4629001c101babefb5abd0b0 @@ -0,0 +1,86 @@ +package simplepdl.manip; + +import java.io.IOException; +import java.util.Collections; +import java.util.Map; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; + +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlFactory; +import simplepdl.SimplepdlPackage; + +public class simplepdl2petrinet { + + public static void main(String[] args) { + + // Charger le package SimplePDL afin de l'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(); + + // Définir la ressource (le modèle) + URI modelURI = URI.createURI("models/SimplePDLCreator_Created_Process.xmi"); + Resource resource = resSet.createResource(modelURI); + + // La fabrique pour fabriquer les éléments de SimplePDL + SimplepdlFactory myFactory = SimplepdlFactory.eINSTANCE; + + // Créer un élément Process + Process process = myFactory.createProcess(); + process.setName("Mon premier processus"); + + // Ajouter le Process dans le modèle + resource.getContents().add(process); + + // Ajouter deux WorkDefinitions + WorkDefinition wd1 = myFactory.createWorkDefinition(); + wd1.setName("Ma première WorkDefinition, quelle émotion"); + + WorkDefinition wd2 = myFactory.createWorkDefinition(); + wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); + + process.getProcessElements().add(wd1); + process.getProcessElements().add(wd2); + + // Ajouter une WorkSequence entre les deux WorkDefinitions + WorkSequence seq = myFactory.createWorkSequence(); + seq.setPredecessor(wd1); + seq.setSuccessor(wd2); + seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); + + process.getProcessElements().add(seq); + + // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions + WorkSequence seq2 = myFactory.createWorkSequence(); + seq2.setPredecessor(wd1); + seq2.setSuccessor(wd2); + seq2.setLinkType(WorkSequenceType.START_TO_START); + + process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/6f/d0730cc44729001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/6f/d0730cc44729001c101babefb5abd0b0 new file mode 100644 index 0000000..8fcc2d7 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/6f/d0730cc44729001c101babefb5abd0b0 @@ -0,0 +1,88 @@ +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.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlFactory; +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(); + + // Définir la ressource (le modèle) + URI modelURI = URI.createURI("models/SimplePDL2PetriNET.xmi"); + Resource resource = resSet.createResource(modelURI); + + // La fabrique pour fabriquer les éléments de SimplePDL + SimplepdlFactory myFactory = SimplepdlFactory.eINSTANCE; + + // Créer un élément Process + Process process = myFactory.createProcess(); + process.setName("Mon premier processus"); + + // Ajouter le Process dans le modèle + resource.getContents().add(process); + + // Ajouter deux WorkDefinitions + WorkDefinition wd1 = myFactory.createWorkDefinition(); + wd1.setName("Ma première WorkDefinition, quelle émotion"); + + WorkDefinition wd2 = myFactory.createWorkDefinition(); + wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); + + process.getProcessElements().add(wd1); + process.getProcessElements().add(wd2); + + // Ajouter une WorkSequence entre les deux WorkDefinitions + WorkSequence seq = myFactory.createWorkSequence(); + seq.setPredecessor(wd1); + seq.setSuccessor(wd2); + seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); + + process.getProcessElements().add(seq); + + // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions + WorkSequence seq2 = myFactory.createWorkSequence(); + seq2.setPredecessor(wd1); + seq2.setSuccessor(wd2); + seq2.setLinkType(WorkSequenceType.START_TO_START); + + process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/71/f0f4019c4c29001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/71/f0f4019c4c29001c101babefb5abd0b0 new file mode 100644 index 0000000..009a820 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/71/f0f4019c4c29001c101babefb5abd0b0 @@ -0,0 +1,120 @@ +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.SimplepdlFactory; +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); + + 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("test.xmi"); + Resource conv = resSet.createResource(convURI); + + // 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/74/50d65fb84a29001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/74/50d65fb84a29001c101babefb5abd0b0 new file mode 100644 index 0000000..b430824 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/74/50d65fb84a29001c101babefb5abd0b0 @@ -0,0 +1,115 @@ +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.SimplepdlFactory; +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("model/test.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 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); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/7a/b040fb854929001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/7a/b040fb854929001c101babefb5abd0b0 new file mode 100644 index 0000000..4e5b4ee --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/7a/b040fb854929001c101babefb5abd0b0 @@ -0,0 +1,123 @@ +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.SimplepdlFactory; +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 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); + Transition start = myFactory.createTransition(); + start.setName(name + "_start"); + + Transition finish = myFactory.createTransition(); + finish.setName(name + "_finish"); + } + } +// +// // Ajouter le Process dans le modèle +// resource.getContents().add(process); +// +// // Ajouter deux WorkDefinitions +// WorkDefinition wd1 = myFactory.createWorkDefinition(); +// wd1.setName("Ma première WorkDefinition, quelle émotion"); +// +// WorkDefinition wd2 = myFactory.createWorkDefinition(); +// wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); +// +// process.getProcessElements().add(wd1); +// process.getProcessElements().add(wd2); +// +// // Ajouter une WorkSequence entre les deux WorkDefinitions +// WorkSequence seq = myFactory.createWorkSequence(); +// seq.setPredecessor(wd1); +// seq.setSuccessor(wd2); +// seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); +// +// process.getProcessElements().add(seq); +// +// // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions +// WorkSequence seq2 = myFactory.createWorkSequence(); +// seq2.setPredecessor(wd1); +// seq2.setSuccessor(wd2); +// seq2.setLinkType(WorkSequenceType.START_TO_START); +// +// process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/84/005127714f29001c15a7c9c2336a037e b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/84/005127714f29001c15a7c9c2336a037e new file mode 100644 index 0000000..8cb6f07 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/84/005127714f29001c15a7c9c2336a037e @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/8d/f03656ad4a29001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/8d/f03656ad4a29001c101babefb5abd0b0 new file mode 100644 index 0000000..11a9b0f --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/8d/f03656ad4a29001c101babefb5abd0b0 @@ -0,0 +1,115 @@ +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.SimplepdlFactory; +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 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); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/92/d05144de4e29001c15a7c9c2336a037e b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/92/d05144de4e29001c15a7c9c2336a037e new file mode 100644 index 0000000..3435f09 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/92/d05144de4e29001c15a7c9c2336a037e @@ -0,0 +1,22 @@ + + + + + + + + + diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/93/c083ef314729001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/93/c083ef314729001c101babefb5abd0b0 new file mode 100644 index 0000000..f85f031 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/93/c083ef314729001c101babefb5abd0b0 @@ -0,0 +1,88 @@ +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.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlFactory; +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(); + + // Définir la ressource (le modèle) + URI modelURI = URI.createURI("models/SimplePDLCreator_Created_Process.xmi"); + Resource resource = resSet.createResource(modelURI); + + // La fabrique pour fabriquer les éléments de SimplePDL + SimplepdlFactory myFactory = SimplepdlFactory.eINSTANCE; + + // Créer un élément Process + Process process = myFactory.createProcess(); + process.setName("Mon premier processus"); + + // Ajouter le Process dans le modèle + resource.getContents().add(process); + + // Ajouter deux WorkDefinitions + WorkDefinition wd1 = myFactory.createWorkDefinition(); + wd1.setName("Ma première WorkDefinition, quelle émotion"); + + WorkDefinition wd2 = myFactory.createWorkDefinition(); + wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); + + process.getProcessElements().add(wd1); + process.getProcessElements().add(wd2); + + // Ajouter une WorkSequence entre les deux WorkDefinitions + WorkSequence seq = myFactory.createWorkSequence(); + seq.setPredecessor(wd1); + seq.setSuccessor(wd2); + seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); + + process.getProcessElements().add(seq); + + // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions + WorkSequence seq2 = myFactory.createWorkSequence(); + seq2.setPredecessor(wd1); + seq2.setSuccessor(wd2); + seq2.setLinkType(WorkSequenceType.START_TO_START); + + process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/9d/904f5d274d29001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/9d/904f5d274d29001c101babefb5abd0b0 new file mode 100644 index 0000000..5b43d2f --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/9d/904f5d274d29001c101babefb5abd0b0 @@ -0,0 +1,123 @@ +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.SimplepdlFactory; +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 resGet = new ResourceSetImpl(); + + // Charger la ressource (notre modèle) + URI modelURI = URI.createURI("pdl-sujet.xmi"); + Resource resource = resGet.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); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Créer un objet resourceSetImpl qui contiendra une ressource EMF (le modèle) + ResourceSet resSet = new ResourceSetImpl(); + + // Créer le nouveau xmi (modèle convertit) + URI convURI = URI.createURI("test.xmi"); + Resource conv = resSet.createResource(convURI); + + // 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/a4/d05019e94729001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/a4/d05019e94729001c101babefb5abd0b0 new file mode 100644 index 0000000..c4b2e81 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/a4/d05019e94729001c101babefb5abd0b0 @@ -0,0 +1,92 @@ +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.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlFactory; +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); + + + + + + // La fabrique pour fabriquer les éléments de SimplePDL + SimplepdlFactory myFactory = SimplepdlFactory.eINSTANCE; + + // Créer un élément Process + Process process = myFactory.createProcess(); + process.setName("Mon premier processus"); + + // Ajouter le Process dans le modèle + resource.getContents().add(process); + + // Ajouter deux WorkDefinitions + WorkDefinition wd1 = myFactory.createWorkDefinition(); + wd1.setName("Ma première WorkDefinition, quelle émotion"); + + WorkDefinition wd2 = myFactory.createWorkDefinition(); + wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); + + process.getProcessElements().add(wd1); + process.getProcessElements().add(wd2); + + // Ajouter une WorkSequence entre les deux WorkDefinitions + WorkSequence seq = myFactory.createWorkSequence(); + seq.setPredecessor(wd1); + seq.setSuccessor(wd2); + seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); + + process.getProcessElements().add(seq); + + // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions + WorkSequence seq2 = myFactory.createWorkSequence(); + seq2.setPredecessor(wd1); + seq2.setSuccessor(wd2); + seq2.setLinkType(WorkSequenceType.START_TO_START); + + process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/a9/10660fea4629001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/a9/10660fea4629001c101babefb5abd0b0 new file mode 100644 index 0000000..b007609 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/a9/10660fea4629001c101babefb5abd0b0 @@ -0,0 +1,85 @@ +package simplepdl.manip; + +import java.io.IOException; +import java.util.Collections; +import java.util.Map; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; + +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlFactory; +import simplepdl.SimplepdlPackage; + +public class simplepdl2petrinet { + + public static void main(String[] args) { + + // Charger le package SimplePDL afin de l'enregistrer dans le registre d'Eclipse. + SimplepdlPackage packageInstance = SimplepdlPackage.eINSTANCE; + + // Enregistrer l'extension ".xmi" comme devant être ouverte à + // l'aide d'un objet "XMIResourceFactoryImpl" + Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE; + Map m = reg.getExtensionToFactoryMap(); + m.put("xmi", new XMIResourceFactoryImpl()); + + // Créer un objet resourceSetImpl qui contiendra une ressource EMF (le modèle) + ResourceSet resSet = new ResourceSetImpl(); + + // Définir la ressource (le modèle) + URI modelURI = URI.createURI("models/SimplePDLCreator_Created_Process.xmi"); + Resource resource = resSet.createResource(modelURI); + + // La fabrique pour fabriquer les éléments de SimplePDL + SimplepdlFactory myFactory = SimplepdlFactory.eINSTANCE; + + // Créer un élément Process + Process process = myFactory.createProcess(); + process.setName("Mon premier processus"); + + // Ajouter le Process dans le modèle + resource.getContents().add(process); + + // Ajouter deux WorkDefinitions + WorkDefinition wd1 = myFactory.createWorkDefinition(); + wd1.setName("Ma première WorkDefinition, quelle émotion"); + + WorkDefinition wd2 = myFactory.createWorkDefinition(); + wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); + + process.getProcessElements().add(wd1); + process.getProcessElements().add(wd2); + + // Ajouter une WorkSequence entre les deux WorkDefinitions + WorkSequence seq = myFactory.createWorkSequence(); + seq.setPredecessor(wd1); + seq.setSuccessor(wd2); + seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); + + process.getProcessElements().add(seq); + + // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions + WorkSequence seq2 = myFactory.createWorkSequence(); + seq2.setPredecessor(wd1); + seq2.setSuccessor(wd2); + seq2.setLinkType(WorkSequenceType.START_TO_START); + + process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/b1/d0008e8b4e29001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/b1/d0008e8b4e29001c101babefb5abd0b0 new file mode 100644 index 0000000..9bd71f0 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/b1/d0008e8b4e29001c101babefb5abd0b0 @@ -0,0 +1,121 @@ +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("test.xmi"); + Resource conv = resSet.createResource(convURI); + + // 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/b4/90e2971e4729001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/b4/90e2971e4729001c101babefb5abd0b0 new file mode 100644 index 0000000..fc37a5a --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/b4/90e2971e4729001c101babefb5abd0b0 @@ -0,0 +1,88 @@ +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.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlFactory; +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(); + + // Définir la ressource (le modèle) + URI modelURI = URI.createURI("models/SimplePDLCreator_Created_Process.xmi"); + Resource resource = resSet.createResource(modelURI); + + // La fabrique pour fabriquer les éléments de SimplePDL + SimplepdlFactory myFactory = SimplepdlFactory.eINSTANCE; + + // Créer un élément Process + Process process = myFactory.createProcess(); + process.setName("Mon premier processus"); + + // Ajouter le Process dans le modèle + resource.getContents().add(process); + + // Ajouter deux WorkDefinitions + WorkDefinition wd1 = myFactory.createWorkDefinition(); + wd1.setName("Ma première WorkDefinition, quelle émotion"); + + WorkDefinition wd2 = myFactory.createWorkDefinition(); + wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); + + process.getProcessElements().add(wd1); + process.getProcessElements().add(wd2); + + // Ajouter une WorkSequence entre les deux WorkDefinitions + WorkSequence seq = myFactory.createWorkSequence(); + seq.setPredecessor(wd1); + seq.setSuccessor(wd2); + seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); + + process.getProcessElements().add(seq); + + // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions + WorkSequence seq2 = myFactory.createWorkSequence(); + seq2.setPredecessor(wd1); + seq2.setSuccessor(wd2); + seq2.setLinkType(WorkSequenceType.START_TO_START); + + process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/c/102560ba4829001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/c/102560ba4829001c101babefb5abd0b0 new file mode 100644 index 0000000..128517c --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/c/102560ba4829001c101babefb5abd0b0 @@ -0,0 +1,95 @@ +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.Network; +import petrinet.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlFactory; +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 + +// +// // Ajouter le Process dans le modèle +// resource.getContents().add(process); +// +// // Ajouter deux WorkDefinitions +// WorkDefinition wd1 = myFactory.createWorkDefinition(); +// wd1.setName("Ma première WorkDefinition, quelle émotion"); +// +// WorkDefinition wd2 = myFactory.createWorkDefinition(); +// wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); +// +// process.getProcessElements().add(wd1); +// process.getProcessElements().add(wd2); +// +// // Ajouter une WorkSequence entre les deux WorkDefinitions +// WorkSequence seq = myFactory.createWorkSequence(); +// seq.setPredecessor(wd1); +// seq.setSuccessor(wd2); +// seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); +// +// process.getProcessElements().add(seq); +// +// // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions +// WorkSequence seq2 = myFactory.createWorkSequence(); +// seq2.setPredecessor(wd1); +// seq2.setSuccessor(wd2); +// seq2.setLinkType(WorkSequenceType.START_TO_START); +// +// process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/c0/9003c0ee4b29001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/c0/9003c0ee4b29001c101babefb5abd0b0 new file mode 100644 index 0000000..cf4fbb8 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/c0/9003c0ee4b29001c101babefb5abd0b0 @@ -0,0 +1,119 @@ +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.SimplepdlFactory; +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); + + // Créer la ressource (modèle convertit) + URI convURI = URI.createURI("test.xmi"); + Resource conv = resSet.getResource(convURI, 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 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); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // 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/c2/60a16f214c29001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/c2/60a16f214c29001c101babefb5abd0b0 new file mode 100644 index 0000000..82e5050 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/c2/60a16f214c29001c101babefb5abd0b0 @@ -0,0 +1,119 @@ +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.SimplepdlFactory; +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); + + // Créer la ressource (modèle convertit) + URI convURI = URI.createURI("test.xmi"); + Resource conv = resSet.createResource(convURI); + + // 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 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); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // 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/cb/b0c591454b29001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/cb/b0c591454b29001c101babefb5abd0b0 new file mode 100644 index 0000000..75e9156 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/cb/b0c591454b29001c101babefb5abd0b0 @@ -0,0 +1,119 @@ +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.SimplepdlFactory; +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); + + // Créer la ressource (modèle convertit) + URI convURI = URI.createURI("test.xmi"); + Resource conv = resSet.getResource(convURI, 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 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); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/d1/f02d90194e29001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/d1/f02d90194e29001c101babefb5abd0b0 new file mode 100644 index 0000000..b19f539 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/d1/f02d90194e29001c101babefb5abd0b0 @@ -0,0 +1,125 @@ +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.SimplepdlFactory; +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 resGet = new ResourceSetImpl(); + + // Charger la ressource (notre modèle) + URI modelURI = URI.createURI("pdl-sujet.xmi"); + Resource resource = resGet.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 un objet resourceSetImpl qui contiendra une ressource EMF (le modèle) + ResourceSet resSet = new ResourceSetImpl(); + + // Créer le nouveau xmi (modèle convertit) + URI convURI = URI.createURI("test.xmi"); + Resource conv = resSet.createResource(convURI); + + // 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/d2/f061da4b4829001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/d2/f061da4b4829001c101babefb5abd0b0 new file mode 100644 index 0000000..9f194eb --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/d2/f061da4b4829001c101babefb5abd0b0 @@ -0,0 +1,91 @@ +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.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlFactory; +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 Process + Process process = myFactory.createProcess(); + process.setName("Mon premier processus"); + + // Ajouter le Process dans le modèle + resource.getContents().add(process); + + // Ajouter deux WorkDefinitions + WorkDefinition wd1 = myFactory.createWorkDefinition(); + wd1.setName("Ma première WorkDefinition, quelle émotion"); + + WorkDefinition wd2 = myFactory.createWorkDefinition(); + wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); + + process.getProcessElements().add(wd1); + process.getProcessElements().add(wd2); + + // Ajouter une WorkSequence entre les deux WorkDefinitions + WorkSequence seq = myFactory.createWorkSequence(); + seq.setPredecessor(wd1); + seq.setSuccessor(wd2); + seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); + + process.getProcessElements().add(seq); + + // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions + WorkSequence seq2 = myFactory.createWorkSequence(); + seq2.setPredecessor(wd1); + seq2.setSuccessor(wd2); + seq2.setLinkType(WorkSequenceType.START_TO_START); + + process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/d9/90a6d1754c29001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/d9/90a6d1754c29001c101babefb5abd0b0 new file mode 100644 index 0000000..b882797 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/d9/90a6d1754c29001c101babefb5abd0b0 @@ -0,0 +1,120 @@ +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.SimplepdlFactory; +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); + + // Créer la ressource (modèle convertit) + URI convURI = URI.createURI("test.xmi"); + Resource conv = resSet.createResource(convURI); + + // 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); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // 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/db/d0f6c8604829001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/db/d0f6c8604829001c101babefb5abd0b0 new file mode 100644 index 0000000..f013141 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/db/d0f6c8604829001c101babefb5abd0b0 @@ -0,0 +1,92 @@ +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.Network; +import petrinet.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlFactory; +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()); +// +// // Ajouter le Process dans le modèle +// resource.getContents().add(process); +// +// // Ajouter deux WorkDefinitions +// WorkDefinition wd1 = myFactory.createWorkDefinition(); +// wd1.setName("Ma première WorkDefinition, quelle émotion"); +// +// WorkDefinition wd2 = myFactory.createWorkDefinition(); +// wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); +// +// process.getProcessElements().add(wd1); +// process.getProcessElements().add(wd2); +// +// // Ajouter une WorkSequence entre les deux WorkDefinitions +// WorkSequence seq = myFactory.createWorkSequence(); +// seq.setPredecessor(wd1); +// seq.setSuccessor(wd2); +// seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); +// +// process.getProcessElements().add(seq); +// +// // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions +// WorkSequence seq2 = myFactory.createWorkSequence(); +// seq2.setPredecessor(wd1); +// seq2.setSuccessor(wd2); +// seq2.setLinkType(WorkSequenceType.START_TO_START); +// +// process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/e1/8098e7234729001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/e1/8098e7234729001c101babefb5abd0b0 new file mode 100644 index 0000000..9d966df --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/e1/8098e7234729001c101babefb5abd0b0 @@ -0,0 +1,88 @@ +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.PetrinetFactory; +import simplepdl.Process; +import simplepdl.WorkDefinition; +import simplepdl.WorkSequence; +import simplepdl.WorkSequenceType; +import simplepdl.SimplepdlFactory; +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(); + + // Définir la ressource (le modèle) + URI modelURI = URI.createURI("models/SimplePDLCreator_Created_Process.xmi"); + Resource resource = resSet.createResource(modelURI); + + // La fabrique pour fabriquer les éléments de SimplePDL + SimplepdlFactory myFactory = SimplepdlFactory.eINSTANCE; + + // Créer un élément Process + Process process = myFactory.createProcess(); + process.setName("Mon premier processus"); + + // Ajouter le Process dans le modèle + resource.getContents().add(process); + + // Ajouter deux WorkDefinitions + WorkDefinition wd1 = myFactory.createWorkDefinition(); + wd1.setName("Ma première WorkDefinition, quelle émotion"); + + WorkDefinition wd2 = myFactory.createWorkDefinition(); + wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); + + process.getProcessElements().add(wd1); + process.getProcessElements().add(wd2); + + // Ajouter une WorkSequence entre les deux WorkDefinitions + WorkSequence seq = myFactory.createWorkSequence(); + seq.setPredecessor(wd1); + seq.setSuccessor(wd2); + seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); + + process.getProcessElements().add(seq); + + // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions + WorkSequence seq2 = myFactory.createWorkSequence(); + seq2.setPredecessor(wd1); + seq2.setSuccessor(wd2); + seq2.setLinkType(WorkSequenceType.START_TO_START); + + process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/e4/007ba4614e29001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/e4/007ba4614e29001c101babefb5abd0b0 new file mode 100644 index 0000000..930e3f5 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/e4/007ba4614e29001c101babefb5abd0b0 @@ -0,0 +1,122 @@ +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.SimplepdlFactory; +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("test.xmi"); + Resource conv = resSet.createResource(convURI); + + // 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/e4/009e2afe4929001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/e4/009e2afe4929001c101babefb5abd0b0 new file mode 100644 index 0000000..ec13165 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/e4/009e2afe4929001c101babefb5abd0b0 @@ -0,0 +1,139 @@ +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.SimplepdlFactory; +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 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); + } + } +// +// // Ajouter le Process dans le modèle +// resource.getContents().add(process); +// +// // Ajouter deux WorkDefinitions +// WorkDefinition wd1 = myFactory.createWorkDefinition(); +// wd1.setName("Ma première WorkDefinition, quelle émotion"); +// +// WorkDefinition wd2 = myFactory.createWorkDefinition(); +// wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); +// +// process.getProcessElements().add(wd1); +// process.getProcessElements().add(wd2); +// +// // Ajouter une WorkSequence entre les deux WorkDefinitions +// WorkSequence seq = myFactory.createWorkSequence(); +// seq.setPredecessor(wd1); +// seq.setSuccessor(wd2); +// seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); +// +// process.getProcessElements().add(seq); +// +// // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions +// WorkSequence seq2 = myFactory.createWorkSequence(); +// seq2.setPredecessor(wd1); +// seq2.setSuccessor(wd2); +// seq2.setLinkType(WorkSequenceType.START_TO_START); +// +// process.getProcessElements().add(seq2); + + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/e4/7011ad414b29001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/e4/7011ad414b29001c101babefb5abd0b0 new file mode 100644 index 0000000..52b6f60 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/e4/7011ad414b29001c101babefb5abd0b0 @@ -0,0 +1,119 @@ +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.SimplepdlFactory; +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); + + // Créer la ressource (modèle convertit) + URI modelURI = URI.createURI("test.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 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); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/e9/e0da08204b29001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/e9/e0da08204b29001c101babefb5abd0b0 new file mode 100644 index 0000000..11a9b0f --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/e9/e0da08204b29001c101babefb5abd0b0 @@ -0,0 +1,115 @@ +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.SimplepdlFactory; +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 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); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Sauver la ressource + try { + resource.save(Collections.EMPTY_MAP); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/f2/70b3c7414d29001c101babefb5abd0b0 b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/f2/70b3c7414d29001c101babefb5abd0b0 new file mode 100644 index 0000000..998ac8f --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.history/f2/70b3c7414d29001c101babefb5abd0b0 @@ -0,0 +1,125 @@ +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.SimplepdlFactory; +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 resGet = new ResourceSetImpl(); + + // Charger la ressource (notre modèle) + URI modelURI = URI.createURI("pdl-sujet.xmi"); + Resource resource = resGet.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()); + + network.getNodes().add(idle); + network.getNodes().add(start); + network.getNodes().add(running); + network.getNodes().add(finish); + network.getNodes().add(finished); + } + } + + // Créer un objet resourceSetImpl qui contiendra une ressource EMF (le modèle) + ResourceSet resSet = new ResourceSetImpl(); + + // Créer le nouveau xmi (modèle convertit) + URI convURI = URI.createURI("test.xmi"); + Resource conv = resSet.createResource(convURI); + + // 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/.projects/fr.n7.petrinet.design/.indexes/4/history.index b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.design/.indexes/4/history.index index e7be86c..529d6ac 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.design/.indexes/4/history.index and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.design/.indexes/4/history.index differ 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 new file mode 100644 index 0000000..274460f Binary files /dev/null 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 d36b22e..91d6c54 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 414a6b3..91d6c54 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.design/org.eclipse.jdt.core/state.dat b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.design/org.eclipse.jdt.core/state.dat new file mode 100644 index 0000000..be81c04 Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.design/org.eclipse.jdt.core/state.dat 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 464a957..91d6c54 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 464a957..91d6c54 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.edit/org.eclipse.jdt.core/state.dat b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.edit/org.eclipse.jdt.core/state.dat new file mode 100644 index 0000000..0aa3651 Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.edit/org.eclipse.jdt.core/state.dat 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 464a957..91d6c54 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 464a957..91d6c54 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.editor/org.eclipse.jdt.core/state.dat b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.editor/org.eclipse.jdt.core/state.dat new file mode 100644 index 0000000..be0d706 Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.editor/org.eclipse.jdt.core/state.dat 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 464a957..91d6c54 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 464a957..91d6c54 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 464a957..91d6c54 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 464a957..91d6c54 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 fd766bf..91d6c54 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 fd766bf..91d6c54 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 464a957..91d6c54 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 464a957..91d6c54 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.tests/org.eclipse.jdt.core/state.dat b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.tests/org.eclipse.jdt.core/state.dat new file mode 100644 index 0000000..3e1adbc Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.tests/org.eclipse.jdt.core/state.dat differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA.ui/.markers b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA.ui/.markers new file mode 100644 index 0000000..3c0c233 Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA.ui/.markers 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 c0f1ddb..91d6c54 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 9925010..91d6c54 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.ui/org.eclipse.jdt.core/state.dat b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA.ui/org.eclipse.jdt.core/state.dat new file mode 100644 index 0000000..2443907 Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA.ui/org.eclipse.jdt.core/state.dat 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 new file mode 100644 index 0000000..d1a0dea Binary files /dev/null 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 f2ad18e..91d6c54 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 3873ade..91d6c54 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/1.tree b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/1.tree deleted file mode 100644 index 23f43aa..0000000 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/1.tree and /dev/null 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 new file mode 100644 index 0000000..154e26b Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet.toTINA/org.eclipse.jdt.core/state.dat differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/.indexes/history.index b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/.indexes/history.index index 073a7e7..b60ec43 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/.indexes/history.index and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.petrinet/.indexes/history.index 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 464a957..52bc7d0 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 464a957..91d6c54 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.simplepdl.design/.markers b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.design/.markers new file mode 100644 index 0000000..2bc8c76 Binary files /dev/null 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 f442e05..91d6c54 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 58ccd56..91d6c54 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.design/org.eclipse.jdt.core/state.dat b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.design/org.eclipse.jdt.core/state.dat new file mode 100644 index 0000000..1131b89 Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.design/org.eclipse.jdt.core/state.dat 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 464a957..91d6c54 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 464a957..91d6c54 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.edit/org.eclipse.jdt.core/state.dat b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.edit/org.eclipse.jdt.core/state.dat new file mode 100644 index 0000000..17f84d7 Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.edit/org.eclipse.jdt.core/state.dat 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 464a957..91d6c54 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 464a957..91d6c54 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.editor/org.eclipse.jdt.core/state.dat b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.editor/org.eclipse.jdt.core/state.dat new file mode 100644 index 0000000..08b0217 Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.editor/org.eclipse.jdt.core/state.dat 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 464a957..91d6c54 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 464a957..91d6c54 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 464a957..91d6c54 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 464a957..91d6c54 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 947df51..91d6c54 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 947df51..91d6c54 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 464a957..91d6c54 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 464a957..91d6c54 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.tests/org.eclipse.jdt.core/state.dat b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.tests/org.eclipse.jdt.core/state.dat new file mode 100644 index 0000000..df1ce8a Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.tests/org.eclipse.jdt.core/state.dat 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 new file mode 100644 index 0000000..6a14afa Binary files /dev/null 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 d5c9f8c..91d6c54 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 3873ade..91d6c54 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.ui/org.eclipse.jdt.core/state.dat b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT.ui/org.eclipse.jdt.core/state.dat new file mode 100644 index 0000000..6480d93 Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT.ui/org.eclipse.jdt.core/state.dat 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 new file mode 100644 index 0000000..b1a69a1 Binary files /dev/null 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 2b557c9..91d6c54 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 ed1c082..91d6c54 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.toDOT/1.tree b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT/1.tree deleted file mode 100644 index bd80112..0000000 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT/1.tree and /dev/null differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT/org.eclipse.jdt.core/state.dat b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT/org.eclipse.jdt.core/state.dat new file mode 100644 index 0000000..77b5a40 Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toDOT/org.eclipse.jdt.core/state.dat 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 464a957..91d6c54 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 464a957..91d6c54 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.ui/org.eclipse.jdt.core/state.dat b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML.ui/org.eclipse.jdt.core/state.dat new file mode 100644 index 0000000..718ffcc Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML.ui/org.eclipse.jdt.core/state.dat 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 e666d7b..91d6c54 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 464a957..91d6c54 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.toHTML/org.eclipse.acceleo.common/acceleo.state.dat b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML/org.eclipse.acceleo.common/acceleo.state.dat deleted file mode 100644 index c00e898..0000000 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML/org.eclipse.acceleo.common/acceleo.state.dat and /dev/null differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML/org.eclipse.jdt.core/state.dat b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML/org.eclipse.jdt.core/state.dat new file mode 100644 index 0000000..8a83b6f Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/fr.n7.simplepdl.toHTML/org.eclipse.jdt.core/state.dat 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 dbd11fd..b3fcda3 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 8787d11..7b7b95a 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 1263eba..24fe987 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 464a957..ae98a72 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 464a957..91d6c54 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/.indexes/properties.index b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index index f897c94..c781841 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index 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 0f0072b..bdb00bf 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/20.tree b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/21.tree similarity index 54% rename from eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/20.tree rename to eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/21.tree index 9c417a0..c4cb479 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/20.tree and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/.root/21.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 8423888..05db1a8 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/20.snap b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/20.snap deleted file mode 100644 index 3f047af..0000000 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/20.snap and /dev/null 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 new file mode 100644 index 0000000..3df0427 Binary files /dev/null and b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.resources/21.snap differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.gmf.runtime.diagram.ui.prefs b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.gmf.runtime.diagram.ui.prefs new file mode 100644 index 0000000..c2080ae --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.gmf.runtime.diagram.ui.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.gmf.psize=217 diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs index 9d50634..919a568 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs @@ -1,3 +1,4 @@ +content_assist_lru_history= content_assist_number_of_computers=14 content_assist_proposals_background=255,255,255 content_assist_proposals_foreground=0,0,0 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 a1a5409..f204514 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=1631777710657 +platformState=1631777710672 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 new file mode 100644 index 0000000..b25a176 --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.debug.core/.launches/simplepdl2petrinet.launch @@ -0,0 +1,13 @@ + + + + + + + + + + + + + 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 baf9a74..9bbf6bb 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml @@ -2,6 +2,7 @@ + @@ -23,6 +24,7 @@ + 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 758bfac..42bf923 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,62 +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 - - - noFocus - + + + 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 @@ -344,7 +343,7 @@ - + persp.actionSet:org.eclipse.acceleo.ide.ui.editors.template.actionSet persp.actionSet:org.eclipse.ui.cheatsheets.actionSet @@ -368,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 @@ -408,2328 +407,2351 @@ - - + + 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 - - + + Editor removeOnHide - org.eclipse.sirius.editor.editorPlugin.SiriusEditorID - active + org.eclipse.jdt.ui.CompilationUnitEditor - - + + Editor removeOnHide - org.eclipse.sirius.diagram.ui.part.SiriusDiagramEditorID + org.eclipse.jdt.ui.CompilationUnitEditor + + + + Editor + removeOnHide + org.eclipse.jdt.ui.CompilationUnitEditor + + + + Editor + removeOnHide + org.eclipse.emf.ecore.presentation.ReflectiveEditorID + + + + Editor + removeOnHide + org.eclipse.emf.ecore.presentation.ReflectiveEditorID + + + + Editor + removeOnHide + org.eclipse.emf.ecore.presentation.ReflectiveEditorID + 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 - highlighted - + 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 - + 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 afbf665..1630950 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 8b57603..d05f27f 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 cb88a8a..7b36c0c 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/nonChainingJarsCache b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache index b3ba01b..70fe67a 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache and b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache 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 8cda270..0821c0d 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt @@ -1,26 +1,60 @@ INDEX VERSION 1.131+/home/lfainsin/miniproj_idm/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core -3745962735.index -638382064.index -1027991553.index -1610757853.index -2315287759.index -3674129442.index -3756796416.index -1612303704.index -764202902.index -3982670021.index -489623180.index -686276266.index -3386340968.index -2662280364.index -3591232502.index -2344539973.index -665994362.index -3977823992.index +2944618107.index +836787774.index +1638374812.index +243785569.index +69115327.index 976850906.index -3144547538.index -2320756977.index -264048023.index -997444292.index +665994362.index +3370953800.index +594756272.index +1288722511.index +361289234.index +687162898.index +2315287759.index +2684007147.index +2479976885.index 2469834123.index +1744987098.index +4244811416.index 618880026.index +1612303704.index +2320756977.index +3761123150.index +649822626.index +3144173601.index +3144547538.index +638382064.index +1366149182.index +2662280364.index +3977823992.index +686276266.index +1027991553.index +2344539973.index +997444292.index +3591232502.index +764202902.index +3756796416.index +3745962735.index +870911012.index +830761727.index +1190385766.index +1259215892.index +3982670021.index +1332398772.index +124733140.index +3228602193.index +3386340968.index +2133193807.index +264048023.index +646308851.index +701648383.index +4270576026.index +1969063402.index +113784225.index +1001394679.index +489623180.index +3674129442.index +3499872082.index +1492316222.index +910095251.index diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat index dd26719..731ceaf 100644 Binary files a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat and b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat differ diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.debug.ui/dialog_settings.xml b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.debug.ui/dialog_settings.xml index b1d7caa..7b722f5 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.debug.ui/dialog_settings.xml +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.debug.ui/dialog_settings.xml @@ -2,7 +2,7 @@
- +
diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml index 9e390f5..aa70199 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml @@ -1,2 +1,8 @@ - + + + + + + + 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 672f75e..2343273 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 956a366..221d50e 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.ltk.core.refactoring/.refactorings/fr.n7.petrinet/2021/10/40/refactorings.history b/eclipse-workspace/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.petrinet/2021/10/40/refactorings.history index ac55d54..a6c5933 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.petrinet/2021/10/40/refactorings.history +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.petrinet/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.petrinet/2021/10/40/refactorings.index b/eclipse-workspace/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.petrinet/2021/10/40/refactorings.index index 629cdd9..62e2242 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.petrinet/2021/10/40/refactorings.index +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/fr.n7.petrinet/2021/10/40/refactorings.index @@ -7,3 +7,4 @@ 1633791501864 Rename resource 'network1-ko.xmi' 1633794223683 Delete element 1633809576140 Copy file +1633817955008 Delete element 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 eaf238f..189999a 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 2e1b18c..abb30ea 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 @@ -11,3 +11,5 @@ 1633791379776 Rename resource 'process-developpement.xmi' 1633794113369 Copy compilation unit 1633794227791 Delete element +1633817925558 Move file +1633818171927 Delete element 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 abf0e6d..9210a1a 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 -#Sat Oct 09 21:07:40 CEST 2021 +#Sun Oct 10 00:17:26 CEST 2021 diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/.extensions/.manager/.tmp2479340851002185577.instance b/eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/.extensions/.manager/.tmp6998723412611004271.instance similarity index 100% rename from eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/.extensions/.manager/.tmp2479340851002185577.instance rename to eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/.extensions/.manager/.tmp6998723412611004271.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 0c21eec..524590f 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: 1633806471706 +# List of external plug-in models previously loaded. Timestamp: 1633817862111 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/.plugins/org.eclipse.sirius.diagram.ui/_j1yWAylDEeyDO9z0LI9hnQ b/eclipse-workspace/.metadata/.plugins/org.eclipse.sirius.diagram.ui/_j1yWAylDEeyDO9z0LI9hnQ new file mode 100644 index 0000000..049125d --- /dev/null +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.sirius.diagram.ui/_j1yWAylDEeyDO9z0LI9hnQ @@ -0,0 +1,18 @@ +#Sat Oct 09 23:25:21 CEST 2021 +rulergrid.rulerunit=1 +print.margin.left=0.5 +rulergrid.gridlinestyle=6 +zoom=1.0 +print.useMillim=true +print.usePortrait=true +print.page.height=11.6929134 +print.page.width=8.26771654 +rulergrid.snaptogrid=true +print.margin.bottom=0.5 +rulergrid.snaptogeometry=true +print.margin.top=0.5 +print.margin.right=0.5 +rulergrid.gridlevel=true +print.page.size=A4 +rulergrid.gridspacing=0.125 +rulergrid.gridlinecolor=12632256 diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml b/eclipse-workspace/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml index 24e95e3..c6efa37 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml @@ -16,15 +16,15 @@
- +
- - + +
diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.ui.views.log/dialog_settings.xml b/eclipse-workspace/.metadata/.plugins/org.eclipse.ui.views.log/dialog_settings.xml index 79041ea..08b77d1 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.ui.views.log/dialog_settings.xml +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.ui.views.log/dialog_settings.xml @@ -10,8 +10,8 @@
- - + + diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml b/eclipse-workspace/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml index f55f57b..b9bd572 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml @@ -6,8 +6,10 @@ - + + + diff --git a/eclipse-workspace/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml b/eclipse-workspace/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml index 9dcb8dd..8da8c9d 100644 --- a/eclipse-workspace/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml +++ b/eclipse-workspace/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml @@ -27,9 +27,16 @@
- + + + + + + + +
diff --git a/eclipse-workspace/.metadata/version.ini b/eclipse-workspace/.metadata/version.ini index a86133e..b4c9cf4 100644 --- a/eclipse-workspace/.metadata/version.ini +++ b/eclipse-workspace/.metadata/version.ini @@ -1,3 +1,3 @@ -#Sat Oct 09 21:07:48 CEST 2021 +#Sun Oct 10 00:17:33 CEST 2021 org.eclipse.core.runtime=2 org.eclipse.platform=4.17.0.v20200902-1800 diff --git a/eclipse-workspace/fr.n7.simplepdl/models/test.xmi b/eclipse-workspace/fr.n7.simplepdl/models/test.xmi new file mode 100644 index 0000000..9e7734e --- /dev/null +++ b/eclipse-workspace/fr.n7.simplepdl/models/test.xmi @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eclipse-workspace/fr.n7.simplepdl/pdl-sujet.xmi b/eclipse-workspace/fr.n7.simplepdl/pdl-sujet.xmi index 09d48b8..d312792 100644 --- a/eclipse-workspace/fr.n7.simplepdl/pdl-sujet.xmi +++ b/eclipse-workspace/fr.n7.simplepdl/pdl-sujet.xmi @@ -1,49 +1,12 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/eclipse-workspace/fr.n7.simplepdl/src/simplepdl/manip/SimplePDLCreator.java b/eclipse-workspace/fr.n7.simplepdl/src/simplepdl/manip/SimplePDLCreator.java index dc4526a..7322b80 100644 --- a/eclipse-workspace/fr.n7.simplepdl/src/simplepdl/manip/SimplePDLCreator.java +++ b/eclipse-workspace/fr.n7.simplepdl/src/simplepdl/manip/SimplePDLCreator.java @@ -23,7 +23,6 @@ public class SimplePDLCreator { // Charger le package SimplePDL afin de l'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" 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 b007609..8f0d125 100644 --- a/eclipse-workspace/fr.n7.simplepdl/src/simplepdl/manip/simplepdl2petrinet.java +++ b/eclipse-workspace/fr.n7.simplepdl/src/simplepdl/manip/simplepdl2petrinet.java @@ -10,73 +10,112 @@ 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.SimplepdlFactory; import simplepdl.SimplepdlPackage; public class simplepdl2petrinet { public static void main(String[] args) { - // Charger le package SimplePDL afin de l'enregistrer dans le registre d'Eclipse. + // 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 à + // 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) + // Créer un objet resourceSetImpl qui contiendra une ressource EMF (le modèle) ResourceSet resSet = new ResourceSetImpl(); - // Définir la ressource (le modèle) - URI modelURI = URI.createURI("models/SimplePDLCreator_Created_Process.xmi"); - Resource resource = resSet.createResource(modelURI); + // 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 SimplePDL - SimplepdlFactory myFactory = SimplepdlFactory.eINSTANCE; - - // Créer un élément Process - Process process = myFactory.createProcess(); - process.setName("Mon premier processus"); + // 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()); - // Ajouter le Process dans le modèle - resource.getContents().add(process); + // 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 deux WorkDefinitions - WorkDefinition wd1 = myFactory.createWorkDefinition(); - wd1.setName("Ma première WorkDefinition, quelle émotion"); - - WorkDefinition wd2 = myFactory.createWorkDefinition(); - wd2.setName("Ma deuxième WorkDefinition, toujours autant d'émotion"); - - process.getProcessElements().add(wd1); - process.getProcessElements().add(wd2); - - // Ajouter une WorkSequence entre les deux WorkDefinitions - WorkSequence seq = myFactory.createWorkSequence(); - seq.setPredecessor(wd1); - seq.setSuccessor(wd2); - seq.setLinkType(WorkSequenceType.FINISH_TO_FINISH); - - process.getProcessElements().add(seq); - - // Ajouter une deuxième WorkSequence entre les deux WorkDefinitions - WorkSequence seq2 = myFactory.createWorkSequence(); - seq2.setPredecessor(wd1); - seq2.setSuccessor(wd2); - seq2.setLinkType(WorkSequenceType.START_TO_START); - - process.getProcessElements().add(seq2); - + // Ajouter le Network dans le nouveau modèle + conv.getContents().add(network); // Sauver la ressource try { - resource.save(Collections.EMPTY_MAP); + conv.save(Collections.EMPTY_MAP); } catch (IOException e) { e.printStackTrace(); }