Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Parent and Child Node
icon7.gif  Parent and Child Node [message #1609739] Tue, 10 February 2015 09:56 Go to next message
Minh Hiep Pham is currently offline Minh Hiep PhamFriend
Messages: 10
Registered: February 2015
Location: Hannover, Germany
Junior Member
Hi,

im new with Sirius. I want to create a new graphical Editor for my current Model project. There are 2 Class TrackSectionControl and CrossingControl. Class CrossingControl extends SuperClass TrackSectionControl. Now problem appear when i want to present a Node CrossingControl. It displays 2 times 1 Node with TrackSectionControl View and 1 Node with CrossingControl View. However i want to display only Node with CrossingControl View. Is there anyway to hide Node with TrackSectionControl View?
One more question i want to display EOperation of my EClass. Is there any solution?

im so sorry about my language, because english is not my mother language and i dont used to use it usually. That is great to have an answer from you. Thanks a lot and have a good day.


Minh Hiep Pham
  • Attachment: Railcab model.png
    (Size: 29.76KB, Downloaded 111 times)
  • Attachment: odesign.png
    (Size: 37.57KB, Downloaded 156 times)
  • Attachment: View.png
    (Size: 12.13KB, Downloaded 112 times)


Regards,


Minh Hiep Pham

[Updated on: Fri, 13 February 2015 17:49]

Report message to a moderator

Re: Parent and Child Node [message #1612900 is a reply to message #1609739] Thu, 12 February 2015 09:16 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
> Hi,

Hi,


> im new with Sirius. I want to create a new graphical Editor for my
> current Model project. There are 2 Class TrackSectionControl and
> CrossingControl. Class CrossingControl extends SuperClass
> TrackSectionControl.

So, to avoid confusions, did you create a model based on ecore with two
EClass "CrossingControl" and "TrackSectionControl" ? Or those classes
are from your meta-model defined with Ecore ?

> Now problem appear when i want to present a Node
> CrossingControl. It displays 2 times 1 Node with TrackSectionControl
> View and 1 Node with CrossingControl View. However i want to display
> only Node with CrossingControl View. Is there anyway to hide Node with
> TrackSectionControl View? One more question i want to display EOperation
> of my EClass. Is there any solution?

If you defined a specification model based on Ecore, with two EClass
TrackSectionControl and CrossingControl, you can use a precondition
expression on the EClass name to restrict the created view only for
"CrossingControl". But if TrackSectionControl and CrossingControl are
types from your meta-model, you have to restrict the Domain class on
"CrossingControl".

If you want more informations about how define sub-nodes (to display
EOperations for instance) I suggest you to take a look on the specifier
documentation
(http://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html)


>
> im so sorry about my language, because english is not my mother language
> and i dont used to use it usually. That is great to have an answer from
> you. Thanks a lot and have a good day.
>
> Minh Hiep Pham

Regards,

--
Florian - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Parent and Child Node [message #1613498 is a reply to message #1612900] Thu, 12 February 2015 18:02 Go to previous messageGo to next message
Minh Hiep Pham is currently offline Minh Hiep PhamFriend
Messages: 10
Registered: February 2015
Location: Hannover, Germany
Junior Member
Hi,

Thank you so much about your answer. I have done like which you show me. I defined a specification model based on Ecore. When i use precondition expression on the EClass name, it does not show the view any more. How can i fix it?
One more question! I want to write a class service in my VSP. Do you have any tutorial or something else? I try to do that! But the service method does not show in the .odesign file. Thanks a lot!

Minh Hiep Pham


Regards,


Minh Hiep Pham
Re: Parent and Child Node [message #1614865 is a reply to message #1613498] Fri, 13 February 2015 14:54 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
On 02/12/2015 07:02 PM, Minh Hiep Pham wrote:
> Hi,

Hi,
>
> Thank you so much about your answer. I have done like which you show me.
> I defined a specification model based on Ecore. When i use precondition
> expression on the EClass name, it does not show the view any more. How
> can i fix it?

It's hard to say without any further information about your model.

One more question! I want to write a class service in my
> VSP. Do you have any tutorial or something else? I try to do that! But
> the service method does not show in the .odesign file. Thanks a lot!

you will find the Sirius documentation here:
http://www.eclipse.org/sirius/doc/
and more specifically about the service methods:
http://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#service_methods



>
> Minh Hiep Pham

Regards,

--
Florian - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Parent and Child Node [message #1615084 is a reply to message #1614865] Fri, 13 February 2015 17:52 Go to previous messageGo to next message
Minh Hiep Pham is currently offline Minh Hiep PhamFriend
Messages: 10
Registered: February 2015
Location: Hannover, Germany
Junior Member
Hi Florian,

Thanks a lot for your help! I have edit my post with the screenshot from my work. Can you check it, which wrong did i do?
I want to learn more about service methods! Do you have any example or something else! I have read the documentation. However i have not really understand about the information! I need so much help about that.

Regards,

Minh Hiep Pham


Regards,


Minh Hiep Pham
Re: Parent and Child Node [message #1618941 is a reply to message #1615084] Mon, 16 February 2015 08:20 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
> Hi Florian,

hi,

Regarding your screenshots I now understand better. You need to filter
elements of type TrackSectionControl. You can use the expression
[oclIsTypeOf(TrackSectionControl)/]. See
https://wiki.eclipse.org/Acceleo/OCL_Operations_Reference#oclIsTypeOf.28_typespec_:_Classifier_.29_:_Boolean.
for further information.
>
> Thanks a lot for your help! I have edit my post with the screenshot from
> my work. Can you check it, which wrong did i do? I want to learn more
> about service methods! Do you have any example or something else! I have
> read the documentation. However i have not really understand about the
> information! I need so much help about that.
> Regards,
>
> Minh Hiep Pham


Regards,

--
Florian - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Parent and Child Node [message #1618942 is a reply to message #1615084] Mon, 16 February 2015 08:25 Go to previous message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
A good example is the project "Ecore Tools" which is based on Sirius.
See http://git.eclipse.org/c/ecoretools/org.eclipse.ecoretools.git/. You
can take a look in the org.eclipse.emf.ecoretools.design project which
contains the *.odesign and the services.



> Hi Florian,
>
> Thanks a lot for your help! I have edit my post with the screenshot from
> my work. Can you check it, which wrong did i do? I want to learn more
> about service methods! Do you have any example or something else! I have
> read the documentation. However i have not really understand about the
> information! I need so much help about that.
> Regards,
>
> Minh Hiep Pham


--
Florian - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Layout within Container (Diagram Element)
Next Topic:[Popup menu] How to disable a context menu item by service
Goto Forum:
  


Current Time: Wed Apr 24 15:09:29 GMT 2024

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

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

Back to the top