regénération des models

à faire: changer les targets en place partout
à faire: modifier les edit pour que les getText soient jolis
This commit is contained in:
Laurent Fainsin 2021-10-13 19:22:57 +02:00
parent ad943a631f
commit 20a2903728
303 changed files with 12535 additions and 161 deletions

View file

@ -390,3 +390,612 @@ Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
... 21 more
!SESSION 2021-10-13 19:11:46.191 -----------------------------------------------
eclipse.buildId=4.17.0.I20200902-1800
java.version=11.0.11
java.vendor=Ubuntu
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=fr_FR
Framework arguments: -product org.eclipse.epp.package.modeling.product
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.modeling.product
!ENTRY org.eclipse.core.resources 2 10035 2021-10-13 19:11:47.740
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
!ENTRY org.eclipse.emf.common 2 0 2021-10-13 19:12:32.537
!MESSAGE An exception was ignored during command execution
!STACK 0
org.eclipse.emf.common.util.WrappedException: An exception was ignored during command execution
at org.eclipse.emf.common.command.BasicCommandStack.handleError(BasicCommandStack.java:281)
at org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:112)
at org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor$4.execute(GenModelEditor.java:780)
at org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.initialize(GenModelEditor.java:644)
at org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.createPages(GenModelEditor.java:1158)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:333)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:154)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:96)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:361)
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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:999)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:964)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:140)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:405)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:332)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:202)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:91)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:60)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:42)
at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:132)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:999)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:659)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:765)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:736)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:730)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:714)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.lambda$0(PartServiceImpl.java:104)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler.lambda$0(UIEventHandler.java:38)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:236)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:133)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:5855)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:219)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:205)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:203)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:132)
at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:75)
at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:44)
at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:55)
at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:63)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424)
at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElementGen(ElementContainerImpl.java:170)
at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:188)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:659)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:623)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:786)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:400)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1262)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3197)
at org.eclipse.ui.internal.WorkbenchPage.lambda$9(WorkbenchPage.java:3102)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3100)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3070)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3061)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:569)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:524)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:363)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:170)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:285)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:251)
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.jdt.internal.ui.navigator.OpenAndExpand.run(OpenAndExpand.java:53)
at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:215)
at org.eclipse.ui.navigator.CommonNavigatorManager$1.open(CommonNavigatorManager.java:183)
at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:802)
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.fireOpen(StructuredViewer.java:799)
at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1118)
at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:454)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:270)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:310)
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)
Caused by: java.lang.ClassCastException: class org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl cannot be cast to class org.eclipse.emf.codegen.ecore.genmodel.GenBase (org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @dfd90df; org.eclipse.emf.codegen.ecore.genmodel.GenBase is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @2bb84aa5)
at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.getGenModel(GenPackageImpl.java:1348)
at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.eIsSet(GenPackageImpl.java:1994)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObjectImpl.java:1280)
at org.eclipse.emf.ecore.change.util.BasicChangeRecorder.eliminateEmptyChanges(BasicChangeRecorder.java:161)
at org.eclipse.emf.ecore.change.util.BasicChangeRecorder.consolidateChanges(BasicChangeRecorder.java:143)
at org.eclipse.emf.ecore.change.util.ChangeRecorder.consolidateChanges(ChangeRecorder.java:247)
at org.eclipse.emf.ecore.change.util.BasicChangeRecorder.endRecording(BasicChangeRecorder.java:117)
at org.eclipse.emf.edit.command.ChangeCommand.execute(ChangeCommand.java:134)
at org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:78)
... 108 more
!ENTRY org.eclipse.core.contenttype 4 0 2021-10-13 19:13:04.502
!MESSAGE Error reading contents using content type: org.eclipse.emf.codegen.genmodel.
!STACK 0
java.io.IOException: mark/reset not supported
at java.base/java.io.InputStream.reset(InputStream.java:655)
at org.eclipse.emf.ecore.resource.URIConverter$ReadableInputStream.reset(URIConverter.java:376)
at org.eclipse.emf.ecore.xmi.impl.XMLContentHandlerImpl.load(XMLContentHandlerImpl.java:223)
at org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl.contentDescription(RootXMLContentHandlerImpl.java:222)
at org.eclipse.emf.ecore.resource.impl.ContentHandlerImpl$Describer.describe(ContentHandlerImpl.java:366)
at org.eclipse.emf.ecore.resource.impl.ContentHandlerImpl$Describer.describe(ContentHandlerImpl.java:373)
at org.eclipse.core.internal.content.ContentTypeCatalog.describe(ContentTypeCatalog.java:248)
at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:226)
at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:440)
at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:499)
at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:381)
at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:399)
at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:87)
at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.computeEncoding(ResourceTextFileBuffer.java:395)
at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.commitFileBufferContent(ResourceTextFileBuffer.java:299)
at org.eclipse.core.internal.filebuffers.ResourceFileBuffer.commit(ResourceFileBuffer.java:317)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.commitFileBuffer(TextFileDocumentProvider.java:851)
at org.eclipse.ui.editors.text.TextFileDocumentProvider$2.execute(TextFileDocumentProvider.java:785)
at org.eclipse.ui.editors.text.TextFileDocumentProvider$DocumentProviderOperation.run(TextFileDocumentProvider.java:133)
at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:71)
at org.eclipse.ui.actions.WorkspaceModifyOperation.lambda$0(WorkspaceModifyOperation.java:110)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2317)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:131)
at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:76)
at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:66)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation(TextFileDocumentProvider.java:461)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.saveDocument(TextFileDocumentProvider.java:764)
at org.eclipse.ui.texteditor.AbstractTextEditor.performSave(AbstractTextEditor.java:5007)
at org.eclipse.ui.texteditor.AbstractTextEditor.doSave(AbstractTextEditor.java:4807)
at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.doSave(AbstractTextEditor.java:7151)
at org.eclipse.ui.Saveable.doSave(Saveable.java:213)
at org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:333)
at org.eclipse.ui.internal.SaveableHelper.lambda$1(SaveableHelper.java:196)
at org.eclipse.ui.internal.SaveableHelper.lambda$3(SaveableHelper.java:271)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:436)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:352)
at org.eclipse.ui.internal.WorkbenchWindow.lambda$7(WorkbenchWindow.java:2353)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2351)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:278)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:260)
at org.eclipse.ui.internal.SaveableHelper.saveModels(SaveableHelper.java:207)
at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:150)
at org.eclipse.ui.internal.WorkbenchPage.saveSaveable(WorkbenchPage.java:3822)
at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3835)
at org.eclipse.ui.internal.handlers.SaveHandler.execute(SaveHandler.java:81)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
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.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.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:443)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$2(KeyBindingDispatcher.java:386)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1880)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1426)
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.Widget.windowProc(Widget.java:2326)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:6795)
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.core.contenttype 4 0 2021-10-13 19:13:04.505
!MESSAGE Error reading contents using content type: org.eclipse.uml2.genmodel.
!STACK 0
java.io.IOException: mark/reset not supported
at java.base/java.io.InputStream.reset(InputStream.java:655)
at org.eclipse.emf.ecore.resource.URIConverter$ReadableInputStream.reset(URIConverter.java:376)
at org.eclipse.emf.ecore.xmi.impl.XMLContentHandlerImpl.load(XMLContentHandlerImpl.java:223)
at org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl.contentDescription(RootXMLContentHandlerImpl.java:222)
at org.eclipse.emf.ecore.resource.impl.ContentHandlerImpl$Describer.describe(ContentHandlerImpl.java:366)
at org.eclipse.emf.ecore.resource.impl.ContentHandlerImpl$Describer.describe(ContentHandlerImpl.java:373)
at org.eclipse.core.internal.content.ContentTypeCatalog.describe(ContentTypeCatalog.java:248)
at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:226)
at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:440)
at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:499)
at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:381)
at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:399)
at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:87)
at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.computeEncoding(ResourceTextFileBuffer.java:395)
at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.commitFileBufferContent(ResourceTextFileBuffer.java:299)
at org.eclipse.core.internal.filebuffers.ResourceFileBuffer.commit(ResourceFileBuffer.java:317)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.commitFileBuffer(TextFileDocumentProvider.java:851)
at org.eclipse.ui.editors.text.TextFileDocumentProvider$2.execute(TextFileDocumentProvider.java:785)
at org.eclipse.ui.editors.text.TextFileDocumentProvider$DocumentProviderOperation.run(TextFileDocumentProvider.java:133)
at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:71)
at org.eclipse.ui.actions.WorkspaceModifyOperation.lambda$0(WorkspaceModifyOperation.java:110)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2317)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:131)
at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:76)
at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:66)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation(TextFileDocumentProvider.java:461)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.saveDocument(TextFileDocumentProvider.java:764)
at org.eclipse.ui.texteditor.AbstractTextEditor.performSave(AbstractTextEditor.java:5007)
at org.eclipse.ui.texteditor.AbstractTextEditor.doSave(AbstractTextEditor.java:4807)
at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.doSave(AbstractTextEditor.java:7151)
at org.eclipse.ui.Saveable.doSave(Saveable.java:213)
at org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:333)
at org.eclipse.ui.internal.SaveableHelper.lambda$1(SaveableHelper.java:196)
at org.eclipse.ui.internal.SaveableHelper.lambda$3(SaveableHelper.java:271)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:436)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:352)
at org.eclipse.ui.internal.WorkbenchWindow.lambda$7(WorkbenchWindow.java:2353)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2351)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:278)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:260)
at org.eclipse.ui.internal.SaveableHelper.saveModels(SaveableHelper.java:207)
at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:150)
at org.eclipse.ui.internal.WorkbenchPage.saveSaveable(WorkbenchPage.java:3822)
at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3835)
at org.eclipse.ui.internal.handlers.SaveHandler.execute(SaveHandler.java:81)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
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.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.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:443)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$2(KeyBindingDispatcher.java:386)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1880)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1426)
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.Widget.windowProc(Widget.java:2326)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:6795)
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.core.contenttype 4 0 2021-10-13 19:13:04.508
!MESSAGE Error reading contents using content type: org.eclipse.uml2.genmodel_1_1_0.
!STACK 0
java.io.IOException: mark/reset not supported
at java.base/java.io.InputStream.reset(InputStream.java:655)
at org.eclipse.emf.ecore.resource.URIConverter$ReadableInputStream.reset(URIConverter.java:376)
at org.eclipse.emf.ecore.xmi.impl.XMLContentHandlerImpl.load(XMLContentHandlerImpl.java:223)
at org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl.contentDescription(RootXMLContentHandlerImpl.java:222)
at org.eclipse.emf.ecore.resource.impl.ContentHandlerImpl$Describer.describe(ContentHandlerImpl.java:366)
at org.eclipse.emf.ecore.resource.impl.ContentHandlerImpl$Describer.describe(ContentHandlerImpl.java:373)
at org.eclipse.core.internal.content.ContentTypeCatalog.describe(ContentTypeCatalog.java:248)
at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:226)
at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:440)
at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:499)
at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:381)
at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:399)
at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:87)
at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.computeEncoding(ResourceTextFileBuffer.java:395)
at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.commitFileBufferContent(ResourceTextFileBuffer.java:299)
at org.eclipse.core.internal.filebuffers.ResourceFileBuffer.commit(ResourceFileBuffer.java:317)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.commitFileBuffer(TextFileDocumentProvider.java:851)
at org.eclipse.ui.editors.text.TextFileDocumentProvider$2.execute(TextFileDocumentProvider.java:785)
at org.eclipse.ui.editors.text.TextFileDocumentProvider$DocumentProviderOperation.run(TextFileDocumentProvider.java:133)
at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:71)
at org.eclipse.ui.actions.WorkspaceModifyOperation.lambda$0(WorkspaceModifyOperation.java:110)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2317)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:131)
at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:76)
at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:66)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation(TextFileDocumentProvider.java:461)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.saveDocument(TextFileDocumentProvider.java:764)
at org.eclipse.ui.texteditor.AbstractTextEditor.performSave(AbstractTextEditor.java:5007)
at org.eclipse.ui.texteditor.AbstractTextEditor.doSave(AbstractTextEditor.java:4807)
at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.doSave(AbstractTextEditor.java:7151)
at org.eclipse.ui.Saveable.doSave(Saveable.java:213)
at org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:333)
at org.eclipse.ui.internal.SaveableHelper.lambda$1(SaveableHelper.java:196)
at org.eclipse.ui.internal.SaveableHelper.lambda$3(SaveableHelper.java:271)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:436)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:352)
at org.eclipse.ui.internal.WorkbenchWindow.lambda$7(WorkbenchWindow.java:2353)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2351)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:278)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:260)
at org.eclipse.ui.internal.SaveableHelper.saveModels(SaveableHelper.java:207)
at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:150)
at org.eclipse.ui.internal.WorkbenchPage.saveSaveable(WorkbenchPage.java:3822)
at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3835)
at org.eclipse.ui.internal.handlers.SaveHandler.execute(SaveHandler.java:81)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
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.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.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:443)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$2(KeyBindingDispatcher.java:386)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1880)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1426)
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.Widget.windowProc(Widget.java:2326)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:6795)
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.core.contenttype 4 0 2021-10-13 19:13:04.511
!MESSAGE Error reading contents using content type: org.eclipse.uml2.genmodel_2_2_0.
!STACK 0
java.io.IOException: mark/reset not supported
at java.base/java.io.InputStream.reset(InputStream.java:655)
at org.eclipse.emf.ecore.resource.URIConverter$ReadableInputStream.reset(URIConverter.java:376)
at org.eclipse.emf.ecore.xmi.impl.XMLContentHandlerImpl.load(XMLContentHandlerImpl.java:223)
at org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl.contentDescription(RootXMLContentHandlerImpl.java:222)
at org.eclipse.emf.ecore.resource.impl.ContentHandlerImpl$Describer.describe(ContentHandlerImpl.java:366)
at org.eclipse.emf.ecore.resource.impl.ContentHandlerImpl$Describer.describe(ContentHandlerImpl.java:373)
at org.eclipse.core.internal.content.ContentTypeCatalog.describe(ContentTypeCatalog.java:248)
at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:226)
at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:440)
at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:499)
at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:381)
at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:399)
at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:87)
at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.computeEncoding(ResourceTextFileBuffer.java:395)
at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.commitFileBufferContent(ResourceTextFileBuffer.java:299)
at org.eclipse.core.internal.filebuffers.ResourceFileBuffer.commit(ResourceFileBuffer.java:317)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.commitFileBuffer(TextFileDocumentProvider.java:851)
at org.eclipse.ui.editors.text.TextFileDocumentProvider$2.execute(TextFileDocumentProvider.java:785)
at org.eclipse.ui.editors.text.TextFileDocumentProvider$DocumentProviderOperation.run(TextFileDocumentProvider.java:133)
at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:71)
at org.eclipse.ui.actions.WorkspaceModifyOperation.lambda$0(WorkspaceModifyOperation.java:110)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2317)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:131)
at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:76)
at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:66)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation(TextFileDocumentProvider.java:461)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.saveDocument(TextFileDocumentProvider.java:764)
at org.eclipse.ui.texteditor.AbstractTextEditor.performSave(AbstractTextEditor.java:5007)
at org.eclipse.ui.texteditor.AbstractTextEditor.doSave(AbstractTextEditor.java:4807)
at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.doSave(AbstractTextEditor.java:7151)
at org.eclipse.ui.Saveable.doSave(Saveable.java:213)
at org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:333)
at org.eclipse.ui.internal.SaveableHelper.lambda$1(SaveableHelper.java:196)
at org.eclipse.ui.internal.SaveableHelper.lambda$3(SaveableHelper.java:271)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:436)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:352)
at org.eclipse.ui.internal.WorkbenchWindow.lambda$7(WorkbenchWindow.java:2353)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2351)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:278)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:260)
at org.eclipse.ui.internal.SaveableHelper.saveModels(SaveableHelper.java:207)
at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:150)
at org.eclipse.ui.internal.WorkbenchPage.saveSaveable(WorkbenchPage.java:3822)
at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3835)
at org.eclipse.ui.internal.handlers.SaveHandler.execute(SaveHandler.java:81)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
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.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.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:443)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$2(KeyBindingDispatcher.java:386)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1880)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1426)
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.Widget.windowProc(Widget.java:2326)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:6795)
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.emf.cdo.explorer 4 0 2021-10-13 19:22:08.549
!MESSAGE InterruptedException
!STACK 0
java.lang.InterruptedException
at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1343)
at java.base/java.util.concurrent.Semaphore.acquire(Semaphore.java:318)
at org.eclipse.net4j.util.lifecycle.Lifecycle.lock(Lifecycle.java:312)
at org.eclipse.net4j.util.lifecycle.Lifecycle.internalDeactivate(Lifecycle.java:118)
at org.eclipse.net4j.util.lifecycle.ShareableLifecycle.internalDeactivate(ShareableLifecycle.java:52)
at org.eclipse.net4j.util.lifecycle.Lifecycle.deactivate(Lifecycle.java:170)
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:235)
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.deactivate(LifecycleUtil.java:225)
at org.eclipse.emf.cdo.internal.explorer.bundle.OM.disposeManagers(OM.java:83)
at org.eclipse.emf.cdo.internal.explorer.bundle.OM$Activator.doStop(OM.java:136)
at org.eclipse.net4j.util.om.OSGiActivator.stop(OSGiActivator.java:92)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:871)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:863)
at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:1025)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:370)
at org.eclipse.osgi.container.Module.doStop(Module.java:660)
at org.eclipse.osgi.container.Module.stop(Module.java:521)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1886)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1761)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:275)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:202)
at org.eclipse.osgi.container.Module.doStop(Module.java:660)
at org.eclipse.osgi.container.Module.stop(Module.java:521)
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:207)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:220)
at java.base/java.lang.Thread.run(Thread.java:829)

View file

