Skip to main content



      Home
Home » Modeling » Epsilon » XMI to HUTN bridge
XMI to HUTN bridge [message #534368] Tue, 18 May 2010 17:01 Go to next message
Eclipse UserFriend
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] Tue, 18 May 2010 20:27 Go to previous messageGo to next message
Eclipse UserFriend
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 18:02 Go to previous messageGo to next message
Eclipse UserFriend
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] Tue, 18 May 2010 20:27 Go to previous messageGo to next message
Eclipse UserFriend
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 18:02 Go to previous messageGo to next message
Eclipse UserFriend
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 17:45 Go to previous messageGo to next message
Eclipse UserFriend
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 17:46] by Moderator

Re: XMI to HUTN bridge [message #1738941 is a reply to message #897106] Tue, 26 July 2016 05:01 Go to previous messageGo to next message
Eclipse UserFriend
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 11:18 Go to previous message
Eclipse UserFriend
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: Tue Jul 22 19:35:07 EDT 2025

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

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

Back to the top