Unresolved proxy classpath.. Make sure the EPackage has been registered. [message #1733569] |
Mon, 30 May 2016 04:25  |
Eclipse User |
|
|
|
I have an xtext grammar, and I created an xcore model for my grammar.
In my .xtext file, I removed this line:
generate myDsl "http://mydsl.org"
and I added this line:
In my GenerateMydsl.mwe2 file:
I added the following:
bean = StandaloneSetup {
scanClassPath = true
platformUri = "${runtimeProject}/.."
// The following two lines can be removed, if Xbase is not used.
registerGeneratedEPackage = "org.eclipse.xtext.xbase.XbasePackage"
// Register my packages
registerGeneratedEPackage = "mydsl.MydslPackage"
registerGenModelFile = "platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel"
registerGenModelFile = "platform:/resource/xtext/model/generated/Mydsl.genmodel"
}
MyDslPackage is in emf-gen directory, which is automatically generated from my mydsl.xcore file.
I have read that I would need to register the GenModel, so I created a new genmodel from mydsl.xcore by doing this:
right click on mydsl.xcore -> new -> other -> EMF generator model -> Mydsl.genmodel -> xcore -> load -> tick the entry in root packages -> finish.
I am not sure if this is still needed, though.
Inside the Generator component for language, I added these:
loadedResource = "platform:/resource/org.eclipse.emf.ecore.xcore.lib/model/XcoreLang.xcore"
loadedResource = "platform:/resource/xtext/model/generated/mydsl.ecore"
loadedResource = "platform:/resource/xtext/src/org/MyDsl.xcore"
I have also commented this line:
//fragment = ecore.EMFGeneratorFragment auto-inject {}
My plugin.xml also have this entry:
<extension point="org.eclipse.emf.ecore.generated_package">
<!-- @generated Mydsl -->
<package
uri="mydsl"
class="mydsl.MydslPackage"
genModel="src/org/Mydsl.xcore"/>
</extension>
I was able to generate the jar file, but when I run it, I get this error:
java.lang.IllegalStateException: Unresolved proxy classpath:/org/mydsl#//Directory. Make sure the EPackage has been registered.
What am I doing wrong? 
I am not very familiar with xcore and would appreciate any suggestions.
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08074 seconds