@ -0,0 +1,222 @@
/**
*/
package petrinet.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import petrinet.Network;
import petrinet.Node;
import petrinet.PetrinetPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Network</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link petrinet.impl.NetworkImpl#getName <em>Name</em>}</li>
* <li>{@link petrinet.impl.NetworkImpl#getNodes <em>Nodes</em>}</li>
* </ul>
*
* @generated
*/
public class NetworkImpl extends MinimalEObjectImpl.Container implements Network {
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The cached value of the '{@link #getNodes() <em>Nodes</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getNodes()
* @generated
* @ordered
*/
protected EList<Node> nodes;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected NetworkImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return PetrinetPackage.Literals.NETWORK;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PetrinetPackage.NETWORK__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Node> getNodes() {
if (nodes == null) {
nodes = new EObjectContainmentEList<Node>(Node.class, this, PetrinetPackage.NETWORK__NODES);
}
return nodes;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case PetrinetPackage.NETWORK__NODES:
return ((InternalEList<?>)getNodes()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PetrinetPackage.NETWORK__NAME:
return getName();
case PetrinetPackage.NETWORK__NODES:
return getNodes();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PetrinetPackage.NETWORK__NAME:
setName((String)newValue);
return;
case PetrinetPackage.NETWORK__NODES:
getNodes().clear();
getNodes().addAll((Collection<? extends Node>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PetrinetPackage.NETWORK__NAME:
setName(NAME_EDEFAULT);
return;
case PetrinetPackage.NETWORK__NODES:
getNodes().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PetrinetPackage.NETWORK__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case PetrinetPackage.NETWORK__NODES:
return nodes != null && !nodes.isEmpty();
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (name: ");
result.append(name);
result.append(')');
return result.toString();
}
} //NetworkImpl

View file

@ -0,0 +1,221 @@
/**
*/
package simplepdl.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import simplepdl.ProcessElement;
import simplepdl.SimplepdlPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Process</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link simplepdl.impl.ProcessImpl#getName <em>Name</em>}</li>
* <li>{@link simplepdl.impl.ProcessImpl#getProcessElements <em>Process Elements</em>}</li>
* </ul>
*
* @generated
*/
public class ProcessImpl extends MinimalEObjectImpl.Container implements simplepdl.Process {
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The cached value of the '{@link #getProcessElements() <em>Process Elements</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getProcessElements()
* @generated
* @ordered
*/
protected EList<ProcessElement> processElements;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ProcessImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return SimplepdlPackage.Literals.PROCESS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.PROCESS__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<ProcessElement> getProcessElements() {
if (processElements == null) {
processElements = new EObjectContainmentEList<ProcessElement>(ProcessElement.class, this, SimplepdlPackage.PROCESS__PROCESS_ELEMENTS);
}
return processElements;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case SimplepdlPackage.PROCESS__PROCESS_ELEMENTS:
return ((InternalEList<?>)getProcessElements()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case SimplepdlPackage.PROCESS__NAME:
return getName();
case SimplepdlPackage.PROCESS__PROCESS_ELEMENTS:
return getProcessElements();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case SimplepdlPackage.PROCESS__NAME:
setName((String)newValue);
return;
case SimplepdlPackage.PROCESS__PROCESS_ELEMENTS:
getProcessElements().clear();
getProcessElements().addAll((Collection<? extends ProcessElement>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case SimplepdlPackage.PROCESS__NAME:
setName(NAME_EDEFAULT);
return;
case SimplepdlPackage.PROCESS__PROCESS_ELEMENTS:
getProcessElements().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case SimplepdlPackage.PROCESS__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case SimplepdlPackage.PROCESS__PROCESS_ELEMENTS:
return processElements != null && !processElements.isEmpty();
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (name: ");
result.append(name);
result.append(')');
return result.toString();
}
} //ProcessImpl

View file

@ -0,0 +1,89 @@
/**
*/
package simplepdl;
import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Work Definition</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link simplepdl.WorkDefinition#getLinksToPredecessors <em>Links To Predecessors</em>}</li>
* <li>{@link simplepdl.WorkDefinition#getLinksToSuccessors <em>Links To Successors</em>}</li>
* <li>{@link simplepdl.WorkDefinition#getName <em>Name</em>}</li>
* <li>{@link simplepdl.WorkDefinition#getRequests <em>Requests</em>}</li>
* </ul>
*
* @see simplepdl.SimplepdlPackage#getWorkDefinition()
* @model
* @generated
*/
public interface WorkDefinition extends ProcessElement {
/**
* Returns the value of the '<em><b>Links To Predecessors</b></em>' reference list.
* The list contents are of type {@link simplepdl.WorkSequence}.
* It is bidirectional and its opposite is '{@link simplepdl.WorkSequence#getSuccessor <em>Successor</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Links To Predecessors</em>' reference list.
* @see simplepdl.SimplepdlPackage#getWorkDefinition_LinksToPredecessors()
* @see simplepdl.WorkSequence#getSuccessor
* @model opposite="successor"
* @generated
*/
EList<WorkSequence> getLinksToPredecessors();
/**
* Returns the value of the '<em><b>Links To Successors</b></em>' reference list.
* The list contents are of type {@link simplepdl.WorkSequence}.
* It is bidirectional and its opposite is '{@link simplepdl.WorkSequence#getPredecessor <em>Predecessor</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Links To Successors</em>' reference list.
* @see simplepdl.SimplepdlPackage#getWorkDefinition_LinksToSuccessors()
* @see simplepdl.WorkSequence#getPredecessor
* @model opposite="predecessor"
* @generated
*/
EList<WorkSequence> getLinksToSuccessors();
/**
* Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see simplepdl.SimplepdlPackage#getWorkDefinition_Name()
* @model required="true"
* @generated
*/
String getName();
/**
* Sets the value of the '{@link simplepdl.WorkDefinition#getName <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Name</em>' attribute.
* @see #getName()
* @generated
*/
void setName(String value);
/**
* Returns the value of the '<em><b>Requests</b></em>' containment reference list.
* The list contents are of type {@link simplepdl.Request}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Requests</em>' containment reference list.
* @see simplepdl.SimplepdlPackage#getWorkDefinition_Requests()
* @model containment="true"
* @generated
*/
EList<Request> getRequests();
} // WorkDefinition

View file

@ -0,0 +1,216 @@
/**
*/
package simplepdl.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import simplepdl.Resource;
import simplepdl.SimplepdlPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Resource</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link simplepdl.impl.ResourceImpl#getQuantity <em>Quantity</em>}</li>
* <li>{@link simplepdl.impl.ResourceImpl#getName <em>Name</em>}</li>
* </ul>
*
* @generated
*/
public class ResourceImpl extends ProcessElementImpl implements Resource {
/**
* The default value of the '{@link #getQuantity() <em>Quantity</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getQuantity()
* @generated
* @ordered
*/
protected static final int QUANTITY_EDEFAULT = 0;
/**
* The cached value of the '{@link #getQuantity() <em>Quantity</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getQuantity()
* @generated
* @ordered
*/
protected int quantity = QUANTITY_EDEFAULT;
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ResourceImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return SimplepdlPackage.Literals.RESOURCE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getQuantity() {
return quantity;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setQuantity(int newQuantity) {
int oldQuantity = quantity;
quantity = newQuantity;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.RESOURCE__QUANTITY, oldQuantity, quantity));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.RESOURCE__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case SimplepdlPackage.RESOURCE__QUANTITY:
return getQuantity();
case SimplepdlPackage.RESOURCE__NAME:
return getName();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case SimplepdlPackage.RESOURCE__QUANTITY:
setQuantity((Integer)newValue);
return;
case SimplepdlPackage.RESOURCE__NAME:
setName((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case SimplepdlPackage.RESOURCE__QUANTITY:
setQuantity(QUANTITY_EDEFAULT);
return;
case SimplepdlPackage.RESOURCE__NAME:
setName(NAME_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case SimplepdlPackage.RESOURCE__QUANTITY:
return quantity != QUANTITY_EDEFAULT;
case SimplepdlPackage.RESOURCE__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (quantity: ");
result.append(quantity);
result.append(", name: ");
result.append(name);
result.append(')');
return result.toString();
}
} //ResourceImpl

View file

@ -0,0 +1,33 @@
#
pluginName = Petrinet Edit Support
providerName = www.example.org
_UI_CreateChild_text = {0}
_UI_CreateChild_text2 = {1} {0}
_UI_CreateChild_text3 = {1}
_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
_UI_PropertyDescriptor_description = The {0} of the {1}
_UI_Network_type = Network
_UI_Node_type = Node
_UI_Place_type = Place
_UI_Arc_type = Arc
_UI_Transition_type = Transition
_UI_Unknown_type = Object
_UI_Unknown_datatype= Value
_UI_Network_name_feature = Name
_UI_Network_nodes_feature = Nodes
_UI_Node_name_feature = Name
_UI_Place_tokens_feature = Tokens
_UI_Arc_weight_feature = Weight
_UI_Arc_outgoing_feature = Outgoing
_UI_Arc_target_feature = Target
_UI_Transition_arcs_feature = Arcs
_UI_Unknown_feature = Unspecified

View file

@ -0,0 +1,92 @@
/**
*/
package petrinet;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Arc</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link petrinet.Arc#getWeight <em>Weight</em>}</li>
* <li>{@link petrinet.Arc#isOutgoing <em>Outgoing</em>}</li>
* <li>{@link petrinet.Arc#getTarget <em>Target</em>}</li>
* </ul>
*
* @see petrinet.PetrinetPackage#getArc()
* @model
* @generated
*/
public interface Arc extends EObject {
/**
* Returns the value of the '<em><b>Weight</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Weight</em>' attribute.
* @see #setWeight(int)
* @see petrinet.PetrinetPackage#getArc_Weight()
* @model required="true"
* @generated
*/
int getWeight();
/**
* Sets the value of the '{@link petrinet.Arc#getWeight <em>Weight</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Weight</em>' attribute.
* @see #getWeight()
* @generated
*/
void setWeight(int value);
/**
* Returns the value of the '<em><b>Outgoing</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Outgoing</em>' attribute.
* @see #setOutgoing(boolean)
* @see petrinet.PetrinetPackage#getArc_Outgoing()
* @model required="true"
* @generated
*/
boolean isOutgoing();
/**
* Sets the value of the '{@link petrinet.Arc#isOutgoing <em>Outgoing</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Outgoing</em>' attribute.
* @see #isOutgoing()
* @generated
*/
void setOutgoing(boolean value);
/**
* Returns the value of the '<em><b>Target</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Target</em>' reference.
* @see #setTarget(Place)
* @see petrinet.PetrinetPackage#getArc_Target()
* @model required="true"
* @generated
*/
Place getTarget();
/**
* Sets the value of the '{@link petrinet.Arc#getTarget <em>Target</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Target</em>' reference.
* @see #getTarget()
* @generated
*/
void setTarget(Place value);
} // Arc

View file

@ -0,0 +1,63 @@
/**
*/
package petrinet;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Network</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link petrinet.Network#getName <em>Name</em>}</li>
* <li>{@link petrinet.Network#getNodes <em>Nodes</em>}</li>
* </ul>
*
* @see petrinet.PetrinetPackage#getNetwork()
* @model
* @generated
*/
public interface Network extends EObject {
/**
* Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see petrinet.PetrinetPackage#getNetwork_Name()
* @model required="true"
* @generated
*/
String getName();
/**
* Sets the value of the '{@link petrinet.Network#getName <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Name</em>' attribute.
* @see #getName()
* @generated
*/
void setName(String value);
/**
* Returns the value of the '<em><b>Nodes</b></em>' containment reference list.
* The list contents are of type {@link petrinet.Node}.
* It is bidirectional and its opposite is '{@link petrinet.Node#getNetwork <em>Network</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Nodes</em>' containment reference list.
* @see petrinet.PetrinetPackage#getNetwork_Nodes()
* @see petrinet.Node#getNetwork
* @model opposite="network" containment="true"
* @generated
*/
EList<Node> getNodes();
} // Network

View file

@ -0,0 +1,109 @@
/**
*/
package simplepdl.provider;
import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
/**
* This is the item provider adapter for a {@link simplepdl.ProcessElement} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class ProcessElementItemProvider
extends ItemProviderAdapter
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ProcessElementItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
}
return itemPropertyDescriptors;
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
return getString("_UI_ProcessElement_type");
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
super.notifyChanged(notification);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return SimplepdlEditPlugin.INSTANCE;
}
}

View file

@ -0,0 +1,68 @@
/**
*/
package simplepdl;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Resource</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link simplepdl.Resource#getQuantity <em>Quantity</em>}</li>
* <li>{@link simplepdl.Resource#getName <em>Name</em>}</li>
* </ul>
*
* @see simplepdl.SimplepdlPackage#getResource()
* @model
* @generated
*/
public interface Resource extends ProcessElement {
/**
* Returns the value of the '<em><b>Quantity</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Quantity</em>' attribute.
* @see #setQuantity(int)
* @see simplepdl.SimplepdlPackage#getResource_Quantity()
* @model required="true"
* @generated
*/
int getQuantity();
/**
* Sets the value of the '{@link simplepdl.Resource#getQuantity <em>Quantity</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Quantity</em>' attribute.
* @see #getQuantity()
* @generated
*/
void setQuantity(int value);
/**
* Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see simplepdl.SimplepdlPackage#getResource_Name()
* @model required="true"
* @generated
*/
String getName();
/**
* Sets the value of the '{@link simplepdl.Resource#getName <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Name</em>' attribute.
* @see #getName()
* @generated
*/
void setName(String value);
} // Resource

View file

@ -0,0 +1,669 @@
/**
*/
package petrinet;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
/**
* <!-- begin-user-doc -->
* The <b>Package</b> for the model.
* It contains accessors for the meta objects to represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
* <li>each operation of each class,</li>
* <li>each enum,</li>
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
* @see petrinet.PetrinetFactory
* @model kind="package"
* @generated
*/
public interface PetrinetPackage extends EPackage {
/**
* The package name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNAME = "petrinet";
/**
* The package namespace URI.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_URI = "http://petrinet";
/**
* The package namespace name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_PREFIX = "petrinet";
/**
* The singleton instance of the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
PetrinetPackage eINSTANCE = petrinet.impl.PetrinetPackageImpl.init();
/**
* The meta object id for the '{@link petrinet.impl.NetworkImpl <em>Network</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.NetworkImpl
* @see petrinet.impl.PetrinetPackageImpl#getNetwork()
* @generated
*/
int NETWORK = 0;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NETWORK__NAME = 0;
/**
* The feature id for the '<em><b>Nodes</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NETWORK__NODES = 1;
/**
* The number of structural features of the '<em>Network</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NETWORK_FEATURE_COUNT = 2;
/**
* The number of operations of the '<em>Network</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NETWORK_OPERATION_COUNT = 0;
/**
* The meta object id for the '{@link petrinet.impl.NodeImpl <em>Node</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.NodeImpl
* @see petrinet.impl.PetrinetPackageImpl#getNode()
* @generated
*/
int NODE = 1;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NODE__NAME = 0;
/**
* The feature id for the '<em><b>Network</b></em>' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NODE__NETWORK = 1;
/**
* The number of structural features of the '<em>Node</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NODE_FEATURE_COUNT = 2;
/**
* The number of operations of the '<em>Node</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NODE_OPERATION_COUNT = 0;
/**
* The meta object id for the '{@link petrinet.impl.PlaceImpl <em>Place</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.PlaceImpl
* @see petrinet.impl.PetrinetPackageImpl#getPlace()
* @generated
*/
int PLACE = 2;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PLACE__NAME = NODE__NAME;
/**
* The feature id for the '<em><b>Network</b></em>' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PLACE__NETWORK = NODE__NETWORK;
/**
* The feature id for the '<em><b>Tokens</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PLACE__TOKENS = NODE_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Arcs</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PLACE__ARCS = NODE_FEATURE_COUNT + 1;
/**
* The number of structural features of the '<em>Place</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PLACE_FEATURE_COUNT = NODE_FEATURE_COUNT + 2;
/**
* The number of operations of the '<em>Place</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PLACE_OPERATION_COUNT = NODE_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link petrinet.impl.ArcImpl <em>Arc</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.ArcImpl
* @see petrinet.impl.PetrinetPackageImpl#getArc()
* @generated
*/
int ARC = 3;
/**
* The feature id for the '<em><b>Weight</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ARC__WEIGHT = 0;
/**
* The feature id for the '<em><b>Outgoing</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ARC__OUTGOING = 1;
/**
* The feature id for the '<em><b>Place</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ARC__PLACE = 2;
/**
* The feature id for the '<em><b>Transition</b></em>' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ARC__TRANSITION = 3;
/**
* The number of structural features of the '<em>Arc</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ARC_FEATURE_COUNT = 4;
/**
* The number of operations of the '<em>Arc</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ARC_OPERATION_COUNT = 0;
/**
* The meta object id for the '{@link petrinet.impl.TransitionImpl <em>Transition</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.TransitionImpl
* @see petrinet.impl.PetrinetPackageImpl#getTransition()
* @generated
*/
int TRANSITION = 4;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TRANSITION__NAME = NODE__NAME;
/**
* The feature id for the '<em><b>Network</b></em>' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TRANSITION__NETWORK = NODE__NETWORK;
/**
* The feature id for the '<em><b>Arcs</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TRANSITION__ARCS = NODE_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Transition</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TRANSITION_FEATURE_COUNT = NODE_FEATURE_COUNT + 1;
/**
* The number of operations of the '<em>Transition</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TRANSITION_OPERATION_COUNT = NODE_OPERATION_COUNT + 0;
/**
* Returns the meta object for class '{@link petrinet.Network <em>Network</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Network</em>'.
* @see petrinet.Network
* @generated
*/
EClass getNetwork();
/**
* Returns the meta object for the attribute '{@link petrinet.Network#getName <em>Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Name</em>'.
* @see petrinet.Network#getName()
* @see #getNetwork()
* @generated
*/
EAttribute getNetwork_Name();
/**
* Returns the meta object for the containment reference list '{@link petrinet.Network#getNodes <em>Nodes</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Nodes</em>'.
* @see petrinet.Network#getNodes()
* @see #getNetwork()
* @generated
*/
EReference getNetwork_Nodes();
/**
* Returns the meta object for class '{@link petrinet.Node <em>Node</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Node</em>'.
* @see petrinet.Node
* @generated
*/
EClass getNode();
/**
* Returns the meta object for the attribute '{@link petrinet.Node#getName <em>Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Name</em>'.
* @see petrinet.Node#getName()
* @see #getNode()
* @generated
*/
EAttribute getNode_Name();
/**
* Returns the meta object for the container reference '{@link petrinet.Node#getNetwork <em>Network</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the container reference '<em>Network</em>'.
* @see petrinet.Node#getNetwork()
* @see #getNode()
* @generated
*/
EReference getNode_Network();
/**
* Returns the meta object for class '{@link petrinet.Place <em>Place</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Place</em>'.
* @see petrinet.Place
* @generated
*/
EClass getPlace();
/**
* Returns the meta object for the attribute '{@link petrinet.Place#getTokens <em>Tokens</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Tokens</em>'.
* @see petrinet.Place#getTokens()
* @see #getPlace()
* @generated
*/
EAttribute getPlace_Tokens();
/**
* Returns the meta object for the reference list '{@link petrinet.Place#getArcs <em>Arcs</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Arcs</em>'.
* @see petrinet.Place#getArcs()
* @see #getPlace()
* @generated
*/
EReference getPlace_Arcs();
/**
* Returns the meta object for class '{@link petrinet.Arc <em>Arc</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Arc</em>'.
* @see petrinet.Arc
* @generated
*/
EClass getArc();
/**
* Returns the meta object for the attribute '{@link petrinet.Arc#getWeight <em>Weight</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Weight</em>'.
* @see petrinet.Arc#getWeight()
* @see #getArc()
* @generated
*/
EAttribute getArc_Weight();
/**
* Returns the meta object for the attribute '{@link petrinet.Arc#isOutgoing <em>Outgoing</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Outgoing</em>'.
* @see petrinet.Arc#isOutgoing()
* @see #getArc()
* @generated
*/
EAttribute getArc_Outgoing();
/**
* Returns the meta object for the reference '{@link petrinet.Arc#getPlace <em>Place</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Place</em>'.
* @see petrinet.Arc#getPlace()
* @see #getArc()
* @generated
*/
EReference getArc_Place();
/**
* Returns the meta object for the container reference '{@link petrinet.Arc#getTransition <em>Transition</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the container reference '<em>Transition</em>'.
* @see petrinet.Arc#getTransition()
* @see #getArc()
* @generated
*/
EReference getArc_Transition();
/**
* Returns the meta object for class '{@link petrinet.Transition <em>Transition</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Transition</em>'.
* @see petrinet.Transition
* @generated
*/
EClass getTransition();
/**
* Returns the meta object for the containment reference list '{@link petrinet.Transition#getArcs <em>Arcs</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Arcs</em>'.
* @see petrinet.Transition#getArcs()
* @see #getTransition()
* @generated
*/
EReference getTransition_Arcs();
/**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the factory that creates the instances of the model.
* @generated
*/
PetrinetFactory getPetrinetFactory();
/**
* <!-- begin-user-doc -->
* Defines literals for the meta objects that represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
* <li>each operation of each class,</li>
* <li>each enum,</li>
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
* @generated
*/
interface Literals {
/**
* The meta object literal for the '{@link petrinet.impl.NetworkImpl <em>Network</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.NetworkImpl
* @see petrinet.impl.PetrinetPackageImpl#getNetwork()
* @generated
*/
EClass NETWORK = eINSTANCE.getNetwork();
/**
* The meta object literal for the '<em><b>Name</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute NETWORK__NAME = eINSTANCE.getNetwork_Name();
/**
* The meta object literal for the '<em><b>Nodes</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference NETWORK__NODES = eINSTANCE.getNetwork_Nodes();
/**
* The meta object literal for the '{@link petrinet.impl.NodeImpl <em>Node</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.NodeImpl
* @see petrinet.impl.PetrinetPackageImpl#getNode()
* @generated
*/
EClass NODE = eINSTANCE.getNode();
/**
* The meta object literal for the '<em><b>Name</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute NODE__NAME = eINSTANCE.getNode_Name();
/**
* The meta object literal for the '<em><b>Network</b></em>' container reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference NODE__NETWORK = eINSTANCE.getNode_Network();
/**
* The meta object literal for the '{@link petrinet.impl.PlaceImpl <em>Place</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.PlaceImpl
* @see petrinet.impl.PetrinetPackageImpl#getPlace()
* @generated
*/
EClass PLACE = eINSTANCE.getPlace();
/**
* The meta object literal for the '<em><b>Tokens</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute PLACE__TOKENS = eINSTANCE.getPlace_Tokens();
/**
* The meta object literal for the '<em><b>Arcs</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference PLACE__ARCS = eINSTANCE.getPlace_Arcs();
/**
* The meta object literal for the '{@link petrinet.impl.ArcImpl <em>Arc</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.ArcImpl
* @see petrinet.impl.PetrinetPackageImpl#getArc()
* @generated
*/
EClass ARC = eINSTANCE.getArc();
/**
* The meta object literal for the '<em><b>Weight</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ARC__WEIGHT = eINSTANCE.getArc_Weight();
/**
* The meta object literal for the '<em><b>Outgoing</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ARC__OUTGOING = eINSTANCE.getArc_Outgoing();
/**
* The meta object literal for the '<em><b>Place</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference ARC__PLACE = eINSTANCE.getArc_Place();
/**
* The meta object literal for the '<em><b>Transition</b></em>' container reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference ARC__TRANSITION = eINSTANCE.getArc_Transition();
/**
* The meta object literal for the '{@link petrinet.impl.TransitionImpl <em>Transition</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.TransitionImpl
* @see petrinet.impl.PetrinetPackageImpl#getTransition()
* @generated
*/
EClass TRANSITION = eINSTANCE.getTransition();
/**
* The meta object literal for the '<em><b>Arcs</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference TRANSITION__ARCS = eINSTANCE.getTransition_Arcs();
}
} //PetrinetPackage

View file

@ -0,0 +1,128 @@
/**
*/
package petrinet.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import petrinet.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class PetrinetFactoryImpl extends EFactoryImpl implements PetrinetFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static PetrinetFactory init() {
try {
PetrinetFactory thePetrinetFactory = (PetrinetFactory)EPackage.Registry.INSTANCE.getEFactory(PetrinetPackage.eNS_URI);
if (thePetrinetFactory != null) {
return thePetrinetFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new PetrinetFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PetrinetFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case PetrinetPackage.NETWORK: return createNetwork();
case PetrinetPackage.PLACE: return createPlace();
case PetrinetPackage.ARC: return createArc();
case PetrinetPackage.TRANSITION: return createTransition();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Network createNetwork() {
NetworkImpl network = new NetworkImpl();
return network;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Place createPlace() {
PlaceImpl place = new PlaceImpl();
return place;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Arc createArc() {
ArcImpl arc = new ArcImpl();
return arc;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Transition createTransition() {
TransitionImpl transition = new TransitionImpl();
return transition;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PetrinetPackage getPetrinetPackage() {
return (PetrinetPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static PetrinetPackage getPackage() {
return PetrinetPackage.eINSTANCE;
}
} //PetrinetFactoryImpl

View file

@ -0,0 +1,279 @@
/**
*/
package petrinet.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import petrinet.Arc;
import petrinet.PetrinetPackage;
import petrinet.Place;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Arc</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link petrinet.impl.ArcImpl#getWeight <em>Weight</em>}</li>
* <li>{@link petrinet.impl.ArcImpl#isOutgoing <em>Outgoing</em>}</li>
* <li>{@link petrinet.impl.ArcImpl#getTarget <em>Target</em>}</li>
* </ul>
*
* @generated
*/
public class ArcImpl extends MinimalEObjectImpl.Container implements Arc {
/**
* The default value of the '{@link #getWeight() <em>Weight</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getWeight()
* @generated
* @ordered
*/
protected static final int WEIGHT_EDEFAULT = 0;
/**
* The cached value of the '{@link #getWeight() <em>Weight</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getWeight()
* @generated
* @ordered
*/
protected int weight = WEIGHT_EDEFAULT;
/**
* The default value of the '{@link #isOutgoing() <em>Outgoing</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isOutgoing()
* @generated
* @ordered
*/
protected static final boolean OUTGOING_EDEFAULT = false;
/**
* The cached value of the '{@link #isOutgoing() <em>Outgoing</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isOutgoing()
* @generated
* @ordered
*/
protected boolean outgoing = OUTGOING_EDEFAULT;
/**
* The cached value of the '{@link #getTarget() <em>Target</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getTarget()
* @generated
* @ordered
*/
protected Place target;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ArcImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return PetrinetPackage.Literals.ARC;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getWeight() {
return weight;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setWeight(int newWeight) {
int oldWeight = weight;
weight = newWeight;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PetrinetPackage.ARC__WEIGHT, oldWeight, weight));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isOutgoing() {
return outgoing;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setOutgoing(boolean newOutgoing) {
boolean oldOutgoing = outgoing;
outgoing = newOutgoing;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PetrinetPackage.ARC__OUTGOING, oldOutgoing, outgoing));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Place getTarget() {
if (target != null && target.eIsProxy()) {
InternalEObject oldTarget = (InternalEObject)target;
target = (Place)eResolveProxy(oldTarget);
if (target != oldTarget) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, PetrinetPackage.ARC__TARGET, oldTarget, target));
}
}
return target;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Place basicGetTarget() {
return target;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setTarget(Place newTarget) {
Place oldTarget = target;
target = newTarget;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PetrinetPackage.ARC__TARGET, oldTarget, target));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PetrinetPackage.ARC__WEIGHT:
return getWeight();
case PetrinetPackage.ARC__OUTGOING:
return isOutgoing();
case PetrinetPackage.ARC__TARGET:
if (resolve) return getTarget();
return basicGetTarget();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PetrinetPackage.ARC__WEIGHT:
setWeight((Integer)newValue);
return;
case PetrinetPackage.ARC__OUTGOING:
setOutgoing((Boolean)newValue);
return;
case PetrinetPackage.ARC__TARGET:
setTarget((Place)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PetrinetPackage.ARC__WEIGHT:
setWeight(WEIGHT_EDEFAULT);
return;
case PetrinetPackage.ARC__OUTGOING:
setOutgoing(OUTGOING_EDEFAULT);
return;
case PetrinetPackage.ARC__TARGET:
setTarget((Place)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PetrinetPackage.ARC__WEIGHT:
return weight != WEIGHT_EDEFAULT;
case PetrinetPackage.ARC__OUTGOING:
return outgoing != OUTGOING_EDEFAULT;
case PetrinetPackage.ARC__TARGET:
return target != null;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (weight: ");
result.append(weight);
result.append(", outgoing: ");
result.append(outgoing);
result.append(')');
return result.toString();
}
} //ArcImpl

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/fr.n7.petrinet/src" modelPluginID="fr.n7.petrinet"
modelName="Petrinet" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0" copyrightFields="false"
operationReflection="true" importOrganizing="true">
<foreignModel>petriNet.ecore</foreignModel>
<genPackages prefix="Petrinet" disposableProviderFactory="true" ecorePackage="petriNet.ecore#/">
<genClasses ecoreClass="petriNet.ecore#//Network">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute petriNet.ecore#//Network/name"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference petriNet.ecore#//Network/nodes"/>
</genClasses>
<genClasses image="false" ecoreClass="petriNet.ecore#//Node">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute petriNet.ecore#//Node/name"/>
</genClasses>
<genClasses ecoreClass="petriNet.ecore#//Place">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute petriNet.ecore#//Place/tokens"/>
</genClasses>
<genClasses ecoreClass="petriNet.ecore#//Arc">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute petriNet.ecore#//Arc/weight"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute petriNet.ecore#//Arc/outgoing"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference petriNet.ecore#//Arc/target"/>
</genClasses>
<genClasses ecoreClass="petriNet.ecore#//Transition">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference petriNet.ecore#//Transition/arcs"/>
</genClasses>
</genPackages>
</genmodel:GenModel>

View file

@ -0,0 +1,374 @@
/**
*/
package petrinet.impl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import petrinet.Arc;
import petrinet.Network;
import petrinet.Node;
import petrinet.PetrinetFactory;
import petrinet.PetrinetPackage;
import petrinet.Place;
import petrinet.Transition;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
* @generated
*/
public class PetrinetPackageImpl extends EPackageImpl implements PetrinetPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass networkEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass nodeEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass placeEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass arcEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass transitionEClass = null;
/**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
* <p>Note: the correct way to create the package is via the static
* factory method {@link #init init()}, which also performs
* initialization of the package, or returns the registered package,
* if one already exists.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see petrinet.PetrinetPackage#eNS_URI
* @see #init()
* @generated
*/
private PetrinetPackageImpl() {
super(eNS_URI, PetrinetFactory.eINSTANCE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static boolean isInited = false;
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link PetrinetPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static PetrinetPackage init() {
if (isInited) return (PetrinetPackage)EPackage.Registry.INSTANCE.getEPackage(PetrinetPackage.eNS_URI);
// Obtain or create and register package
Object registeredPetrinetPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
PetrinetPackageImpl thePetrinetPackage = registeredPetrinetPackage instanceof PetrinetPackageImpl ? (PetrinetPackageImpl)registeredPetrinetPackage : new PetrinetPackageImpl();
isInited = true;
// Create package meta-data objects
thePetrinetPackage.createPackageContents();
// Initialize created meta-data
thePetrinetPackage.initializePackageContents();
// Mark meta-data to indicate it can't be changed
thePetrinetPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(PetrinetPackage.eNS_URI, thePetrinetPackage);
return thePetrinetPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getNetwork() {
return networkEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getNetwork_Name() {
return (EAttribute)networkEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getNetwork_Nodes() {
return (EReference)networkEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getNode() {
return nodeEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getNode_Name() {
return (EAttribute)nodeEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getNode_Network() {
return (EReference)nodeEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPlace() {
return placeEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPlace_Tokens() {
return (EAttribute)placeEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPlace_Arcs() {
return (EReference)placeEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getArc() {
return arcEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getArc_Weight() {
return (EAttribute)arcEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getArc_Outgoing() {
return (EAttribute)arcEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getArc_Place() {
return (EReference)arcEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getArc_Transition() {
return (EReference)arcEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getTransition() {
return transitionEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getTransition_Arcs() {
return (EReference)transitionEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PetrinetFactory getPetrinetFactory() {
return (PetrinetFactory)getEFactoryInstance();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isCreated = false;
/**
* Creates the meta-model objects for the package. This method is
* guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void createPackageContents() {
if (isCreated) return;
isCreated = true;
// Create classes and their features
networkEClass = createEClass(NETWORK);
createEAttribute(networkEClass, NETWORK__NAME);
createEReference(networkEClass, NETWORK__NODES);
nodeEClass = createEClass(NODE);
createEAttribute(nodeEClass, NODE__NAME);
createEReference(nodeEClass, NODE__NETWORK);
placeEClass = createEClass(PLACE);
createEAttribute(placeEClass, PLACE__TOKENS);
createEReference(placeEClass, PLACE__ARCS);
arcEClass = createEClass(ARC);
createEAttribute(arcEClass, ARC__WEIGHT);
createEAttribute(arcEClass, ARC__OUTGOING);
createEReference(arcEClass, ARC__PLACE);
createEReference(arcEClass, ARC__TRANSITION);
transitionEClass = createEClass(TRANSITION);
createEReference(transitionEClass, TRANSITION__ARCS);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isInitialized = false;
/**
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void initializePackageContents() {
if (isInitialized) return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
placeEClass.getESuperTypes().add(this.getNode());
transitionEClass.getESuperTypes().add(this.getNode());
// Initialize classes, features, and operations; add parameters
initEClass(networkEClass, Network.class, "Network", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getNetwork_Name(), ecorePackage.getEString(), "name", null, 1, 1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getNetwork_Nodes(), this.getNode(), this.getNode_Network(), "nodes", null, 0, -1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(nodeEClass, Node.class, "Node", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getNode_Name(), ecorePackage.getEString(), "name", null, 1, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getNode_Network(), this.getNetwork(), this.getNetwork_Nodes(), "network", null, 1, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(placeEClass, Place.class, "Place", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPlace_Tokens(), ecorePackage.getEInt(), "tokens", null, 1, 1, Place.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPlace_Arcs(), this.getArc(), this.getArc_Place(), "arcs", null, 0, -1, Place.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(arcEClass, Arc.class, "Arc", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getArc_Weight(), ecorePackage.getEInt(), "weight", null, 1, 1, Arc.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getArc_Outgoing(), ecorePackage.getEBoolean(), "outgoing", null, 1, 1, Arc.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getArc_Place(), this.getPlace(), this.getPlace_Arcs(), "place", null, 1, 1, Arc.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getArc_Transition(), this.getTransition(), this.getTransition_Arcs(), "transition", null, 1, 1, Arc.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(transitionEClass, Transition.class, "Transition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getTransition_Arcs(), this.getArc(), this.getArc_Transition(), "arcs", null, 0, -1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Create resource
createResource(eNS_URI);
}
} //PetrinetPackageImpl

View file

@ -0,0 +1,236 @@
/**
*/
package petrinet.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
import org.eclipse.emf.ecore.util.InternalEList;
import petrinet.Network;
import petrinet.Node;
import petrinet.PetrinetPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Network</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link petrinet.impl.NetworkImpl#getName <em>Name</em>}</li>
* <li>{@link petrinet.impl.NetworkImpl#getNodes <em>Nodes</em>}</li>
* </ul>
*
* @generated
*/
public class NetworkImpl extends MinimalEObjectImpl.Container implements Network {
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The cached value of the '{@link #getNodes() <em>Nodes</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getNodes()
* @generated
* @ordered
*/
protected EList<Node> nodes;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected NetworkImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return PetrinetPackage.Literals.NETWORK;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PetrinetPackage.NETWORK__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Node> getNodes() {
if (nodes == null) {
nodes = new EObjectContainmentWithInverseEList<Node>(Node.class, this, PetrinetPackage.NETWORK__NODES, PetrinetPackage.NODE__NETWORK);
}
return nodes;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case PetrinetPackage.NETWORK__NODES:
return ((InternalEList<InternalEObject>)(InternalEList<?>)getNodes()).basicAdd(otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case PetrinetPackage.NETWORK__NODES:
return ((InternalEList<?>)getNodes()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PetrinetPackage.NETWORK__NAME:
return getName();
case PetrinetPackage.NETWORK__NODES:
return getNodes();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PetrinetPackage.NETWORK__NAME:
setName((String)newValue);
return;
case PetrinetPackage.NETWORK__NODES:
getNodes().clear();
getNodes().addAll((Collection<? extends Node>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PetrinetPackage.NETWORK__NAME:
setName(NAME_EDEFAULT);
return;
case PetrinetPackage.NETWORK__NODES:
getNodes().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PetrinetPackage.NETWORK__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case PetrinetPackage.NETWORK__NODES:
return nodes != null && !nodes.isEmpty();
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (name: ");
result.append(name);
result.append(')');
return result.toString();
}
} //NetworkImpl

View file

@ -0,0 +1,489 @@
/**
*/
package simplepdl.impl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import simplepdl.Guidance;
import simplepdl.ProcessElement;
import simplepdl.Request;
import simplepdl.Resource;
import simplepdl.SimplepdlFactory;
import simplepdl.SimplepdlPackage;
import simplepdl.WorkDefinition;
import simplepdl.WorkSequence;
import simplepdl.WorkSequenceType;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
* @generated
*/
public class SimplepdlPackageImpl extends EPackageImpl implements SimplepdlPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass processElementEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass workDefinitionEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass workSequenceEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass processEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass guidanceEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass resourceEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass requestEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum workSequenceTypeEEnum = null;
/**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
* <p>Note: the correct way to create the package is via the static
* factory method {@link #init init()}, which also performs
* initialization of the package, or returns the registered package,
* if one already exists.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see simplepdl.SimplepdlPackage#eNS_URI
* @see #init()
* @generated
*/
private SimplepdlPackageImpl() {
super(eNS_URI, SimplepdlFactory.eINSTANCE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static boolean isInited = false;
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link SimplepdlPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static SimplepdlPackage init() {
if (isInited) return (SimplepdlPackage)EPackage.Registry.INSTANCE.getEPackage(SimplepdlPackage.eNS_URI);
// Obtain or create and register package
Object registeredSimplepdlPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
SimplepdlPackageImpl theSimplepdlPackage = registeredSimplepdlPackage instanceof SimplepdlPackageImpl ? (SimplepdlPackageImpl)registeredSimplepdlPackage : new SimplepdlPackageImpl();
isInited = true;
// Create package meta-data objects
theSimplepdlPackage.createPackageContents();
// Initialize created meta-data
theSimplepdlPackage.initializePackageContents();
// Mark meta-data to indicate it can't be changed
theSimplepdlPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(SimplepdlPackage.eNS_URI, theSimplepdlPackage);
return theSimplepdlPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getProcessElement() {
return processElementEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getWorkDefinition() {
return workDefinitionEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getWorkDefinition_LinksToPredecessors() {
return (EReference)workDefinitionEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getWorkDefinition_LinksToSuccessors() {
return (EReference)workDefinitionEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getWorkDefinition_Name() {
return (EAttribute)workDefinitionEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getWorkDefinition_Requests() {
return (EReference)workDefinitionEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getWorkSequence() {
return workSequenceEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getWorkSequence_LinkType() {
return (EAttribute)workSequenceEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getWorkSequence_Predecessor() {
return (EReference)workSequenceEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getWorkSequence_Successor() {
return (EReference)workSequenceEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getProcess() {
return processEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getProcess_Name() {
return (EAttribute)processEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getProcess_ProcessElements() {
return (EReference)processEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getGuidance() {
return guidanceEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getGuidance_Text() {
return (EAttribute)guidanceEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getGuidance_Elements() {
return (EReference)guidanceEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getResource() {
return resourceEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getResource_Quantity() {
return (EAttribute)resourceEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getResource_Name() {
return (EAttribute)resourceEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getRequest() {
return requestEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getRequest_Quantity() {
return (EAttribute)requestEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getRequest_Target() {
return (EReference)requestEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getWorkSequenceType() {
return workSequenceTypeEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SimplepdlFactory getSimplepdlFactory() {
return (SimplepdlFactory)getEFactoryInstance();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isCreated = false;
/**
* Creates the meta-model objects for the package. This method is
* guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void createPackageContents() {
if (isCreated) return;
isCreated = true;
// Create classes and their features
processElementEClass = createEClass(PROCESS_ELEMENT);
workDefinitionEClass = createEClass(WORK_DEFINITION);
createEReference(workDefinitionEClass, WORK_DEFINITION__LINKS_TO_PREDECESSORS);
createEReference(workDefinitionEClass, WORK_DEFINITION__LINKS_TO_SUCCESSORS);
createEAttribute(workDefinitionEClass, WORK_DEFINITION__NAME);
createEReference(workDefinitionEClass, WORK_DEFINITION__REQUESTS);
workSequenceEClass = createEClass(WORK_SEQUENCE);
createEAttribute(workSequenceEClass, WORK_SEQUENCE__LINK_TYPE);
createEReference(workSequenceEClass, WORK_SEQUENCE__PREDECESSOR);
createEReference(workSequenceEClass, WORK_SEQUENCE__SUCCESSOR);
processEClass = createEClass(PROCESS);
createEAttribute(processEClass, PROCESS__NAME);
createEReference(processEClass, PROCESS__PROCESS_ELEMENTS);
guidanceEClass = createEClass(GUIDANCE);
createEAttribute(guidanceEClass, GUIDANCE__TEXT);
createEReference(guidanceEClass, GUIDANCE__ELEMENTS);
resourceEClass = createEClass(RESOURCE);
createEAttribute(resourceEClass, RESOURCE__QUANTITY);
createEAttribute(resourceEClass, RESOURCE__NAME);
requestEClass = createEClass(REQUEST);
createEAttribute(requestEClass, REQUEST__QUANTITY);
createEReference(requestEClass, REQUEST__TARGET);
// Create enums
workSequenceTypeEEnum = createEEnum(WORK_SEQUENCE_TYPE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isInitialized = false;
/**
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void initializePackageContents() {
if (isInitialized) return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
workDefinitionEClass.getESuperTypes().add(this.getProcessElement());
workSequenceEClass.getESuperTypes().add(this.getProcessElement());
guidanceEClass.getESuperTypes().add(this.getProcessElement());
resourceEClass.getESuperTypes().add(this.getProcessElement());
// Initialize classes, features, and operations; add parameters
initEClass(processElementEClass, ProcessElement.class, "ProcessElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(workDefinitionEClass, WorkDefinition.class, "WorkDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getWorkDefinition_LinksToPredecessors(), this.getWorkSequence(), this.getWorkSequence_Successor(), "linksToPredecessors", null, 0, -1, WorkDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getWorkDefinition_LinksToSuccessors(), this.getWorkSequence(), this.getWorkSequence_Predecessor(), "linksToSuccessors", null, 0, -1, WorkDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getWorkDefinition_Name(), ecorePackage.getEString(), "name", null, 1, 1, WorkDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getWorkDefinition_Requests(), this.getRequest(), null, "requests", null, 0, -1, WorkDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(workSequenceEClass, WorkSequence.class, "WorkSequence", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getWorkSequence_LinkType(), this.getWorkSequenceType(), "linkType", null, 1, 1, WorkSequence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getWorkSequence_Predecessor(), this.getWorkDefinition(), this.getWorkDefinition_LinksToSuccessors(), "predecessor", null, 1, 1, WorkSequence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getWorkSequence_Successor(), this.getWorkDefinition(), this.getWorkDefinition_LinksToPredecessors(), "successor", null, 1, 1, WorkSequence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(processEClass, simplepdl.Process.class, "Process", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getProcess_Name(), ecorePackage.getEString(), "name", null, 1, 1, simplepdl.Process.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getProcess_ProcessElements(), this.getProcessElement(), null, "processElements", null, 0, -1, simplepdl.Process.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(guidanceEClass, Guidance.class, "Guidance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getGuidance_Text(), ecorePackage.getEString(), "text", null, 1, 1, Guidance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getGuidance_Elements(), this.getProcessElement(), null, "elements", null, 0, -1, Guidance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(resourceEClass, Resource.class, "Resource", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getResource_Quantity(), ecorePackage.getEInt(), "quantity", null, 1, 1, Resource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getResource_Name(), ecorePackage.getEString(), "name", null, 1, 1, Resource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(requestEClass, Request.class, "Request", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getRequest_Quantity(), ecorePackage.getEInt(), "quantity", null, 1, 1, Request.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getRequest_Target(), this.getResource(), null, "target", null, 1, 1, Request.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Initialize enums and add enum literals
initEEnum(workSequenceTypeEEnum, WorkSequenceType.class, "WorkSequenceType");
addEEnumLiteral(workSequenceTypeEEnum, WorkSequenceType.START_TO_START);
addEEnumLiteral(workSequenceTypeEEnum, WorkSequenceType.FINISH_TO_START);
addEEnumLiteral(workSequenceTypeEEnum, WorkSequenceType.START_TO_FINISH);
addEEnumLiteral(workSequenceTypeEEnum, WorkSequenceType.FINISH_TO_FINISH);
// Create resource
createResource(eNS_URI);
}
} //SimplepdlPackageImpl

View file

@ -0,0 +1,39 @@
/**
*/
package simplepdl.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import simplepdl.ProcessElement;
import simplepdl.SimplepdlPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Process Element</b></em>'.
* <!-- end-user-doc -->
*
* @generated
*/
public abstract class ProcessElementImpl extends MinimalEObjectImpl.Container implements ProcessElement {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ProcessElementImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return SimplepdlPackage.Literals.PROCESS_ELEMENT;
}
} //ProcessElementImpl

View file

@ -0,0 +1,162 @@
/**
*/
package petrinet.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import petrinet.PetrinetPackage;
import petrinet.Place;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Place</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link petrinet.impl.PlaceImpl#getTokens <em>Tokens</em>}</li>
* </ul>
*
* @generated
*/
public class PlaceImpl extends NodeImpl implements Place {
/**
* The default value of the '{@link #getTokens() <em>Tokens</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getTokens()
* @generated
* @ordered
*/
protected static final int TOKENS_EDEFAULT = 0;
/**
* The cached value of the '{@link #getTokens() <em>Tokens</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getTokens()
* @generated
* @ordered
*/
protected int tokens = TOKENS_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PlaceImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return PetrinetPackage.Literals.PLACE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getTokens() {
return tokens;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setTokens(int newTokens) {
int oldTokens = tokens;
tokens = newTokens;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PetrinetPackage.PLACE__TOKENS, oldTokens, tokens));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PetrinetPackage.PLACE__TOKENS:
return getTokens();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PetrinetPackage.PLACE__TOKENS:
setTokens((Integer)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PetrinetPackage.PLACE__TOKENS:
setTokens(TOKENS_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PetrinetPackage.PLACE__TOKENS:
return tokens != TOKENS_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (tokens: ");
result.append(tokens);
result.append(')');
return result.toString();
}
} //PlaceImpl

View file

@ -0,0 +1,341 @@
/**
*/
package petrinet.impl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import petrinet.Arc;
import petrinet.Network;
import petrinet.Node;
import petrinet.PetrinetFactory;
import petrinet.PetrinetPackage;
import petrinet.Place;
import petrinet.Transition;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
* @generated
*/
public class PetrinetPackageImpl extends EPackageImpl implements PetrinetPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass networkEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass nodeEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass placeEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass arcEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass transitionEClass = null;
/**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
* <p>Note: the correct way to create the package is via the static
* factory method {@link #init init()}, which also performs
* initialization of the package, or returns the registered package,
* if one already exists.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see petrinet.PetrinetPackage#eNS_URI
* @see #init()
* @generated
*/
private PetrinetPackageImpl() {
super(eNS_URI, PetrinetFactory.eINSTANCE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static boolean isInited = false;
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link PetrinetPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static PetrinetPackage init() {
if (isInited) return (PetrinetPackage)EPackage.Registry.INSTANCE.getEPackage(PetrinetPackage.eNS_URI);
// Obtain or create and register package
Object registeredPetrinetPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
PetrinetPackageImpl thePetrinetPackage = registeredPetrinetPackage instanceof PetrinetPackageImpl ? (PetrinetPackageImpl)registeredPetrinetPackage : new PetrinetPackageImpl();
isInited = true;
// Create package meta-data objects
thePetrinetPackage.createPackageContents();
// Initialize created meta-data
thePetrinetPackage.initializePackageContents();
// Mark meta-data to indicate it can't be changed
thePetrinetPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(PetrinetPackage.eNS_URI, thePetrinetPackage);
return thePetrinetPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getNetwork() {
return networkEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getNetwork_Name() {
return (EAttribute)networkEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getNetwork_Nodes() {
return (EReference)networkEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getNode() {
return nodeEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getNode_Name() {
return (EAttribute)nodeEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPlace() {
return placeEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPlace_Tokens() {
return (EAttribute)placeEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getArc() {
return arcEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getArc_Weight() {
return (EAttribute)arcEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getArc_Outgoing() {
return (EAttribute)arcEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getArc_Target() {
return (EReference)arcEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getTransition() {
return transitionEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getTransition_Arcs() {
return (EReference)transitionEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PetrinetFactory getPetrinetFactory() {
return (PetrinetFactory)getEFactoryInstance();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isCreated = false;
/**
* Creates the meta-model objects for the package. This method is
* guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void createPackageContents() {
if (isCreated) return;
isCreated = true;
// Create classes and their features
networkEClass = createEClass(NETWORK);
createEAttribute(networkEClass, NETWORK__NAME);
createEReference(networkEClass, NETWORK__NODES);
nodeEClass = createEClass(NODE);
createEAttribute(nodeEClass, NODE__NAME);
placeEClass = createEClass(PLACE);
createEAttribute(placeEClass, PLACE__TOKENS);
arcEClass = createEClass(ARC);
createEAttribute(arcEClass, ARC__WEIGHT);
createEAttribute(arcEClass, ARC__OUTGOING);
createEReference(arcEClass, ARC__TARGET);
transitionEClass = createEClass(TRANSITION);
createEReference(transitionEClass, TRANSITION__ARCS);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isInitialized = false;
/**
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void initializePackageContents() {
if (isInitialized) return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
placeEClass.getESuperTypes().add(this.getNode());
transitionEClass.getESuperTypes().add(this.getNode());
// Initialize classes, features, and operations; add parameters
initEClass(networkEClass, Network.class, "Network", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getNetwork_Name(), ecorePackage.getEString(), "name", null, 1, 1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getNetwork_Nodes(), this.getNode(), null, "nodes", null, 0, -1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(nodeEClass, Node.class, "Node", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getNode_Name(), ecorePackage.getEString(), "name", null, 1, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(placeEClass, Place.class, "Place", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPlace_Tokens(), ecorePackage.getEInt(), "tokens", null, 1, 1, Place.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(arcEClass, Arc.class, "Arc", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getArc_Weight(), ecorePackage.getEInt(), "weight", null, 1, 1, Arc.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getArc_Outgoing(), ecorePackage.getEBoolean(), "outgoing", null, 1, 1, Arc.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getArc_Target(), this.getPlace(), null, "target", null, 1, 1, Arc.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(transitionEClass, Transition.class, "Transition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getTransition_Arcs(), this.getArc(), null, "arcs", null, 0, -1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Create resource
createResource(eNS_URI);
}
} //PetrinetPackageImpl

View file

@ -0,0 +1,163 @@
/**
*/
package petrinet.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import petrinet.Node;
import petrinet.PetrinetPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Node</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link petrinet.impl.NodeImpl#getName <em>Name</em>}</li>
* </ul>
*
* @generated
*/
public abstract class NodeImpl extends MinimalEObjectImpl.Container implements Node {
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected NodeImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return PetrinetPackage.Literals.NODE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PetrinetPackage.NODE__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PetrinetPackage.NODE__NAME:
return getName();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PetrinetPackage.NODE__NAME:
setName((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PetrinetPackage.NODE__NAME:
setName(NAME_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PetrinetPackage.NODE__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (name: ");
result.append(name);
result.append(')');
return result.toString();
}
} //NodeImpl

View file

@ -0,0 +1,207 @@
/**
*/
package petrinet.provider;
import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
import petrinet.Arc;
import petrinet.PetrinetPackage;
/**
* This is the item provider adapter for a {@link petrinet.Arc} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class ArcItemProvider
extends ItemProviderAdapter
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ArcItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addWeightPropertyDescriptor(object);
addOutgoingPropertyDescriptor(object);
addTargetPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Weight feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addWeightPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Arc_weight_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Arc_weight_feature", "_UI_Arc_type"),
PetrinetPackage.Literals.ARC__WEIGHT,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Outgoing feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addOutgoingPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Arc_outgoing_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Arc_outgoing_feature", "_UI_Arc_type"),
PetrinetPackage.Literals.ARC__OUTGOING,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Target feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addTargetPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Arc_target_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Arc_target_feature", "_UI_Arc_type"),
PetrinetPackage.Literals.ARC__TARGET,
true,
false,
true,
null,
null,
null));
}
/**
* This returns Arc.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Arc"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
boolean outgoing = ((Arc)object).isOutgoing();
int weight = ((Arc)object).getWeight();
String target = ((Arc)object).getTarget() != null ? ((Arc)object).getTarget().getName() : "";
return outgoing ?
" --" + weight + "--> " + target :
"<--" + weight + "-- " + target;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Arc.class)) {
case PetrinetPackage.ARC__WEIGHT:
case PetrinetPackage.ARC__OUTGOING:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return PetrinetEditPlugin.INSTANCE;
}
}

View file

@ -0,0 +1,237 @@
/**
*/
package petrinet.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
import org.eclipse.emf.ecore.util.InternalEList;
import petrinet.Network;
import petrinet.Node;
import petrinet.PetrinetPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Network</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link petrinet.impl.NetworkImpl#getName <em>Name</em>}</li>
* <li>{@link petrinet.impl.NetworkImpl#getNodes <em>Nodes</em>}</li>
* </ul>
*
* @generated
*/
public class NetworkImpl extends MinimalEObjectImpl.Container implements Network {
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The cached value of the '{@link #getNodes() <em>Nodes</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getNodes()
* @generated
* @ordered
*/
protected EList<Node> nodes;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected NetworkImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return PetrinetPackage.Literals.NETWORK;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PetrinetPackage.NETWORK__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Node> getNodes() {
if (nodes == null) {
nodes = new EObjectContainmentWithInverseEList<Node>(Node.class, this, PetrinetPackage.NETWORK__NODES, PetrinetPackage.NODE__NETWORK);
}
return nodes;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case PetrinetPackage.NETWORK__NODES:
return ((InternalEList<InternalEObject>)(InternalEList<?>)getNodes()).basicAdd(otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case PetrinetPackage.NETWORK__NODES:
return ((InternalEList<?>)getNodes()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PetrinetPackage.NETWORK__NAME:
return getName();
case PetrinetPackage.NETWORK__NODES:
return getNodes();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PetrinetPackage.NETWORK__NAME:
setName((String)newValue);
return;
case PetrinetPackage.NETWORK__NODES:
getNodes().clear();
getNodes().addAll((Collection<? extends Node>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PetrinetPackage.NETWORK__NAME:
setName(NAME_EDEFAULT);
return;
case PetrinetPackage.NETWORK__NODES:
getNodes().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PetrinetPackage.NETWORK__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case PetrinetPackage.NETWORK__NODES:
return nodes != null && !nodes.isEmpty();
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (name: ");
result.append(name);
result.append(')');
return result.toString();
}
} //NetworkImpl

View file

@ -0,0 +1,204 @@
/**
*/
package simplepdl.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import simplepdl.Guidance;
import simplepdl.ProcessElement;
import simplepdl.SimplepdlPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Guidance</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link simplepdl.impl.GuidanceImpl#getText <em>Text</em>}</li>
* <li>{@link simplepdl.impl.GuidanceImpl#getElements <em>Elements</em>}</li>
* </ul>
*
* @generated
*/
public class GuidanceImpl extends ProcessElementImpl implements Guidance {
/**
* The default value of the '{@link #getText() <em>Text</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getText()
* @generated
* @ordered
*/
protected static final String TEXT_EDEFAULT = null;
/**
* The cached value of the '{@link #getText() <em>Text</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getText()
* @generated
* @ordered
*/
protected String text = TEXT_EDEFAULT;
/**
* The cached value of the '{@link #getElements() <em>Elements</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getElements()
* @generated
* @ordered
*/
protected EList<ProcessElement> elements;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected GuidanceImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return SimplepdlPackage.Literals.GUIDANCE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getText() {
return text;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setText(String newText) {
String oldText = text;
text = newText;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.GUIDANCE__TEXT, oldText, text));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<ProcessElement> getElements() {
if (elements == null) {
elements = new EObjectResolvingEList<ProcessElement>(ProcessElement.class, this, SimplepdlPackage.GUIDANCE__ELEMENTS);
}
return elements;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case SimplepdlPackage.GUIDANCE__TEXT:
return getText();
case SimplepdlPackage.GUIDANCE__ELEMENTS:
return getElements();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case SimplepdlPackage.GUIDANCE__TEXT:
setText((String)newValue);
return;
case SimplepdlPackage.GUIDANCE__ELEMENTS:
getElements().clear();
getElements().addAll((Collection<? extends ProcessElement>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case SimplepdlPackage.GUIDANCE__TEXT:
setText(TEXT_EDEFAULT);
return;
case SimplepdlPackage.GUIDANCE__ELEMENTS:
getElements().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case SimplepdlPackage.GUIDANCE__TEXT:
return TEXT_EDEFAULT == null ? text != null : !TEXT_EDEFAULT.equals(text);
case SimplepdlPackage.GUIDANCE__ELEMENTS:
return elements != null && !elements.isEmpty();
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (text: ");
result.append(text);
result.append(')');
return result.toString();
}
} //GuidanceImpl

View file

@ -0,0 +1,374 @@
/**
*/
package petrinet.impl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import petrinet.Arc;
import petrinet.Network;
import petrinet.Node;
import petrinet.PetrinetFactory;
import petrinet.PetrinetPackage;
import petrinet.Place;
import petrinet.Transition;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
* @generated
*/
public class PetrinetPackageImpl extends EPackageImpl implements PetrinetPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass networkEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass nodeEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass placeEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass arcEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass transitionEClass = null;
/**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
* <p>Note: the correct way to create the package is via the static
* factory method {@link #init init()}, which also performs
* initialization of the package, or returns the registered package,
* if one already exists.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see petrinet.PetrinetPackage#eNS_URI
* @see #init()
* @generated
*/
private PetrinetPackageImpl() {
super(eNS_URI, PetrinetFactory.eINSTANCE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static boolean isInited = false;
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link PetrinetPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static PetrinetPackage init() {
if (isInited) return (PetrinetPackage)EPackage.Registry.INSTANCE.getEPackage(PetrinetPackage.eNS_URI);
// Obtain or create and register package
Object registeredPetrinetPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
PetrinetPackageImpl thePetrinetPackage = registeredPetrinetPackage instanceof PetrinetPackageImpl ? (PetrinetPackageImpl)registeredPetrinetPackage : new PetrinetPackageImpl();
isInited = true;
// Create package meta-data objects
thePetrinetPackage.createPackageContents();
// Initialize created meta-data
thePetrinetPackage.initializePackageContents();
// Mark meta-data to indicate it can't be changed
thePetrinetPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(PetrinetPackage.eNS_URI, thePetrinetPackage);
return thePetrinetPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getNetwork() {
return networkEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getNetwork_Name() {
return (EAttribute)networkEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getNetwork_Nodes() {
return (EReference)networkEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getNode() {
return nodeEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getNode_Name() {
return (EAttribute)nodeEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getNode_Network() {
return (EReference)nodeEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPlace() {
return placeEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPlace_Tokens() {
return (EAttribute)placeEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPlace_Arcs() {
return (EReference)placeEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getArc() {
return arcEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getArc_Weight() {
return (EAttribute)arcEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getArc_Outgoing() {
return (EAttribute)arcEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getArc_Place() {
return (EReference)arcEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getArc_Transition() {
return (EReference)arcEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getTransition() {
return transitionEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getTransition_Arcs() {
return (EReference)transitionEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PetrinetFactory getPetrinetFactory() {
return (PetrinetFactory)getEFactoryInstance();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isCreated = false;
/**
* Creates the meta-model objects for the package. This method is
* guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void createPackageContents() {
if (isCreated) return;
isCreated = true;
// Create classes and their features
networkEClass = createEClass(NETWORK);
createEAttribute(networkEClass, NETWORK__NAME);
createEReference(networkEClass, NETWORK__NODES);
nodeEClass = createEClass(NODE);
createEAttribute(nodeEClass, NODE__NAME);
createEReference(nodeEClass, NODE__NETWORK);
placeEClass = createEClass(PLACE);
createEAttribute(placeEClass, PLACE__TOKENS);
createEReference(placeEClass, PLACE__ARCS);
arcEClass = createEClass(ARC);
createEAttribute(arcEClass, ARC__WEIGHT);
createEAttribute(arcEClass, ARC__OUTGOING);
createEReference(arcEClass, ARC__PLACE);
createEReference(arcEClass, ARC__TRANSITION);
transitionEClass = createEClass(TRANSITION);
createEReference(transitionEClass, TRANSITION__ARCS);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isInitialized = false;
/**
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void initializePackageContents() {
if (isInitialized) return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
placeEClass.getESuperTypes().add(this.getNode());
transitionEClass.getESuperTypes().add(this.getNode());
// Initialize classes, features, and operations; add parameters
initEClass(networkEClass, Network.class, "Network", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getNetwork_Name(), ecorePackage.getEString(), "name", null, 1, 1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getNetwork_Nodes(), this.getNode(), this.getNode_Network(), "nodes", null, 0, -1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(nodeEClass, Node.class, "Node", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getNode_Name(), ecorePackage.getEString(), "name", null, 1, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getNode_Network(), this.getNetwork(), this.getNetwork_Nodes(), "network", null, 1, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(placeEClass, Place.class, "Place", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPlace_Tokens(), ecorePackage.getEInt(), "tokens", null, 1, 1, Place.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPlace_Arcs(), this.getArc(), this.getArc_Place(), "arcs", null, 0, -1, Place.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(arcEClass, Arc.class, "Arc", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getArc_Weight(), ecorePackage.getEInt(), "weight", null, 1, 1, Arc.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getArc_Outgoing(), ecorePackage.getEBoolean(), "outgoing", null, 1, 1, Arc.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getArc_Place(), this.getPlace(), this.getPlace_Arcs(), "place", null, 1, 1, Arc.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getArc_Transition(), this.getTransition(), this.getTransition_Arcs(), "transition", null, 1, 1, Arc.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(transitionEClass, Transition.class, "Transition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getTransition_Arcs(), this.getArc(), this.getArc_Transition(), "arcs", null, 0, -1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Create resource
createResource(eNS_URI);
}
} //PetrinetPackageImpl

View file

@ -0,0 +1,45 @@
/**
*/
package petrinet;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Place</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link petrinet.Place#getTokens <em>Tokens</em>}</li>
* </ul>
*
* @see petrinet.PetrinetPackage#getPlace()
* @model
* @generated
*/
public interface Place extends Node {
/**
* Returns the value of the '<em><b>Tokens</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Tokens</em>' attribute.
* @see #setTokens(int)
* @see petrinet.PetrinetPackage#getPlace_Tokens()
* @model required="true"
* @generated
*/
int getTokens();
/**
* Sets the value of the '{@link petrinet.Place#getTokens <em>Tokens</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Tokens</em>' attribute.
* @see #getTokens()
* @generated
*/
void setTokens(int value);
} // Place

View file

@ -0,0 +1,225 @@
/**
*/
package simplepdl.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import simplepdl.Request;
import simplepdl.Resource;
import simplepdl.SimplepdlPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Request</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link simplepdl.impl.RequestImpl#getQuantity <em>Quantity</em>}</li>
* <li>{@link simplepdl.impl.RequestImpl#getTarget <em>Target</em>}</li>
* </ul>
*
* @generated
*/
public class RequestImpl extends MinimalEObjectImpl.Container implements Request {
/**
* The default value of the '{@link #getQuantity() <em>Quantity</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getQuantity()
* @generated
* @ordered
*/
protected static final int QUANTITY_EDEFAULT = 0;
/**
* The cached value of the '{@link #getQuantity() <em>Quantity</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getQuantity()
* @generated
* @ordered
*/
protected int quantity = QUANTITY_EDEFAULT;
/**
* The cached value of the '{@link #getTarget() <em>Target</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getTarget()
* @generated
* @ordered
*/
protected Resource target;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected RequestImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return SimplepdlPackage.Literals.REQUEST;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getQuantity() {
return quantity;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setQuantity(int newQuantity) {
int oldQuantity = quantity;
quantity = newQuantity;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.REQUEST__QUANTITY, oldQuantity, quantity));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Resource getTarget() {
if (target != null && target.eIsProxy()) {
InternalEObject oldTarget = (InternalEObject)target;
target = (Resource)eResolveProxy(oldTarget);
if (target != oldTarget) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, SimplepdlPackage.REQUEST__TARGET, oldTarget, target));
}
}
return target;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Resource basicGetTarget() {
return target;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setTarget(Resource newTarget) {
Resource oldTarget = target;
target = newTarget;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.REQUEST__TARGET, oldTarget, target));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case SimplepdlPackage.REQUEST__QUANTITY:
return getQuantity();
case SimplepdlPackage.REQUEST__TARGET:
if (resolve) return getTarget();
return basicGetTarget();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case SimplepdlPackage.REQUEST__QUANTITY:
setQuantity((Integer)newValue);
return;
case SimplepdlPackage.REQUEST__TARGET:
setTarget((Resource)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case SimplepdlPackage.REQUEST__QUANTITY:
setQuantity(QUANTITY_EDEFAULT);
return;
case SimplepdlPackage.REQUEST__TARGET:
setTarget((Resource)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case SimplepdlPackage.REQUEST__QUANTITY:
return quantity != QUANTITY_EDEFAULT;
case SimplepdlPackage.REQUEST__TARGET:
return target != null;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (quantity: ");
result.append(quantity);
result.append(')');
return result.toString();
}
} //RequestImpl

View file

@ -0,0 +1,18 @@
/**
*/
package simplepdl;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Process Element</b></em>'.
* <!-- end-user-doc -->
*
*
* @see simplepdl.SimplepdlPackage#getProcessElement()
* @model abstract="true"
* @generated
*/
public interface ProcessElement extends EObject {
} // ProcessElement

View file

@ -0,0 +1,133 @@
/**
*/
package petrinet.provider;
import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
import petrinet.PetrinetPackage;
import petrinet.Place;
/**
* This is the item provider adapter for a {@link petrinet.Place} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class PlaceItemProvider extends NodeItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PlaceItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addTokensPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Tokens feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addTokensPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Place_tokens_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Place_tokens_feature", "_UI_Place_type"),
PetrinetPackage.Literals.PLACE__TOKENS,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
/**
* This returns Place.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Place"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((Place)object).getName();
int tokens = ((Place)object).getTokens();
return label == null || label.length() == 0 ?
getString("_UI_Place_type") :
getString("_UI_Place_type") + " " + label + " (" + tokens + ")";
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Place.class)) {
case PetrinetPackage.PLACE__TOKENS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
}

View file

@ -0,0 +1,628 @@
/**
*/
package simplepdl.presentation;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.MissingResourceException;
import java.util.StringTokenizer;
import org.eclipse.emf.common.CommonPlugin;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
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.EObject;
import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.part.ISetSelectionTarget;
import simplepdl.SimplepdlFactory;
import simplepdl.SimplepdlPackage;
import simplepdl.provider.SimplepdlEditPlugin;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
/**
* This is a simple wizard for creating a new model file.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class SimplepdlModelWizard extends Wizard implements INewWizard {
/**
* The supported extensions for created files.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<String> FILE_EXTENSIONS =
Collections.unmodifiableList(Arrays.asList(SimplepdlEditorPlugin.INSTANCE.getString("_UI_SimplepdlEditorFilenameExtensions").split("\\s*,\\s*")));
/**
* A formatted list of supported file extensions, suitable for display.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final String FORMATTED_FILE_EXTENSIONS =
SimplepdlEditorPlugin.INSTANCE.getString("_UI_SimplepdlEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", ");
/**
* This caches an instance of the model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected SimplepdlPackage simplepdlPackage = SimplepdlPackage.eINSTANCE;
/**
* This caches an instance of the model factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected SimplepdlFactory simplepdlFactory = simplepdlPackage.getSimplepdlFactory();
/**
* This is the file creation page.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected SimplepdlModelWizardNewFileCreationPage newFileCreationPage;
/**
* This is the initial object creation page.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected SimplepdlModelWizardInitialObjectCreationPage initialObjectCreationPage;
/**
* Remember the selection during initialization for populating the default container.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IStructuredSelection selection;
/**
* Remember the workbench during initialization.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IWorkbench workbench;
/**
* Caches the names of the types that can be created as the root object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected List<String> initialObjectNames;
/**
* This just records the information.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void init(IWorkbench workbench, IStructuredSelection selection) {
this.workbench = workbench;
this.selection = selection;
setWindowTitle(SimplepdlEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(SimplepdlEditorPlugin.INSTANCE.getImage("full/wizban/NewSimplepdl")));
}
/**
* Returns the names of the types that can be created as the root object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected Collection<String> getInitialObjectNames() {
if (initialObjectNames == null) {
initialObjectNames = new ArrayList<String>();
for (EClassifier eClassifier : simplepdlPackage.getEClassifiers()) {
if (eClassifier instanceof EClass) {
EClass eClass = (EClass)eClassifier;
if (!eClass.isAbstract()) {
initialObjectNames.add(eClass.getName());
}
}
}
Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
}
return initialObjectNames;
}
/**
* Create a new model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected EObject createInitialModel() {
EClass eClass = (EClass)simplepdlPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
EObject rootObject = simplepdlFactory.create(eClass);
return rootObject;
}
/**
* Do the work after everything is specified.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean performFinish() {
try {
// Remember the file.
//
final IFile modelFile = getModelFile();
// Do the work within an operation.
//
WorkspaceModifyOperation operation =
new WorkspaceModifyOperation() {
@Override
protected void execute(IProgressMonitor progressMonitor) {
try {
// Create a resource set
//
ResourceSet resourceSet = new ResourceSetImpl();
// Get the URI of the model file.
//
URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);
// Create a resource for this file.
//
Resource resource = resourceSet.createResource(fileURI);
// Add the initial model object to the contents.
//
EObject rootObject = createInitialModel();
if (rootObject != null) {
resource.getContents().add(rootObject);
}
// Save the contents of the resource to the file system.
//
Map<Object, Object> options = new HashMap<Object, Object>();
options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding());
resource.save(options);
}
catch (Exception exception) {
SimplepdlEditorPlugin.INSTANCE.log(exception);
}
finally {
progressMonitor.done();
}
}
};
getContainer().run(false, false, operation);
// Select the new file resource in the current view.
//
IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
IWorkbenchPage page = workbenchWindow.getActivePage();
final IWorkbenchPart activePart = page.getActivePart();
if (activePart instanceof ISetSelectionTarget) {
final ISelection targetSelection = new StructuredSelection(modelFile);
getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
((ISetSelectionTarget)activePart).selectReveal(targetSelection);
}
});
}
// Open an editor on the new file.
//
try {
page.openEditor
(new FileEditorInput(modelFile),
workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId());
}
catch (PartInitException exception) {
MessageDialog.openError(workbenchWindow.getShell(), SimplepdlEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage());
return false;
}
return true;
}
catch (Exception exception) {
SimplepdlEditorPlugin.INSTANCE.log(exception);
return false;
}
}
/**
* This is the one page of the wizard.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class SimplepdlModelWizardNewFileCreationPage extends WizardNewFileCreationPage {
/**
* Pass in the selection.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SimplepdlModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) {
super(pageId, selection);
}
/**
* The framework calls this to see if the file is correct.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected boolean validatePage() {
if (super.validatePage()) {
String extension = new Path(getFileName()).getFileExtension();
if (extension == null || !FILE_EXTENSIONS.contains(extension)) {
String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension";
setErrorMessage(SimplepdlEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS }));
return false;
}
return true;
}
return false;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public IFile getModelFile() {
return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName()));
}
}
/**
* This is the page where the type of object to create is selected.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class SimplepdlModelWizardInitialObjectCreationPage extends WizardPage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected Combo initialObjectField;
/**
* @generated
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*/
protected List<String> encodings;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected Combo encodingField;
/**
* Pass in the selection.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SimplepdlModelWizardInitialObjectCreationPage(String pageId) {
super(pageId);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void createControl(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
{
GridLayout layout = new GridLayout();
layout.numColumns = 1;
layout.verticalSpacing = 12;
composite.setLayout(layout);
GridData data = new GridData();
data.verticalAlignment = GridData.FILL;
data.grabExcessVerticalSpace = true;
data.horizontalAlignment = GridData.FILL;
composite.setLayoutData(data);
}
Label containerLabel = new Label(composite, SWT.LEFT);
{
containerLabel.setText(SimplepdlEditorPlugin.INSTANCE.getString("_UI_ModelObject"));
GridData data = new GridData();
data.horizontalAlignment = GridData.FILL;
containerLabel.setLayoutData(data);
}
initialObjectField = new Combo(composite, SWT.BORDER);
{
GridData data = new GridData();
data.horizontalAlignment = GridData.FILL;
data.grabExcessHorizontalSpace = true;
initialObjectField.setLayoutData(data);
}
for (String objectName : getInitialObjectNames()) {
initialObjectField.add(getLabel(objectName));
}
if (initialObjectField.getItemCount() == 1) {
initialObjectField.select(0);
}
initialObjectField.addModifyListener(validator);
Label encodingLabel = new Label(composite, SWT.LEFT);
{
encodingLabel.setText(SimplepdlEditorPlugin.INSTANCE.getString("_UI_XMLEncoding"));
GridData data = new GridData();
data.horizontalAlignment = GridData.FILL;
encodingLabel.setLayoutData(data);
}
encodingField = new Combo(composite, SWT.BORDER);
{
GridData data = new GridData();
data.horizontalAlignment = GridData.FILL;
data.grabExcessHorizontalSpace = true;
encodingField.setLayoutData(data);
}
for (String encoding : getEncodings()) {
encodingField.add(encoding);
}
encodingField.select(0);
encodingField.addModifyListener(validator);
setPageComplete(validatePage());
setControl(composite);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ModifyListener validator =
new ModifyListener() {
public void modifyText(ModifyEvent e) {
setPageComplete(validatePage());
}
};
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected boolean validatePage() {
return getInitialObjectName() != null && getEncodings().contains(encodingField.getText());
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setVisible(boolean visible) {
super.setVisible(visible);
if (visible) {
if (initialObjectField.getItemCount() == 1) {
initialObjectField.clearSelection();
encodingField.setFocus();
}
else {
encodingField.clearSelection();
initialObjectField.setFocus();
}
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getInitialObjectName() {
String label = initialObjectField.getText();
for (String name : getInitialObjectNames()) {
if (getLabel(name).equals(label)) {
return name;
}
}
return null;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getEncoding() {
return encodingField.getText();
}
/**
* Returns the label for the specified type name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected String getLabel(String typeName) {
try {
return SimplepdlEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type");
}
catch(MissingResourceException mre) {
SimplepdlEditorPlugin.INSTANCE.log(mre);
}
return typeName;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected Collection<String> getEncodings() {
if (encodings == null) {
encodings = new ArrayList<String>();
for (StringTokenizer stringTokenizer = new StringTokenizer(SimplepdlEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) {
encodings.add(stringTokenizer.nextToken());
}
}
return encodings;
}
}
/**
* The framework calls this to create the contents of the wizard.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void addPages() {
// Create a page, set the title, and the initial model file name.
//
newFileCreationPage = new SimplepdlModelWizardNewFileCreationPage("Whatever", selection);
newFileCreationPage.setTitle(SimplepdlEditorPlugin.INSTANCE.getString("_UI_SimplepdlModelWizard_label"));
newFileCreationPage.setDescription(SimplepdlEditorPlugin.INSTANCE.getString("_UI_SimplepdlModelWizard_description"));
newFileCreationPage.setFileName(SimplepdlEditorPlugin.INSTANCE.getString("_UI_SimplepdlEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0));
addPage(newFileCreationPage);
// Try and get the resource selection to determine a current directory for the file dialog.
//
if (selection != null && !selection.isEmpty()) {
// Get the resource...
//
Object selectedElement = selection.iterator().next();
if (selectedElement instanceof IResource) {
// Get the resource parent, if its a file.
//
IResource selectedResource = (IResource)selectedElement;
if (selectedResource.getType() == IResource.FILE) {
selectedResource = selectedResource.getParent();
}
// This gives us a directory...
//
if (selectedResource instanceof IFolder || selectedResource instanceof IProject) {
// Set this for the container.
//
newFileCreationPage.setContainerFullPath(selectedResource.getFullPath());
// Make up a unique new name here.
//
String defaultModelBaseFilename = SimplepdlEditorPlugin.INSTANCE.getString("_UI_SimplepdlEditorFilenameDefaultBase");
String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0);
String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension;
for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) {
modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension;
}
newFileCreationPage.setFileName(modelFilename);
}
}
}
initialObjectCreationPage = new SimplepdlModelWizardInitialObjectCreationPage("Whatever2");
initialObjectCreationPage.setTitle(SimplepdlEditorPlugin.INSTANCE.getString("_UI_SimplepdlModelWizard_label"));
initialObjectCreationPage.setDescription(SimplepdlEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description"));
addPage(initialObjectCreationPage);
}
/**
* Get the file from the page.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public IFile getModelFile() {
return newFileCreationPage.getModelFile();
}
}

View file

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/fr.n7.simplepdl/src" modelPluginID="fr.n7.simplepdl"
modelName="Simplepdl" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0" copyrightFields="false"
operationReflection="true" importOrganizing="true">
<foreignModel>simplePDL.ecore</foreignModel>
<genPackages prefix="Simplepdl" disposableProviderFactory="true" ecorePackage="simplePDL.ecore#/">
<genEnums typeSafeEnumCompatible="false" ecoreEnum="simplePDL.ecore#//WorkSequenceType">
<genEnumLiterals ecoreEnumLiteral="simplePDL.ecore#//WorkSequenceType/startToStart"/>
<genEnumLiterals ecoreEnumLiteral="simplePDL.ecore#//WorkSequenceType/finishToStart"/>
<genEnumLiterals ecoreEnumLiteral="simplePDL.ecore#//WorkSequenceType/startToFinish"/>
<genEnumLiterals ecoreEnumLiteral="simplePDL.ecore#//WorkSequenceType/finishToFinish"/>
</genEnums>
<genClasses image="false" ecoreClass="simplePDL.ecore#//ProcessElement"/>
<genClasses ecoreClass="simplePDL.ecore#//WorkDefinition">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference simplePDL.ecore#//WorkDefinition/linksToPredecessors"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference simplePDL.ecore#//WorkDefinition/linksToSuccessors"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute simplePDL.ecore#//WorkDefinition/name"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference simplePDL.ecore#//WorkDefinition/requests"/>
</genClasses>
<genClasses ecoreClass="simplePDL.ecore#//WorkSequence">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute simplePDL.ecore#//WorkSequence/linkType"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference simplePDL.ecore#//WorkSequence/predecessor"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference simplePDL.ecore#//WorkSequence/successor"/>
</genClasses>
<genClasses ecoreClass="simplePDL.ecore#//Process">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute simplePDL.ecore#//Process/name"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference simplePDL.ecore#//Process/processElements"/>
</genClasses>
<genClasses ecoreClass="simplePDL.ecore#//Guidance">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute simplePDL.ecore#//Guidance/text"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference simplePDL.ecore#//Guidance/elements"/>
</genClasses>
<genClasses ecoreClass="simplePDL.ecore#//Resource">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute simplePDL.ecore#//Resource/quantity"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute simplePDL.ecore#//Resource/name"/>
</genClasses>
<genClasses ecoreClass="simplePDL.ecore#//Request">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute simplePDL.ecore#//Request/quantity"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference simplePDL.ecore#//Request/target"/>
</genClasses>
</genPackages>
</genmodel:GenModel>

View file

@ -0,0 +1,61 @@
/**
*/
package simplepdl;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Process</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link simplepdl.Process#getName <em>Name</em>}</li>
* <li>{@link simplepdl.Process#getProcessElements <em>Process Elements</em>}</li>
* </ul>
*
* @see simplepdl.SimplepdlPackage#getProcess()
* @model
* @generated
*/
public interface Process extends EObject {
/**
* Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see simplepdl.SimplepdlPackage#getProcess_Name()
* @model required="true"
* @generated
*/
String getName();
/**
* Sets the value of the '{@link simplepdl.Process#getName <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Name</em>' attribute.
* @see #getName()
* @generated
*/
void setName(String value);
/**
* Returns the value of the '<em><b>Process Elements</b></em>' containment reference list.
* The list contents are of type {@link simplepdl.ProcessElement}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Process Elements</em>' containment reference list.
* @see simplepdl.SimplepdlPackage#getProcess_ProcessElements()
* @model containment="true"
* @generated
*/
EList<ProcessElement> getProcessElements();
} // Process

View file

@ -0,0 +1,374 @@
/**
*/
package petrinet.impl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import petrinet.Arc;
import petrinet.Network;
import petrinet.Node;
import petrinet.PetrinetFactory;
import petrinet.PetrinetPackage;
import petrinet.Place;
import petrinet.Transition;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
* @generated
*/
public class PetrinetPackageImpl extends EPackageImpl implements PetrinetPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass networkEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass nodeEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass placeEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass arcEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass transitionEClass = null;
/**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
* <p>Note: the correct way to create the package is via the static
* factory method {@link #init init()}, which also performs
* initialization of the package, or returns the registered package,
* if one already exists.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see petrinet.PetrinetPackage#eNS_URI
* @see #init()
* @generated
*/
private PetrinetPackageImpl() {
super(eNS_URI, PetrinetFactory.eINSTANCE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static boolean isInited = false;
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link PetrinetPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static PetrinetPackage init() {
if (isInited) return (PetrinetPackage)EPackage.Registry.INSTANCE.getEPackage(PetrinetPackage.eNS_URI);
// Obtain or create and register package
Object registeredPetrinetPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
PetrinetPackageImpl thePetrinetPackage = registeredPetrinetPackage instanceof PetrinetPackageImpl ? (PetrinetPackageImpl)registeredPetrinetPackage : new PetrinetPackageImpl();
isInited = true;
// Create package meta-data objects
thePetrinetPackage.createPackageContents();
// Initialize created meta-data
thePetrinetPackage.initializePackageContents();
// Mark meta-data to indicate it can't be changed
thePetrinetPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(PetrinetPackage.eNS_URI, thePetrinetPackage);
return thePetrinetPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getNetwork() {
return networkEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getNetwork_Name() {
return (EAttribute)networkEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getNetwork_Nodes() {
return (EReference)networkEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getNode() {
return nodeEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getNode_Name() {
return (EAttribute)nodeEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getNode_Network() {
return (EReference)nodeEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPlace() {
return placeEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getPlace_Tokens() {
return (EAttribute)placeEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPlace_Arcs() {
return (EReference)placeEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getArc() {
return arcEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getArc_Weight() {
return (EAttribute)arcEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getArc_Outgoing() {
return (EAttribute)arcEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getArc_Place() {
return (EReference)arcEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getArc_Transition() {
return (EReference)arcEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getTransition() {
return transitionEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getTransition_Arcs() {
return (EReference)transitionEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PetrinetFactory getPetrinetFactory() {
return (PetrinetFactory)getEFactoryInstance();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isCreated = false;
/**
* Creates the meta-model objects for the package. This method is
* guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void createPackageContents() {
if (isCreated) return;
isCreated = true;
// Create classes and their features
networkEClass = createEClass(NETWORK);
createEAttribute(networkEClass, NETWORK__NAME);
createEReference(networkEClass, NETWORK__NODES);
nodeEClass = createEClass(NODE);
createEAttribute(nodeEClass, NODE__NAME);
createEReference(nodeEClass, NODE__NETWORK);
placeEClass = createEClass(PLACE);
createEAttribute(placeEClass, PLACE__TOKENS);
createEReference(placeEClass, PLACE__ARCS);
arcEClass = createEClass(ARC);
createEAttribute(arcEClass, ARC__WEIGHT);
createEAttribute(arcEClass, ARC__OUTGOING);
createEReference(arcEClass, ARC__PLACE);
createEReference(arcEClass, ARC__TRANSITION);
transitionEClass = createEClass(TRANSITION);
createEReference(transitionEClass, TRANSITION__ARCS);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isInitialized = false;
/**
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void initializePackageContents() {
if (isInitialized) return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
placeEClass.getESuperTypes().add(this.getNode());
transitionEClass.getESuperTypes().add(this.getNode());
// Initialize classes, features, and operations; add parameters
initEClass(networkEClass, Network.class, "Network", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getNetwork_Name(), ecorePackage.getEString(), "name", null, 1, 1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getNetwork_Nodes(), this.getNode(), this.getNode_Network(), "nodes", null, 0, -1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(nodeEClass, Node.class, "Node", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getNode_Name(), ecorePackage.getEString(), "name", null, 1, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getNode_Network(), this.getNetwork(), this.getNetwork_Nodes(), "network", null, 1, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(placeEClass, Place.class, "Place", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPlace_Tokens(), ecorePackage.getEInt(), "tokens", null, 1, 1, Place.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPlace_Arcs(), this.getArc(), this.getArc_Place(), "arcs", null, 0, -1, Place.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(arcEClass, Arc.class, "Arc", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getArc_Weight(), ecorePackage.getEInt(), "weight", null, 1, 1, Arc.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getArc_Outgoing(), ecorePackage.getEBoolean(), "outgoing", null, 1, 1, Arc.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getArc_Place(), this.getPlace(), this.getPlace_Arcs(), "place", null, 1, 1, Arc.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getArc_Transition(), this.getTransition(), this.getTransition_Arcs(), "transition", null, 1, 1, Arc.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(transitionEClass, Transition.class, "Transition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getTransition_Arcs(), this.getArc(), this.getArc_Transition(), "arcs", null, 0, -1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Create resource
createResource(eNS_URI);
}
} //PetrinetPackageImpl

View file

@ -0,0 +1,61 @@
/**
*/
package petrinet;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Network</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link petrinet.Network#getName <em>Name</em>}</li>
* <li>{@link petrinet.Network#getNodes <em>Nodes</em>}</li>
* </ul>
*
* @see petrinet.PetrinetPackage#getNetwork()
* @model
* @generated
*/
public interface Network extends EObject {
/**
* Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see petrinet.PetrinetPackage#getNetwork_Name()
* @model required="true"
* @generated
*/
String getName();
/**
* Sets the value of the '{@link petrinet.Network#getName <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Name</em>' attribute.
* @see #getName()
* @generated
*/
void setName(String value);
/**
* Returns the value of the '<em><b>Nodes</b></em>' containment reference list.
* The list contents are of type {@link petrinet.Node}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Nodes</em>' containment reference list.
* @see petrinet.PetrinetPackage#getNetwork_Nodes()
* @model containment="true"
* @generated
*/
EList<Node> getNodes();
} // Network

View file

@ -0,0 +1,192 @@
/**
*/
package petrinet.util;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
import org.eclipse.emf.ecore.EObject;
import petrinet.*;
/**
* <!-- begin-user-doc -->
* The <b>Adapter Factory</b> for the model.
* It provides an adapter <code>createXXX</code> method for each class of the model.
* <!-- end-user-doc -->
* @see petrinet.PetrinetPackage
* @generated
*/
public class PetrinetAdapterFactory extends AdapterFactoryImpl {
/**
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static PetrinetPackage modelPackage;
/**
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PetrinetAdapterFactory() {
if (modelPackage == null) {
modelPackage = PetrinetPackage.eINSTANCE;
}
}
/**
* Returns whether this factory is applicable for the type of the object.
* <!-- begin-user-doc -->
* This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
* <!-- end-user-doc -->
* @return whether this factory is applicable for the type of the object.
* @generated
*/
@Override
public boolean isFactoryForType(Object object) {
if (object == modelPackage) {
return true;
}
if (object instanceof EObject) {
return ((EObject)object).eClass().getEPackage() == modelPackage;
}
return false;
}
/**
* The switch that delegates to the <code>createXXX</code> methods.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PetrinetSwitch<Adapter> modelSwitch =
new PetrinetSwitch<Adapter>() {
@Override
public Adapter caseNetwork(Network object) {
return createNetworkAdapter();
}
@Override
public Adapter caseNode(Node object) {
return createNodeAdapter();
}
@Override
public Adapter casePlace(Place object) {
return createPlaceAdapter();
}
@Override
public Adapter caseArc(Arc object) {
return createArcAdapter();
}
@Override
public Adapter caseTransition(Transition object) {
return createTransitionAdapter();
}
@Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
};
/**
* Creates an adapter for the <code>target</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param target the object to adapt.
* @return the adapter for the <code>target</code>.
* @generated
*/
@Override
public Adapter createAdapter(Notifier target) {
return modelSwitch.doSwitch((EObject)target);
}
/**
* Creates a new adapter for an object of class '{@link petrinet.Network <em>Network</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see petrinet.Network
* @generated
*/
public Adapter createNetworkAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link petrinet.Node <em>Node</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see petrinet.Node
* @generated
*/
public Adapter createNodeAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link petrinet.Place <em>Place</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see petrinet.Place
* @generated
*/
public Adapter createPlaceAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link petrinet.Arc <em>Arc</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see petrinet.Arc
* @generated
*/
public Adapter createArcAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link petrinet.Transition <em>Transition</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see petrinet.Transition
* @generated
*/
public Adapter createTransitionAdapter() {
return null;
}
/**
* Creates a new adapter for the default case.
* <!-- begin-user-doc -->
* This default implementation returns null.
* <!-- end-user-doc -->
* @return the new adapter.
* @generated
*/
public Adapter createEObjectAdapter() {
return null;
}
} //PetrinetAdapterFactory

View file

@ -0,0 +1,185 @@
/**
*/
package simplepdl.provider;
import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
import simplepdl.SimplepdlPackage;
import simplepdl.WorkSequence;
import simplepdl.WorkSequenceType;
/**
* This is the item provider adapter for a {@link simplepdl.WorkSequence} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class WorkSequenceItemProvider extends ProcessElementItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public WorkSequenceItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addLinkTypePropertyDescriptor(object);
addPredecessorPropertyDescriptor(object);
addSuccessorPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Link Type feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addLinkTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_WorkSequence_linkType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_linkType_feature", "_UI_WorkSequence_type"),
SimplepdlPackage.Literals.WORK_SEQUENCE__LINK_TYPE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Predecessor feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addPredecessorPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_WorkSequence_predecessor_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_predecessor_feature", "_UI_WorkSequence_type"),
SimplepdlPackage.Literals.WORK_SEQUENCE__PREDECESSOR,
true,
false,
true,
null,
null,
null));
}
/**
* This adds a property descriptor for the Successor feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addSuccessorPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_WorkSequence_successor_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_successor_feature", "_UI_WorkSequence_type"),
SimplepdlPackage.Literals.WORK_SEQUENCE__SUCCESSOR,
true,
false,
true,
null,
null,
null));
}
/**
* This returns WorkSequence.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/WorkSequence"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
@Override
public String getText(Object object) {
WorkSequence ws = (WorkSequence) object;
WorkSequenceType labelValue = ws.getLinkType();
String label = "--" + (labelValue == null ? "?" : labelValue.toString()) + "-->";
String previous = ws.getPredecessor() == null ? "?" : ws.getPredecessor().getName();
String next = ws.getSuccessor() == null ? "?" : ws.getSuccessor().getName();
return label == null || label.length() == 0 ?
getString("_UI_WorkSequence_type") :
getString("_UI_WorkSequence_type") + " " + previous + " " + label + " " + next;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(WorkSequence.class)) {
case SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR:
case SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR:
case SimplepdlPackage.WORK_SEQUENCE__LINK_TYPE:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
}

View file

@ -0,0 +1,567 @@
/**
*/
package petrinet;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
/**
* <!-- begin-user-doc -->
* The <b>Package</b> for the model.
* It contains accessors for the meta objects to represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
* <li>each operation of each class,</li>
* <li>each enum,</li>
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
* @see petrinet.PetrinetFactory
* @model kind="package"
* @generated
*/
public interface PetrinetPackage extends EPackage {
/**
* The package name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNAME = "petrinet";
/**
* The package namespace URI.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_URI = "http://petrinet";
/**
* The package namespace name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_PREFIX = "petrinet";
/**
* The singleton instance of the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
PetrinetPackage eINSTANCE = petrinet.impl.PetrinetPackageImpl.init();
/**
* The meta object id for the '{@link petrinet.impl.NetworkImpl <em>Network</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.NetworkImpl
* @see petrinet.impl.PetrinetPackageImpl#getNetwork()
* @generated
*/
int NETWORK = 0;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NETWORK__NAME = 0;
/**
* The feature id for the '<em><b>Nodes</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NETWORK__NODES = 1;
/**
* The number of structural features of the '<em>Network</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NETWORK_FEATURE_COUNT = 2;
/**
* The number of operations of the '<em>Network</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NETWORK_OPERATION_COUNT = 0;
/**
* The meta object id for the '{@link petrinet.impl.NodeImpl <em>Node</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.NodeImpl
* @see petrinet.impl.PetrinetPackageImpl#getNode()
* @generated
*/
int NODE = 1;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NODE__NAME = 0;
/**
* The number of structural features of the '<em>Node</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NODE_FEATURE_COUNT = 1;
/**
* The number of operations of the '<em>Node</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int NODE_OPERATION_COUNT = 0;
/**
* The meta object id for the '{@link petrinet.impl.PlaceImpl <em>Place</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.PlaceImpl
* @see petrinet.impl.PetrinetPackageImpl#getPlace()
* @generated
*/
int PLACE = 2;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PLACE__NAME = NODE__NAME;
/**
* The feature id for the '<em><b>Tokens</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PLACE__TOKENS = NODE_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Place</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PLACE_FEATURE_COUNT = NODE_FEATURE_COUNT + 1;
/**
* The number of operations of the '<em>Place</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PLACE_OPERATION_COUNT = NODE_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link petrinet.impl.ArcImpl <em>Arc</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.ArcImpl
* @see petrinet.impl.PetrinetPackageImpl#getArc()
* @generated
*/
int ARC = 3;
/**
* The feature id for the '<em><b>Weight</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ARC__WEIGHT = 0;
/**
* The feature id for the '<em><b>Outgoing</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ARC__OUTGOING = 1;
/**
* The feature id for the '<em><b>Target</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ARC__TARGET = 2;
/**
* The number of structural features of the '<em>Arc</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ARC_FEATURE_COUNT = 3;
/**
* The number of operations of the '<em>Arc</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int ARC_OPERATION_COUNT = 0;
/**
* The meta object id for the '{@link petrinet.impl.TransitionImpl <em>Transition</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.TransitionImpl
* @see petrinet.impl.PetrinetPackageImpl#getTransition()
* @generated
*/
int TRANSITION = 4;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TRANSITION__NAME = NODE__NAME;
/**
* The feature id for the '<em><b>Arcs</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TRANSITION__ARCS = NODE_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Transition</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TRANSITION_FEATURE_COUNT = NODE_FEATURE_COUNT + 1;
/**
* The number of operations of the '<em>Transition</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int TRANSITION_OPERATION_COUNT = NODE_OPERATION_COUNT + 0;
/**
* Returns the meta object for class '{@link petrinet.Network <em>Network</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Network</em>'.
* @see petrinet.Network
* @generated
*/
EClass getNetwork();
/**
* Returns the meta object for the attribute '{@link petrinet.Network#getName <em>Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Name</em>'.
* @see petrinet.Network#getName()
* @see #getNetwork()
* @generated
*/
EAttribute getNetwork_Name();
/**
* Returns the meta object for the containment reference list '{@link petrinet.Network#getNodes <em>Nodes</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Nodes</em>'.
* @see petrinet.Network#getNodes()
* @see #getNetwork()
* @generated
*/
EReference getNetwork_Nodes();
/**
* Returns the meta object for class '{@link petrinet.Node <em>Node</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Node</em>'.
* @see petrinet.Node
* @generated
*/
EClass getNode();
/**
* Returns the meta object for the attribute '{@link petrinet.Node#getName <em>Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Name</em>'.
* @see petrinet.Node#getName()
* @see #getNode()
* @generated
*/
EAttribute getNode_Name();
/**
* Returns the meta object for class '{@link petrinet.Place <em>Place</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Place</em>'.
* @see petrinet.Place
* @generated
*/
EClass getPlace();
/**
* Returns the meta object for the attribute '{@link petrinet.Place#getTokens <em>Tokens</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Tokens</em>'.
* @see petrinet.Place#getTokens()
* @see #getPlace()
* @generated
*/
EAttribute getPlace_Tokens();
/**
* Returns the meta object for class '{@link petrinet.Arc <em>Arc</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Arc</em>'.
* @see petrinet.Arc
* @generated
*/
EClass getArc();
/**
* Returns the meta object for the attribute '{@link petrinet.Arc#getWeight <em>Weight</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Weight</em>'.
* @see petrinet.Arc#getWeight()
* @see #getArc()
* @generated
*/
EAttribute getArc_Weight();
/**
* Returns the meta object for the attribute '{@link petrinet.Arc#isOutgoing <em>Outgoing</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Outgoing</em>'.
* @see petrinet.Arc#isOutgoing()
* @see #getArc()
* @generated
*/
EAttribute getArc_Outgoing();
/**
* Returns the meta object for the reference '{@link petrinet.Arc#getTarget <em>Target</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Target</em>'.
* @see petrinet.Arc#getTarget()
* @see #getArc()
* @generated
*/
EReference getArc_Target();
/**
* Returns the meta object for class '{@link petrinet.Transition <em>Transition</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Transition</em>'.
* @see petrinet.Transition
* @generated
*/
EClass getTransition();
/**
* Returns the meta object for the containment reference list '{@link petrinet.Transition#getArcs <em>Arcs</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Arcs</em>'.
* @see petrinet.Transition#getArcs()
* @see #getTransition()
* @generated
*/
EReference getTransition_Arcs();
/**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the factory that creates the instances of the model.
* @generated
*/
PetrinetFactory getPetrinetFactory();
/**
* <!-- begin-user-doc -->
* Defines literals for the meta objects that represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
* <li>each operation of each class,</li>
* <li>each enum,</li>
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
* @generated
*/
interface Literals {
/**
* The meta object literal for the '{@link petrinet.impl.NetworkImpl <em>Network</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.NetworkImpl
* @see petrinet.impl.PetrinetPackageImpl#getNetwork()
* @generated
*/
EClass NETWORK = eINSTANCE.getNetwork();
/**
* The meta object literal for the '<em><b>Name</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute NETWORK__NAME = eINSTANCE.getNetwork_Name();
/**
* The meta object literal for the '<em><b>Nodes</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference NETWORK__NODES = eINSTANCE.getNetwork_Nodes();
/**
* The meta object literal for the '{@link petrinet.impl.NodeImpl <em>Node</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.NodeImpl
* @see petrinet.impl.PetrinetPackageImpl#getNode()
* @generated
*/
EClass NODE = eINSTANCE.getNode();
/**
* The meta object literal for the '<em><b>Name</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute NODE__NAME = eINSTANCE.getNode_Name();
/**
* The meta object literal for the '{@link petrinet.impl.PlaceImpl <em>Place</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.PlaceImpl
* @see petrinet.impl.PetrinetPackageImpl#getPlace()
* @generated
*/
EClass PLACE = eINSTANCE.getPlace();
/**
* The meta object literal for the '<em><b>Tokens</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute PLACE__TOKENS = eINSTANCE.getPlace_Tokens();
/**
* The meta object literal for the '{@link petrinet.impl.ArcImpl <em>Arc</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.ArcImpl
* @see petrinet.impl.PetrinetPackageImpl#getArc()
* @generated
*/
EClass ARC = eINSTANCE.getArc();
/**
* The meta object literal for the '<em><b>Weight</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ARC__WEIGHT = eINSTANCE.getArc_Weight();
/**
* The meta object literal for the '<em><b>Outgoing</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute ARC__OUTGOING = eINSTANCE.getArc_Outgoing();
/**
* The meta object literal for the '<em><b>Target</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference ARC__TARGET = eINSTANCE.getArc_Target();
/**
* The meta object literal for the '{@link petrinet.impl.TransitionImpl <em>Transition</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see petrinet.impl.TransitionImpl
* @see petrinet.impl.PetrinetPackageImpl#getTransition()
* @generated
*/
EClass TRANSITION = eINSTANCE.getTransition();
/**
* The meta object literal for the '<em><b>Arcs</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference TRANSITION__ARCS = eINSTANCE.getTransition_Arcs();
}
} //PetrinetPackage

View file

@ -0,0 +1,312 @@
/**
*/
package simplepdl.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
import org.eclipse.emf.ecore.util.InternalEList;
import simplepdl.Request;
import simplepdl.SimplepdlPackage;
import simplepdl.WorkDefinition;
import simplepdl.WorkSequence;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Work Definition</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link simplepdl.impl.WorkDefinitionImpl#getLinksToPredecessors <em>Links To Predecessors</em>}</li>
* <li>{@link simplepdl.impl.WorkDefinitionImpl#getLinksToSuccessors <em>Links To Successors</em>}</li>
* <li>{@link simplepdl.impl.WorkDefinitionImpl#getName <em>Name</em>}</li>
* <li>{@link simplepdl.impl.WorkDefinitionImpl#getRequests <em>Requests</em>}</li>
* </ul>
*
* @generated
*/
public class WorkDefinitionImpl extends ProcessElementImpl implements WorkDefinition {
/**
* The cached value of the '{@link #getLinksToPredecessors() <em>Links To Predecessors</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getLinksToPredecessors()
* @generated
* @ordered
*/
protected EList<WorkSequence> linksToPredecessors;
/**
* The cached value of the '{@link #getLinksToSuccessors() <em>Links To Successors</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getLinksToSuccessors()
* @generated
* @ordered
*/
protected EList<WorkSequence> linksToSuccessors;
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The cached value of the '{@link #getRequests() <em>Requests</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getRequests()
* @generated
* @ordered
*/
protected EList<Request> requests;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected WorkDefinitionImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return SimplepdlPackage.Literals.WORK_DEFINITION;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<WorkSequence> getLinksToPredecessors() {
if (linksToPredecessors == null) {
linksToPredecessors = new EObjectWithInverseResolvingEList<WorkSequence>(WorkSequence.class, this, SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS, SimplepdlPackage.WORK_SEQUENCE__SUCCESSOR);
}
return linksToPredecessors;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<WorkSequence> getLinksToSuccessors() {
if (linksToSuccessors == null) {
linksToSuccessors = new EObjectWithInverseResolvingEList<WorkSequence>(WorkSequence.class, this, SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS, SimplepdlPackage.WORK_SEQUENCE__PREDECESSOR);
}
return linksToSuccessors;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, SimplepdlPackage.WORK_DEFINITION__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Request> getRequests() {
if (requests == null) {
requests = new EObjectContainmentEList<Request>(Request.class, this, SimplepdlPackage.WORK_DEFINITION__REQUESTS);
}
return requests;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS:
return ((InternalEList<InternalEObject>)(InternalEList<?>)getLinksToPredecessors()).basicAdd(otherEnd, msgs);
case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS:
return ((InternalEList<InternalEObject>)(InternalEList<?>)getLinksToSuccessors()).basicAdd(otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS:
return ((InternalEList<?>)getLinksToPredecessors()).basicRemove(otherEnd, msgs);
case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS:
return ((InternalEList<?>)getLinksToSuccessors()).basicRemove(otherEnd, msgs);
case SimplepdlPackage.WORK_DEFINITION__REQUESTS:
return ((InternalEList<?>)getRequests()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS:
return getLinksToPredecessors();
case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS:
return getLinksToSuccessors();
case SimplepdlPackage.WORK_DEFINITION__NAME:
return getName();
case SimplepdlPackage.WORK_DEFINITION__REQUESTS:
return getRequests();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS:
getLinksToPredecessors().clear();
getLinksToPredecessors().addAll((Collection<? extends WorkSequence>)newValue);
return;
case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS:
getLinksToSuccessors().clear();
getLinksToSuccessors().addAll((Collection<? extends WorkSequence>)newValue);
return;
case SimplepdlPackage.WORK_DEFINITION__NAME:
setName((String)newValue);
return;
case SimplepdlPackage.WORK_DEFINITION__REQUESTS:
getRequests().clear();
getRequests().addAll((Collection<? extends Request>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS:
getLinksToPredecessors().clear();
return;
case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS:
getLinksToSuccessors().clear();
return;
case SimplepdlPackage.WORK_DEFINITION__NAME:
setName(NAME_EDEFAULT);
return;
case SimplepdlPackage.WORK_DEFINITION__REQUESTS:
getRequests().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_PREDECESSORS:
return linksToPredecessors != null && !linksToPredecessors.isEmpty();
case SimplepdlPackage.WORK_DEFINITION__LINKS_TO_SUCCESSORS:
return linksToSuccessors != null && !linksToSuccessors.isEmpty();
case SimplepdlPackage.WORK_DEFINITION__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case SimplepdlPackage.WORK_DEFINITION__REQUESTS:
return requests != null && !requests.isEmpty();
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (name: ");
result.append(name);
result.append(')');
return result.toString();
}
} //WorkDefinitionImpl

View file

@ -0,0 +1,46 @@
/**
*/
package petrinet;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Node</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link petrinet.Node#getName <em>Name</em>}</li>
* </ul>
*
* @see petrinet.PetrinetPackage#getNode()
* @model abstract="true"
* @generated
*/
public interface Node extends EObject {
/**
* Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see petrinet.PetrinetPackage#getNode_Name()
* @model required="true"
* @generated
*/
String getName();
/**
* Sets the value of the '{@link petrinet.Node#getName <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Name</em>' attribute.
* @see #getName()
* @generated
*/
void setName(String value);
} // Node

View file

@ -0,0 +1,181 @@
/**
*/
package simplepdl.provider;
import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
import simplepdl.Request;
import simplepdl.SimplepdlPackage;
/**
* This is the item provider adapter for a {@link simplepdl.Request} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class RequestItemProvider
extends ItemProviderAdapter
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public RequestItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addQuantityPropertyDescriptor(object);
addTargetPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Quantity feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addQuantityPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Request_quantity_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Request_quantity_feature", "_UI_Request_type"),
SimplepdlPackage.Literals.REQUEST__QUANTITY,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Target feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addTargetPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Request_target_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Request_target_feature", "_UI_Request_type"),
SimplepdlPackage.Literals.REQUEST__TARGET,
true,
false,
true,
null,
null,
null));
}
/**
* This returns Request.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Request"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
Request request = (Request)object;
String targetname = request.getTarget() != null ? request.getTarget().getName() : "";
return getString("_UI_Request_type") + " --" + request.getQuantity() + "--> " + targetname;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Request.class)) {
case SimplepdlPackage.REQUEST__TARGET:
case SimplepdlPackage.REQUEST__QUANTITY:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return SimplepdlEditPlugin.INSTANCE;
}
}

View file

@ -0,0 +1,59 @@
/**
*/
package simplepdl;
import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Guidance</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link simplepdl.Guidance#getText <em>Text</em>}</li>
* <li>{@link simplepdl.Guidance#getElements <em>Elements</em>}</li>
* </ul>
*
* @see simplepdl.SimplepdlPackage#getGuidance()
* @model
* @generated
*/
public interface Guidance extends ProcessElement {
/**
* Returns the value of the '<em><b>Text</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Text</em>' attribute.
* @see #setText(String)
* @see simplepdl.SimplepdlPackage#getGuidance_Text()
* @model required="true"
* @generated
*/
String getText();
/**
* Sets the value of the '{@link simplepdl.Guidance#getText <em>Text</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Text</em>' attribute.
* @see #getText()
* @generated
*/
void setText(String value);
/**
* Returns the value of the '<em><b>Elements</b></em>' reference list.
* The list contents are of type {@link simplepdl.ProcessElement}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Elements</em>' reference list.
* @see simplepdl.SimplepdlPackage#getGuidance_Elements()
* @model
* @generated
*/
EList<ProcessElement> getElements();
} // Guidance

View file

@ -0,0 +1,157 @@
/**
*/
package simplepdl.provider;
import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
import simplepdl.Resource;
import simplepdl.SimplepdlPackage;
/**
* This is the item provider adapter for a {@link simplepdl.Resource} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class ResourceItemProvider extends ProcessElementItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ResourceItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addQuantityPropertyDescriptor(object);
addNamePropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Quantity feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addQuantityPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Resource_quantity_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Resource_quantity_feature", "_UI_Resource_type"),
SimplepdlPackage.Literals.RESOURCE__QUANTITY,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Name feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Resource_name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Resource_name_feature", "_UI_Resource_type"),
SimplepdlPackage.Literals.RESOURCE__NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This returns Resource.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Resource"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((Resource)object).getName();
int qty = ((Resource)object).getQuantity();
return label == null || label.length() == 0 ?
getString("_UI_Resource_type") :
getString("_UI_Resource_type") + " " + label + " (" + qty + ")";
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Resource.class)) {
case SimplepdlPackage.RESOURCE__QUANTITY:
case SimplepdlPackage.RESOURCE__NAME:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
}

View file

@ -0,0 +1,128 @@
/**
*/
package petrinet.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import petrinet.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class PetrinetFactoryImpl extends EFactoryImpl implements PetrinetFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static PetrinetFactory init() {
try {
PetrinetFactory thePetrinetFactory = (PetrinetFactory)EPackage.Registry.INSTANCE.getEFactory(PetrinetPackage.eNS_URI);
if (thePetrinetFactory != null) {
return thePetrinetFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new PetrinetFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PetrinetFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case PetrinetPackage.NETWORK: return createNetwork();
case PetrinetPackage.PLACE: return createPlace();
case PetrinetPackage.ARC: return createArc();
case PetrinetPackage.TRANSITION: return createTransition();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Network createNetwork() {
NetworkImpl network = new NetworkImpl();
return network;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Place createPlace() {
PlaceImpl place = new PlaceImpl();
return place;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Arc createArc() {
ArcImpl arc = new ArcImpl();
return arc;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Transition createTransition() {
TransitionImpl transition = new TransitionImpl();
return transition;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PetrinetPackage getPetrinetPackage() {
return (PetrinetPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static PetrinetPackage getPackage() {
return PetrinetPackage.eINSTANCE;
}
} //PetrinetFactoryImpl

View file

@ -0,0 +1,196 @@
/**
*/
package petrinet.util;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
import petrinet.*;
/**
* <!-- begin-user-doc -->
* The <b>Switch</b> for the model's inheritance hierarchy.
* It supports the call {@link #doSwitch(EObject) doSwitch(object)}
* to invoke the <code>caseXXX</code> method for each class of the model,
* starting with the actual class of the object
* and proceeding up the inheritance hierarchy
* until a non-null result is returned,
* which is the result of the switch.
* <!-- end-user-doc -->
* @see petrinet.PetrinetPackage
* @generated
*/
public class PetrinetSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static PetrinetPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PetrinetSwitch() {
if (modelPackage == null) {
modelPackage = PetrinetPackage.eINSTANCE;
}
}
/**
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param ePackage the package in question.
* @return whether this is a switch for the given package.
* @generated
*/
@Override
protected boolean isSwitchFor(EPackage ePackage) {
return ePackage == modelPackage;
}
/**
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case PetrinetPackage.NETWORK: {
Network network = (Network)theEObject;
T result = caseNetwork(network);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PetrinetPackage.NODE: {
Node node = (Node)theEObject;
T result = caseNode(node);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PetrinetPackage.PLACE: {
Place place = (Place)theEObject;
T result = casePlace(place);
if (result == null) result = caseNode(place);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PetrinetPackage.ARC: {
Arc arc = (Arc)theEObject;
T result = caseArc(arc);
if (result == null) result = defaultCase(theEObject);
return result;
}
case PetrinetPackage.TRANSITION: {
Transition transition = (Transition)theEObject;
T result = caseTransition(transition);
if (result == null) result = caseNode(transition);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>Network</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Network</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseNetwork(Network object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Node</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Node</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseNode(Node object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Place</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Place</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePlace(Place object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Arc</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Arc</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseArc(Arc object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Transition</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Transition</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseTransition(Transition object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch, but this is the last case anyway.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
@Override
public T defaultCase(EObject object) {
return null;
}
} //PetrinetSwitch

View file

@ -0,0 +1,237 @@
/**
*/
package petrinet.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
import org.eclipse.emf.ecore.util.InternalEList;
import petrinet.Network;
import petrinet.Node;
import petrinet.PetrinetPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Network</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link petrinet.impl.NetworkImpl#getName <em>Name</em>}</li>
* <li>{@link petrinet.impl.NetworkImpl#getNodes <em>Nodes</em>}</li>
* </ul>
*
* @generated
*/
public class NetworkImpl extends MinimalEObjectImpl.Container implements Network {
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The cached value of the '{@link #getNodes() <em>Nodes</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getNodes()
* @generated
* @ordered
*/
protected EList<Node> nodes;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected NetworkImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return PetrinetPackage.Literals.NETWORK;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PetrinetPackage.NETWORK__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Node> getNodes() {
if (nodes == null) {
nodes = new EObjectContainmentWithInverseEList<Node>(Node.class, this, PetrinetPackage.NETWORK__NODES, PetrinetPackage.NODE__NETWORK);
}
return nodes;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case PetrinetPackage.NETWORK__NODES:
return ((InternalEList<InternalEObject>)(InternalEList<?>)getNodes()).basicAdd(otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case PetrinetPackage.NETWORK__NODES:
return ((InternalEList<?>)getNodes()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PetrinetPackage.NETWORK__NAME:
return getName();
case PetrinetPackage.NETWORK__NODES:
return getNodes();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PetrinetPackage.NETWORK__NAME:
setName((String)newValue);
return;
case PetrinetPackage.NETWORK__NODES:
getNodes().clear();
getNodes().addAll((Collection<? extends Node>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PetrinetPackage.NETWORK__NAME:
setName(NAME_EDEFAULT);
return;
case PetrinetPackage.NETWORK__NODES:
getNodes().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PetrinetPackage.NETWORK__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case PetrinetPackage.NETWORK__NODES:
return nodes != null && !nodes.isEmpty();
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (name: ");
result.append(name);
result.append(')');
return result.toString();
}
} //NetworkImpl

View file

@ -0,0 +1,150 @@
/**
*/
package petrinet.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import petrinet.Arc;
import petrinet.PetrinetPackage;
import petrinet.Transition;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Transition</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link petrinet.impl.TransitionImpl#getArcs <em>Arcs</em>}</li>
* </ul>
*
* @generated
*/
public class TransitionImpl extends NodeImpl implements Transition {
/**
* The cached value of the '{@link #getArcs() <em>Arcs</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getArcs()
* @generated
* @ordered
*/
protected EList<Arc> arcs;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected TransitionImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return PetrinetPackage.Literals.TRANSITION;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Arc> getArcs() {
if (arcs == null) {
arcs = new EObjectContainmentEList<Arc>(Arc.class, this, PetrinetPackage.TRANSITION__ARCS);
}
return arcs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case PetrinetPackage.TRANSITION__ARCS:
return ((InternalEList<?>)getArcs()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PetrinetPackage.TRANSITION__ARCS:
return getArcs();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PetrinetPackage.TRANSITION__ARCS:
getArcs().clear();
getArcs().addAll((Collection<? extends Arc>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PetrinetPackage.TRANSITION__ARCS:
getArcs().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PetrinetPackage.TRANSITION__ARCS:
return arcs != null && !arcs.isEmpty();
}
return super.eIsSet(featureID);
}
} //TransitionImpl

View file

@ -0,0 +1,128 @@
/**
*/
package petrinet.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import petrinet.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class PetrinetFactoryImpl extends EFactoryImpl implements PetrinetFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static PetrinetFactory init() {
try {
PetrinetFactory thePetrinetFactory = (PetrinetFactory)EPackage.Registry.INSTANCE.getEFactory(PetrinetPackage.eNS_URI);
if (thePetrinetFactory != null) {
return thePetrinetFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new PetrinetFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PetrinetFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case PetrinetPackage.NETWORK: return createNetwork();
case PetrinetPackage.PLACE: return createPlace();
case PetrinetPackage.ARC: return createArc();
case PetrinetPackage.TRANSITION: return createTransition();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Network createNetwork() {
NetworkImpl network = new NetworkImpl();
return network;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Place createPlace() {
PlaceImpl place = new PlaceImpl();
return place;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Arc createArc() {
ArcImpl arc = new ArcImpl();
return arc;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Transition createTransition() {
TransitionImpl transition = new TransitionImpl();
return transition;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PetrinetPackage getPetrinetPackage() {
return (PetrinetPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static PetrinetPackage getPackage() {
return PetrinetPackage.eINSTANCE;
}
} //PetrinetFactoryImpl

View file

@ -0,0 +1,46 @@
#
pluginName = Simplepdl Edit Support
providerName = www.example.org
_UI_CreateChild_text = {0}
_UI_CreateChild_text2 = {1} {0}
_UI_CreateChild_text3 = {1}
_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
_UI_PropertyDescriptor_description = The {0} of the {1}
_UI_ProcessElement_type = Process Element
_UI_WorkDefinition_type = Work Definition
_UI_WorkSequence_type = Work Sequence
_UI_Process_type = Process
_UI_Guidance_type = Guidance
_UI_Resource_type = Resource
_UI_Request_type = Request
_UI_Unknown_type = Object
_UI_Unknown_datatype= Value
_UI_WorkDefinition_linksToPredecessors_feature = Links To Predecessors
_UI_WorkDefinition_linksToSuccessors_feature = Links To Successors
_UI_WorkDefinition_name_feature = Name
_UI_WorkDefinition_requests_feature = Requests
_UI_WorkSequence_linkType_feature = Link Type
_UI_WorkSequence_predecessor_feature = Predecessor
_UI_WorkSequence_successor_feature = Successor
_UI_Process_name_feature = Name
_UI_Process_processElements_feature = Process Elements
_UI_Guidance_text_feature = Text
_UI_Guidance_elements_feature = Elements
_UI_Resource_quantity_feature = Quantity
_UI_Resource_name_feature = Name
_UI_Request_quantity_feature = Quantity
_UI_Request_target_feature = Target
_UI_Unknown_feature = Unspecified
_UI_WorkSequenceType_startToStart_literal = startToStart
_UI_WorkSequenceType_finishToStart_literal = finishToStart
_UI_WorkSequenceType_startToFinish_literal = startToFinish
_UI_WorkSequenceType_finishToFinish_literal = finishToFinish

View file

@ -0,0 +1,69 @@
/**
*/
package simplepdl;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Request</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link simplepdl.Request#getQuantity <em>Quantity</em>}</li>
* <li>{@link simplepdl.Request#getTarget <em>Target</em>}</li>
* </ul>
*
* @see simplepdl.SimplepdlPackage#getRequest()
* @model
* @generated
*/
public interface Request extends EObject {
/**
* Returns the value of the '<em><b>Quantity</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Quantity</em>' attribute.
* @see #setQuantity(int)
* @see simplepdl.SimplepdlPackage#getRequest_Quantity()
* @model required="true"
* @generated
*/
int getQuantity();
/**
* Sets the value of the '{@link simplepdl.Request#getQuantity <em>Quantity</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Quantity</em>' attribute.
* @see #getQuantity()
* @generated
*/
void setQuantity(int value);
/**
* Returns the value of the '<em><b>Target</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Target</em>' reference.
* @see #setTarget(Resource)
* @see simplepdl.SimplepdlPackage#getRequest_Target()
* @model required="true"
* @generated
*/
Resource getTarget();
/**
* Sets the value of the '{@link simplepdl.Request#getTarget <em>Target</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Target</em>' reference.
* @see #getTarget()
* @generated
*/
void setTarget(Resource value);
} // Request

View file

@ -0,0 +1,36 @@
/**
*/
package petrinet;
import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Transition</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link petrinet.Transition#getArcs <em>Arcs</em>}</li>
* </ul>
*
* @see petrinet.PetrinetPackage#getTransition()
* @model
* @generated
*/
public interface Transition extends Node {
/**
* Returns the value of the '<em><b>Arcs</b></em>' containment reference list.
* The list contents are of type {@link petrinet.Arc}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Arcs</em>' containment reference list.
* @see petrinet.PetrinetPackage#getTransition_Arcs()
* @model containment="true"
* @generated
*/
EList<Arc> getArcs();
} // Transition

View file

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

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/fr.n7.petrinet/src" modelPluginID="fr.n7.petrinet"
modelName="Petrinet" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0" copyrightFields="false"
operationReflection="true" importOrganizing="true">
<foreignModel>petriNET.ecore</foreignModel>
<genPackages prefix="Petrinet" disposableProviderFactory="true" ecorePackage="petriNET.ecore#/">
<genClasses ecoreClass="petriNET.ecore#//Network">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute petriNET.ecore#//Network/name"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference petriNET.ecore#//Network/nodes"/>
</genClasses>
<genClasses image="false" ecoreClass="petriNET.ecore#//Node">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute petriNET.ecore#//Node/name"/>
</genClasses>
<genClasses ecoreClass="petriNET.ecore#//Place">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute petriNET.ecore#//Place/tokens"/>
</genClasses>
<genClasses ecoreClass="petriNET.ecore#//Arc">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute petriNET.ecore#//Arc/weight"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute petriNET.ecore#//Arc/outgoing"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference petriNET.ecore#//Arc/target"/>
</genClasses>
<genClasses ecoreClass="petriNET.ecore#//Transition">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference petriNET.ecore#//Transition/arcs"/>
</genClasses>
</genPackages>
</genmodel:GenModel>

View file

@ -0,0 +1,69 @@
/**
*/
package petrinet;
import org.eclipse.emf.ecore.EFactory;
/**
* <!-- begin-user-doc -->
* The <b>Factory</b> for the model.
* It provides a create method for each non-abstract class of the model.
* <!-- end-user-doc -->
* @see petrinet.PetrinetPackage
* @generated
*/
public interface PetrinetFactory extends EFactory {
/**
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
PetrinetFactory eINSTANCE = petrinet.impl.PetrinetFactoryImpl.init();
/**
* Returns a new object of class '<em>Network</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Network</em>'.
* @generated
*/
Network createNetwork();
/**
* Returns a new object of class '<em>Place</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Place</em>'.
* @generated
*/
Place createPlace();
/**
* Returns a new object of class '<em>Arc</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Arc</em>'.
* @generated
*/
Arc createArc();
/**
* Returns a new object of class '<em>Transition</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Transition</em>'.
* @generated
*/
Transition createTransition();
/**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the package supported by this factory.
* @generated
*/
PetrinetPackage getPetrinetPackage();
} //PetrinetFactory

Some files were not shown because too many files have changed in this diff Show more