Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Create a View without a reference to the model
Create a View without a reference to the model [message #1772149] Wed, 06 September 2017 07:35 Go to next message
Martin Jedlicka is currently offline Martin JedlickaFriend
Messages: 122
Registered: January 2016
Senior Member
Hi,

I needed to create cutom View (any graphical object) without reference to the model (just like you can insert Notes from the palette).

Is that possible? If so, how? Any example?

Thank you for advice.

Martin
Re: Create a View without a reference to the model [message #1772283 is a reply to message #1772149] Thu, 07 September 2017 13:29 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hello,

The created view will be remove on refresh by the diagram synchronization. I do not think that it will work on an unsychronized diagram either. Why don't you use the diagram Notes if you want to display an element that is purely a graphical information?

Regards,
Steve


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Create a View without a reference to the model [message #1772323 is a reply to message #1772283] Fri, 08 September 2017 06:15 Go to previous messageGo to next message
Martin Jedlicka is currently offline Martin JedlickaFriend
Messages: 122
Registered: January 2016
Senior Member
Hi Steve,

it's a good idea to insert the Notes (Text) element from the palette.

But I would like to insert the Notes into the diagram programmatically.

How?

Martin
Re: Create a View without a reference to the model [message #1772342 is a reply to message #1772323] Fri, 08 September 2017 09:36 Go to previous message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hi Martin,

You can use the helper org.eclipse.sirius.diagram.ui.tools.api.util.GMFNotationHelper.createNote(Diagram, String) or the command org.eclipse.sirius.tests.support.command.CreateNoteRecordingCommand. You can find an example in org.eclipse.sirius.tests.unit.diagram.modeler.ecore.design.EntitiesDiagramDeleteFromDiagramTests.testDeleteNoteFromDiagram().

Regards,
Steve


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Edge mapping -- causes a cycle
Next Topic:trouble with container size
Goto Forum:
  


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

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

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

Back to the top