Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EditUtil.getURI signature change in Mars?(Editor code generation results in error)
EditUtil.getURI signature change in Mars? [message #1705711] Tue, 18 August 2015 13:25 Go to next message
Alain Picard is currently offline Alain PicardFriend
Messages: 266
Registered: July 2009
Senior Member
For the first time since switching to Mars, I have made changes to one of my models and regenerated.

I am now seeing some errors in the editor project for each of my editor. In the createModel method as shown below the getURI method is supplied with a 2nd argument, but the EditUtil that I have (2.10.2.v20150123) doesn't have this extra argument. All of my emf jars look like they are from the same date.

	public void createModel() {
		URI resourceURI = EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter());
		Exception exception = null;

Re: EditUtil.getURI signature change in Mars? [message #1705736 is a reply to message #1705711] Tue, 18 August 2015 16:16 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Alain,

The template is guarded:

<%if (genModel.getRuntimeVersion().getValue() >=
GenRuntimeVersion.EMF211_VALUE) {%>
URI resourceURI = EditUIUtil.getURI(getEditorInput(),
editingDomain.getResourceSet().getURIConverter());

So if you are targeting the EMF 2.10 runtime despite using the EMF 2.11
tools/generator, you can set this property in your GenModel to target
the older runtime instead.


On 18/08/2015 3:25 PM, Alain Picard wrote:
> For the first time since switching to Mars, I have made changes to one
> of my models and regenerated.
>
> I am now seeing some errors in the editor project for each of my
> editor. In the createModel method as shown below the getURI method is
> supplied with a 2nd argument, but the EditUtil that I have
> (2.10.2.v20150123) doesn't have this extra argument. All of my emf
> jars look like they are from the same date.
>
>
> public void createModel() {
> URI resourceURI = EditUIUtil.getURI(getEditorInput(),
> editingDomain.getResourceSet().getURIConverter());
> Exception exception = null;
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EditUtil.getURI signature change in Mars? [message #1705756 is a reply to message #1705736] Tue, 18 August 2015 20:23 Go to previous message
Alain Picard is currently offline Alain PicardFriend
Messages: 266
Registered: July 2009
Senior Member
Thanks Ed, didn't realize that I'm running Mars with 2.11 but my target is still on 2.10.2.

Alain
Previous Topic:How to get ItemProvider/ItemProviderAdapterFactory for an Object
Next Topic:What should I use for UI and user actions?
Goto Forum:
  


Current Time: Tue Apr 23 09:13:43 GMT 2024

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

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

Back to the top