Skip to main content



      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 09:25 Go to next message
Eclipse UserFriend
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 12:16 Go to previous messageGo to next message
Eclipse UserFriend
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;
>
>
Re: EditUtil.getURI signature change in Mars? [message #1705756 is a reply to message #1705736] Tue, 18 August 2015 16:23 Go to previous message
Eclipse UserFriend
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 Jul 08 14:14:35 EDT 2025

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

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

Back to the top