|
Re: Resource does not exist exception when regenerating editor [message #380772 is a reply to message #380765] |
Thu, 04 December 2003 19:08 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Henrich,
Since your model references Ecore directly, your edit project is assumed to need references to the
Ecore edit project and so a project reference and classpath entry will be created for it. And if you
need to reference the ecore.edit stuff, you need to bring the ecore.edit project into the workspace
with the right _x.y.z suffix (as is specified by the Edit Project information in the Ecore.genmodel).
We've been talking internally about being able to reference .genmodel/.ecore files directly from a
binary project rather than having to bring it into the workspace, but we haven't done any real work on
this yet...
Henrich Kraemer wrote:
> I deleted the editor project and couldn't regenerate it.
>
> I have a model that references classes defined in Ecore.ecore.
> and in TestEMF.ecore. TestEMF.ecore is in my control.
> My genmodel file contains:
> usedGenPackages="../../../com.ibm.test/src/model/TestEMF.genmodel#//emf
> ../../../org.eclipse.emf.ecore/src/model/Ecore.genmodel#//ec ore ">
>
> The initial message in the .log complained "Resource /testemf.edit does
> not exist.". I tracked this down in the debugger and found that
> TestEMF.genmodel's contained a stale Edit Directory. I updated the entry
> which fixed that problem.
>
> However after this I get a similar error for my Ecore.ecore reference.
> Ecore.genmodel specifies "/org.eclipse.emf.ecore.edit_1.1.0/src" as Edit
> Directory. In my workspace however the plugin imported is called
> "org.eclipse.emf.ecore.edit" without the version numbers.
>
> I wonder:
> 1. Am I doing something wrong which makes me run into this issue.
> 2. Why didn't I see the issue on initial generation?
> 3. Why does the editor generation tries to access the "Edit Directory"
> of referenced projects?
> 4. What is the best way to resolve my situation?
>
> Below is the relevant exception stack:
> org.eclipse.core.internal.resources.ResourceException: Resource
> /org.eclipse.emf.ecore.edit_1.1.0 does not exist.
> at
> org.eclipse.core.internal.resources.Resource.checkExists(Res ource.java:302)
> at
> org.eclipse.core.internal.resources.Resource.checkAccessible (Resource.java:174)
> at
> org.eclipse.core.internal.resources.Project.checkAccessible( Project.java:102)
> at
> org.eclipse.core.internal.resources.Project.getDescription(P roject.java:296)
> at
> org.eclipse.emf.codegen.ecore.genmodel.impl.GenBaseImpl.find OrCreateContainer(GenBaseImpl.java:591)
> at
> org.eclipse.emf.codegen.ecore.genmodel.impl.GenBaseImpl.gene rate(GenBaseImpl.java:407)
> at
> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.g enerateEditor(GenPackageImpl.java:1909)
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02985 seconds