Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Question: How to import an XMI model into EMFStore Model Explorer(How to import an XMI model into EMFStore Model Explorer in Eclipse)
Question: How to import an XMI model into EMFStore Model Explorer [message #1700561] Fri, 03 July 2015 16:36 Go to next message
Yuri Sokolovski is currently offline Yuri SokolovskiFriend
Messages: 9
Registered: July 2015
Junior Member
Hi,

I have a valid EMF model, created using a generated Editor, following the Tutorial, which I would like to submit to EMF Store.


If I use Model Explorer "Import Child", it adds the model to the Model Explorer, however there is an exception in the Error log:

java.lang.IndexOutOfBoundsException: Index: 23, Size: 22
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at org.eclipse.emf.emfstore.internal.client.model.impl.OperationRecorder.createCreateDeleteOperation(OperationRecorder.java:423)
at org.eclipse.emf.emfstore.internal.client.model.impl.OperationRecorder.modelElementAdded(OperationRecorder.java:219)
at org.eclipse.emf.emfstore.internal.client.model.impl.OperationManager.modelElementAdded(OperationManager.java:257)
at org.eclipse.emf.emfstore.internal.common.model.impl.NotifiableIdEObjectCollectionImpl$1.run(NotifiableIdEObjectCollectionImpl.java:108)
at org.eclipse.emf.emfstore.internal.common.model.impl.NotifiableIdEObjectCollectionImpl$2.run(NotifiableIdEObjectCollectionImpl.java:142)
at org.eclipse.emf.emfstore.common.ESSafeRunner.run(ESSafeRunner.java:38)
at org.eclipse.emf.emfstore.internal.common.model.impl.NotifiableIdEObjectCollectionImpl.notifyIdEObjectCollectionChangeObservers(NotifiableIdEObjectCollectionImpl.java:165)
at org.eclipse.emf.emfstore.internal.common.model.impl.NotifiableIdEObjectCollectionImpl.modelElementAdded(NotifiableIdEObjectCollectionImpl.java:111)
at org.eclipse.emf.emfstore.internal.common.model.util.EObjectChangeNotifier.addAdapter(EObjectChangeNotifier.java:90)
at org.eclipse.emf.ecore.util.EContentAdapter.handleContainment(EContentAdapter.java:139)
at org.eclipse.emf.ecore.util.EContentAdapter.selfAdapt(EContentAdapter.java:74)
at org.eclipse.emf.ecore.util.EContentAdapter.notifyChanged(EContentAdapter.java:40)
at org.eclipse.emf.emfstore.internal.common.model.util.EObjectChangeNotifier.notifyChanged(EObjectChangeNotifier.java:187)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
at org.eclipse.emf.ecore.util.EcoreEList.dispatchNotification(EcoreEList.java:249)
at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:294)
at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:303)
at org.eclipse.emf.ecp.internal.ui.util.ECPImportHandlerHelper$1.doExecute(ECPImportHandlerHelper.java:146)
at org.eclipse.emf.edit.command.ChangeCommand.execute(ChangeCommand.java:130)
at org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:78)
at org.eclipse.emf.emfstore.internal.client.model.changeTracking.commands.EMFStoreBasicCommandStack.execute(EMFStoreBasicCommandStack.java:72)
at org.eclipse.emf.ecp.internal.ui.util.ECPImportHandlerHelper.importFile(ECPImportHandlerHelper.java:142)
at org.eclipse.emf.ecp.internal.ui.util.ECPImportHandlerHelper.importElement(ECPImportHandlerHelper.java:104)
at org.eclipse.emf.ecp.internal.ui.util.ECPImportHandlerHelper.importElement(ECPImportHandlerHelper.java:77)
at org.eclipse.emf.ecp.ui.commands.ImportRootHandler.execute(ImportRootHandler.java:44)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:825)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:701)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$6(HandledContributionItem.java:685)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:613)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)

So it stays in a bad state and can't be committed (Commit button is disabled).

So my question is - is this functionality supported, or should there be a different way?

Thanks,

-Yuri

Re: Question: How to import an XMI model into EMFStore Model Explorer [message #1701034 is a reply to message #1700561] Wed, 08 July 2015 20:01 Go to previous messageGo to next message
Edgar Mueller is currently offline Edgar MuellerFriend
Messages: 89
Registered: March 2011
Member
Hi Yuri,

yes, this functionality should be supported by the 'Import Child' as one
would expect. Can you provide me with a little bit more detail on the
error via a EMFStore Bug Report
(https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMFStore)?
Alternatively, have you tried to import your model programatically as
outlined in my answer to your other question?

Cheers,
Edgar

--
Edgar Mueller

Get Professional Eclipse Support:
http://eclipsesource.com/en/services/developer-support/
Re: Question: How to import an XMI model into EMFStore Model Explorer [message #1701210 is a reply to message #1701034] Thu, 09 July 2015 20:56 Go to previous message
Yuri Sokolovski is currently offline Yuri SokolovskiFriend
Messages: 9
Registered: July 2015
Junior Member
Hi, Edgar.

Thanks again for your response.
As I said in my previous reply - once I stripped my model of any ECore dependencies everything started working fine.

I have another question - but that's a different topic.

Thanks!

-Yuri
Previous Topic:Import/Export of XMI models to/from the EMFStore
Next Topic:[EMF Forms] ComboBox CellEditor
Goto Forum:
  


Current Time: Sat Apr 20 01:49:03 GMT 2024

Powered by FUDForum. Page generated in 0.03332 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top