|Re: Customising Edge styles [message #1776355 is a reply to message #1776353]
||Wed, 15 November 2017 15:37
|| Ran Wei
Registered: September 2012
Location: York, UK
In TreeEditPartProvider, when getEdgeEditPartClass() is called, I provide EdgeEditPart, which in turn creates an EdgePipeConnection.
When EdgePipeConnection extends PolylineConnection, the edge can be drawn, just it is now allowed by Sirius.
When EdgePipeConnection extends PolylineConnectionEx , I had the previous exception.
By when creating an edge, i meant when using a tool from the palette to create an edge between two nodes, that is correct.
Thank you very much for your help.
Department of Computer Science
University of York
|Re: Customising Edge styles [message #1776462 is a reply to message #1776440]
||Thu, 16 November 2017 15:24
| Pierre Guilet
Registered: June 2017
AbstractExtendableEdgeEditPart extends DEdgeEditPart that is internal that is why you have warnings.
So it does not change anything. You should keep DEdgeEditPart
Internal means we can do some changes that will break your code if you use the internal code.
If this is ok for your project you can use it. If you want to industrialize it then you should extend AbstractDiagramEdgeEditPart and add the code that was missing and causing exception and that I gave you in previous message.
In both case you must change the method getPrimaryShape() to return your figure type.
Your figure must also provide label figures like ViewEdgeFigure with methods called by your addFixedChild(EditPart) method (getFigureViewEdgeNameFigure,getFigureViewEndEdgeNameFigure,getFigureViewBeginEdgeNameFigure).
You can just copy the code handling these labels in your figure.
Anyway there is no guarantee that you will not be blocked completely at some point because Sirius architecture does not allow you to do what you seek.
What you are doing is out of the box and can lead to nothing.
Pierre Guilet - Obeo
Need training or professional services for Sirius?
[Updated on: Thu, 16 November 2017 15:26]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02523 seconds