Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMFStore] ESWorkspace.getLocalProject(eObject obj) throws uncatchable exception
[EMFStore] ESWorkspace.getLocalProject(eObject obj) throws uncatchable exception [message #1430728] Wed, 24 September 2014 18:39 Go to next message
Roza Ghamari is currently offline Roza GhamariFriend
Messages: 82
Registered: January 2013
Member
I opened a ticket for this https://bugs.eclipse.org/bugs/show_bug.cgi?id=445011 but wanted to post the question here as well incase anyone can help.

I am trying to find the ESLocalProject for an object that I have, and I am trying to call ESWorkspace.getLocalProject(eObject obj). However, when this method is not working when object is not in any projects. The method could return null but instead it throw the following exception which I cannot catch in a try-catch statement for Exception ex. What do I need to do in this case?

org.eclipse.emf.emfstore.internal.client.model.exceptions.UnkownProjectException: Unkown project, not part of the workspace
at org.eclipse.emf.emfstore.internal.client.model.impl.WorkspaceBase.getProjectSpace(WorkspaceBase.java:412)
at org.eclipse.emf.emfstore.internal.client.model.impl.api.ESWorkspaceImpl$6.call(ESWorkspaceImpl.java:179)
at org.eclipse.emf.emfstore.internal.client.model.impl.api.ESWorkspaceImpl$6.call(ESWorkspaceImpl.java:1)
at org.eclipse.emf.emfstore.client.util.RunESCommand$2.doRun(RunESCommand.java:162)
at org.eclipse.emf.emfstore.internal.client.model.util.EMFStoreCommandWithResult.commandBody(EMFStoreCommandWithResult.java:31)
at org.eclipse.emf.emfstore.internal.client.model.util.AbstractEMFStoreCommand.execute(AbstractEMFStoreCommand.java:64)
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.emfstore.internal.client.model.util.AbstractEMFStoreCommand.aRun(AbstractEMFStoreCommand.java:108)
at org.eclipse.emf.emfstore.internal.client.model.util.EMFStoreCommandWithResult.run(EMFStoreCommandWithResult.java:59)
at org.eclipse.emf.emfstore.client.util.RunESCommand.runWithResult(RunESCommand.java:171)
at org.eclipse.emf.emfstore.internal.client.model.impl.api.ESWorkspaceImpl.getLocalProject(ESWorkspaceImpl.java:176)
Re: [EMFStore] ESWorkspace.getLocalProject(eObject obj) throws uncatchable exception [message #1431123 is a reply to message #1430728] Thu, 25 September 2014 08:33 Go to previous message
Johannes Faltermeier is currently offline Johannes FaltermeierFriend
Messages: 101
Registered: December 2013
Senior Member

Hi,

I pushed a fix to return null when a project cannot be found. For more information, see the ticket.

Cheers,
Johannes


Johannes Faltermeier

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Previous Topic:[EMFStore] Renaming/ Refactoring a shared project
Next Topic:[EMFTransaction] EMF Transaction in a web app
Goto Forum:
  


Current Time: Tue Mar 19 03:41:17 GMT 2024

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

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

Back to the top