|
|
|
Re: Problem generating edit/editor [message #729463 is a reply to message #705121] |
Mon, 26 September 2011 09:14 |
Marc Hamilton Messages: 11 Registered: July 2009 |
Junior Member |
|
|
Working with Indigo. Still don't understand the problem.
Given the example "Domainmodel" (org.eclipse.xtext.example.domainmodel), I want to extend the generator to also generate an EMF Edit plugin.
The example model contains the following line:
fragment = ecore.EcoreGeneratorFragment {}
Attempt 1: only add setting to generate editor (generating edit plugin from genmodel works, so I'd assume that this is sufficient):
fragment = ecore.EcoreGeneratorFragment {
generateEdit = true
}
=> result in the java.io.IOException" The path '/org.eclipse.xtext.example.domainmodel.edit/src/org/eclipse/xtext/example/domainmodel/domainmodel/provider/DomainmodelEditPlugin.java' is unmapped.
Attempt 2: the 'hoover' comment on generateEdit suggests that setEditDirectory and setEditPluginID should be considered. So, let's try to add these:
fragment = ecore.EcoreGeneratorFragment {
generateEdit = true
editPluginID = "${projectName}.edit"
editDirectory = "platform:/resource/${projectName}.edit"
}
However, this makes no difference.
Attempt 3: using file: path settings
fragment = ecore.EcoreGeneratorFragment {
generateEdit = true
editPluginID = "${projectName}.edit"
editDirectory = "file:C:/localdata/Eclipse/Indigo/v1/ws/learn/${projectName}.edit"
}
Again, no difference.
Digging a bit futher, debugging to the exception, I found that the PlatformResourceURIHandlerImpl throws the exception on an attempt to convert a uri that already contains "/resource/..." at the beginning.
It tries to convert e.g. "/resource/org.eclipse.xtext.example.domainmodel", or "/resource/localdata/Eclipse/Indigo/...", which cannot be resolved.
What can I do in the workflow to prevent this exception?
Is there anyone who succeeded in generating the edit plugin via the workflow?
---
Regards, Marc.
|
|
|
|
|
Re: Problem generating edit/editor [message #729524 is a reply to message #729475] |
Mon, 26 September 2011 12:20 |
Marc Hamilton Messages: 11 Registered: July 2009 |
Junior Member |
|
|
Hi Christian,
Ok, it now seems to work, I did it now using the following steps:
1. Make sure that in the workflow the "EcoreGeneratorFragment" is empty, and run the workflow.
2. Use the generated "genmodel" to generate the EMF Edit plugin
3. Now change the workflow and add the 'generateEdit = true' line to the EcoreGeneratorFragment
4. When you now run the workflow, no error is reported.
Indeed, the edit plugin java file also have a new timestamp, so it seems to really generate now.
Christian, thanks for your answer, at least I get the generator going now.
Still, step 1 and 2 is just doing what a generator should have done.
--
Regards, Marc.
|
|
|
Powered by
FUDForum. Page generated in 0.04668 seconds