Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » How to hide the label programatically on creation of EObject(How to hide the label programatically on creation of EObject)
How to hide the label programatically on creation of EObject [message #1804184] Wed, 20 March 2019 06:22 Go to next message
Sharmila D is currently offline Sharmila DFriend
Messages: 81
Registered: June 2018
Member
Hii

Could anyone Please help me on this

How to hide the label programatically on creation of EObject

In my service method Iam getting EObject.From the EObject Iam not getting how to hide Label of that EObject.
Is there any API or can I get any sample code

Re: How to hide the label programatically on creation of EObject [message #1804201 is a reply to message #1804184] Wed, 20 March 2019 10:03 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 432
Registered: May 2011
Senior Member
Hello,

You can use org.eclipse.sirius.diagram.business.api.helper.graphicalfilters.HideFilterHelper.hideLabel(DDiagramElement) to hide a DDiagramElement (not a semantic EObject element). You can see examples in DiagramElementSelectionDialogTest or in the code.

Regards,
Steve


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: How to hide the label programatically on creation of EObject [message #1804206 is a reply to message #1804201] Wed, 20 March 2019 12:33 Go to previous messageGo to next message
Sharmila D is currently offline Sharmila DFriend
Messages: 81
Registered: June 2018
Member
Hi Steve
Thank you for the reply

I want to hide the label of connector on creating connector

How I can do it.

After creating of Connector in design Iam adding external Java action where I can get connector as EObject.How to hide Please help me

Re: How to hide the label programatically on creation of EObject [message #1804218 is a reply to message #1804206] Wed, 20 March 2019 15:39 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 432
Registered: May 2011
Senior Member
Ah, you are in a creation tool. As you need a DDiagramElement that by default is created as a result of the tool by the refresh, you will need to add a "Create View" task in your tool to be able to call the API presented in my first answer.

Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: How to hide the label programatically on creation of EObject [message #1804298 is a reply to message #1804218] Fri, 22 March 2019 04:52 Go to previous messageGo to next message
Sharmila D is currently offline Sharmila DFriend
Messages: 81
Registered: June 2018
Member
Hi Steve

Sorry to bother you again.I was not able to understand what to be given in container view and Iam not getting the createdView in service.Then how I can get DDigramElement for the created element

Please find the below screenshots
Iam adding CreateView Task before createInstance Task Is it correct way and In createView Task Iam mapping the creating EObject and in service if I pass created view my service is not triggering only


Please help me I got stuck in middle

  • Attachment: createView.PNG
    (Size: 5.13KB, Downloaded 20 times)
  • Attachment: Mapping.PNG
    (Size: 13.55KB, Downloaded 14 times)
Re: How to hide the label programatically on creation of EObject [message #1804338 is a reply to message #1804298] Fri, 22 March 2019 15:51 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 432
Registered: May 2011
Senior Member
Hello,

As in the models it is the DDiagramElement that references the semantic element, you will need to ask the Cross referencer. You can find it from the session or use the query org.eclipse.sirius.business.api.query.EObjectQuery.getInverseReferences(EReference).

Regards,
Steve


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: How to hide the label programatically on creation of EObject [message #1804369 is a reply to message #1804338] Mon, 25 March 2019 06:44 Go to previous message
Sharmila D is currently offline Sharmila DFriend
Messages: 81
Registered: June 2018
Member
Hi Steve

Thankyou for the reply.It worked:)
Previous Topic:Reference between nodes
Next Topic:Sirius to UML Designer
Goto Forum:
  


Current Time: Wed Oct 23 01:20:31 GMT 2019

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

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

Back to the top