Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Using pre-defined types in Sirius
Using pre-defined types in Sirius [message #1489777] Thu, 27 November 2014 17:21 Go to next message
Bruno Costa is currently offline Bruno CostaFriend
Messages: 15
Registered: November 2014
Junior Member
Hi folks,

Based on an ecore metamodel, I'm trying to develop a workbench by using Sirius. In such metamodel I have a metaclass named "Property" with two attributes: "name" (EString) and "type". For this attribute "type" I want to use in Sirius by setting this as pre-defined types, such as Boolean, Integer, Real and String.

My professor told me that maybe it could be done by importing UML package, but I couldn't figure out how can I do this.
Do you guys understand me? I really appreciate if you guys could give me some tips.
Re: Using pre-defined types in Sirius [message #1490970 is a reply to message #1489777] Fri, 28 November 2014 15:52 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
On 11/27/2014 06:43 PM, Bruno Costa wrote:
> Hi folks,

hi,

>
> Based on an ecore metamodel, I'm trying to develop a workbench by using
> Sirius. In such metamodel I have a metaclass named "Property" with two
> attributes: "name" (EString) and "type". For this attribute "type" I
> want to use in Sirius by setting this as pre-defined types, such as
> Boolean, Integer, Real and String.

This question seems specific to EMF.
If I understand correctly, the attribute "type" is generic and is
supposed to represent any concrete type. You could create an EEnum to
restrict the list of authorized types.

>
> My professor told me that maybe it could be done by importing UML
> package, but I couldn't figure out how can I do this.
> Do you guys understand me? I really appreciate if you guys could give me
> some tips.


--
Florian - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Using pre-defined types in Sirius [message #1499783 is a reply to message #1490970] Fri, 05 December 2014 12:03 Go to previous messageGo to next message
Bruno Costa is currently offline Bruno CostaFriend
Messages: 15
Registered: November 2014
Junior Member
Hi Florian, thanks for your answer!

Use a EEnum to represent pre-defined types sounds strange for me... I really don't know the best way to use pre-defined types, but, for example, in SysML plugin (Obeo Designer project), the pre-defined types come from UML, right?

But, if you say that I can create an EEnum to represent the types, OK. I just want to know the best way to do this.
Re: Using pre-defined types in Sirius [message #1500060 is a reply to message #1499783] Fri, 05 December 2014 16:58 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
On 12/05/2014 01:03 PM, Bruno Costa wrote:
> Hi Florian, thanks for your answer!
>
> Use a EEnum to represent pre-defined types sounds strange for me... I
> really don't know the best way to use pre-defined types, but, for
> example, in SysML plugin (Obeo Designer project), the pre-defined types
> come from UML, right?
> But, if you say that I can create an EEnum to represent the types, OK. I
> just want to know the best way to do this.


SysML extends UML and uses DataTypes from UML. If your "type" field
value represents any kind of type you could set "DataType" as type.
EString, EInterger and other primitive types defined in EMF are
DataTypes binding Java concrete types.


--
Florian - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Using pre-defined types in Sirius [message #1500130 is a reply to message #1500060] Fri, 05 December 2014 18:10 Go to previous message
Bruno Costa is currently offline Bruno CostaFriend
Messages: 15
Registered: November 2014
Junior Member
Gotcha.

What I need is exactly use pre-defined types (Float, Int, String, ...) in a diagram made on a Sirius workbench. With EEnum I can do this, do you know if I can do it in a different approach?
Previous Topic:Workspace image not found in another eclipse instance
Next Topic:Problem to modify diagram element in Java Class
Goto Forum:
  


Current Time: Wed Apr 24 17:00:15 GMT 2024

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

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

Back to the top