Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » XMI to HUTN bridge
XMI to HUTN bridge [message #534368] Tue, 18 May 2010 21:01 Go to next message
Enrico Schnepel is currently offline Enrico SchnepelFriend
Messages: 121
Registered: July 2009
Senior Member
I would like to create a hutn file from an existing .ecore model. I
could not find any menu entry where I could invoke the bridge.

Thanks

Enrico
Re: XMI to HUTN bridge [message #534391 is a reply to message #534368] Wed, 19 May 2010 00:27 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Enrico,

I don't think there's such a menu entry. Could you please file an
enhancement request for this? Off the top of my head, I think a
workaround is to rename the .ecore into .model and then create a .hutn
out of it.

Cheers,
Dimitris

Enrico Schnepel wrote:
> I would like to create a hutn file from an existing .ecore model. I
> could not find any menu entry where I could invoke the bridge.
>
> Thanks
>
> Enrico
Re: XMI to HUTN bridge [message #536383 is a reply to message #534368] Thu, 27 May 2010 22:02 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 6
Registered: February 2010
Junior Member
You can also create a new .hutn file which is initially empty and add the following:

@Spec {
metamodel "yourModelNamespaceName" {
nsUri: "yourModelNamespaceName"
}
}

package {
YourTopLevelModel "YourTopLevelModel1" {
//
}
}

Then right-click on the .hutn file and select HUTN->Generate Model.

Make sure you right-click on the .ecore file and select Register EPackages, otherwise you will get errors in your .hutn about the metamodel not being found.
Re: XMI to HUTN bridge [message #589305 is a reply to message #534368] Wed, 19 May 2010 00:27 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Enrico,

I don't think there's such a menu entry. Could you please file an
enhancement request for this? Off the top of my head, I think a
workaround is to rename the .ecore into .model and then create a .hutn
out of it.

Cheers,
Dimitris

Enrico Schnepel wrote:
> I would like to create a hutn file from an existing .ecore model. I
> could not find any menu entry where I could invoke the bridge.
>
> Thanks
>
> Enrico
Re: XMI to HUTN bridge [message #589425 is a reply to message #534368] Thu, 27 May 2010 22:02 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 6
Registered: February 2010
Junior Member
You can also create a new .hutn file which is initially empty and add the following:

@Spec {
metamodel "yourModelNamespaceName" {
nsUri: "yourModelNamespaceName"
}
}

package {
YourTopLevelModel "YourTopLevelModel1" {
//
}
}

Then right-click on the .hutn file and select HUTN->Generate Model.

Make sure you right-click on the .ecore file and select Register EPackages, otherwise you will get errors in your .hutn about the metamodel not being found.
Re: XMI to HUTN bridge [message #897106 is a reply to message #534368] Sat, 21 July 2012 21:45 Go to previous messageGo to next message
Jay Norwood is currently offline Jay NorwoodFriend
Messages: 155
Registered: July 2009
Senior Member
I noticed that the current version of epsilon does have an HUTN context menu item to generate an hutn instance from a previous emf xmi instance. This worked well for me.

The conversion program apparently expects your xmi model instance to have suffix .model, so you need to rename your xmi file with that suffix, then right click on it in the browser and select the HUTN generation from the context menu.

After previously trying to guess the correct format, this was very helpful in converting a large hutn example that I could evaluate. Nice...

[Updated on: Sat, 21 July 2012 21:46]

Report message to a moderator

Re: XMI to HUTN bridge [message #1738941 is a reply to message #897106] Tue, 26 July 2016 09:01 Go to previous messageGo to next message
HN Hindriks is currently offline HN HindriksFriend
Messages: 6
Registered: July 2016
Junior Member
Is it possible to do this in a standalone context as well?
If so, can you point me to an example on how to load an existing model and then save the model as HUTN, using Java?
Re: XMI to HUTN bridge [message #1739234 is a reply to message #1738941] Thu, 28 July 2016 15:18 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi,

The code behind the right-click action mentioned by Jay in the previous message should be a good starting point for your investigation

https://git.eclipse.org/c/epsilon/org.eclipse.epsilon.git/tree/plugins/org.eclipse.epsilon.hutn.dt/src/org/eclipse/epsilon/hutn/dt/actions/GenerateModelAction.java

Cheers,
Dimitris
Previous Topic:EVL: Standalone example not working
Next Topic:[Eugenia] Sub-labels into nodes and links
Goto Forum:
  


Current Time: Fri Mar 29 02:11:43 GMT 2024

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

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

Back to the top