| Summary: | Custom Style Border nodes do not work with Edge creation tools | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Bailey Trenton <shaffdog78> | ||||||||
| Component: | Diagram | Assignee: | Maxime Porhel <maxime.porhel> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | Jessy Mallet <jessy.mallet> | ||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | esteban.dugueperoux, jessy.mallet, maxime.porhel | ||||||||
| Version: | 2.0.5 | Keywords: | triaged | ||||||||
| Target Milestone: | 3.1.0 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows 7 | ||||||||||
| See Also: |
https://git.eclipse.org/r/55000 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=ec3b7c511b30a0027dc33947461becab662d62b1 |
||||||||||
| Whiteboard: | trivial, flash | ||||||||||
| Bug Depends on: | |||||||||||
| Bug Blocks: | 476569, 476570, 476572 | ||||||||||
| Attachments: |
|
||||||||||
Hi Your zip example seems incorrect, When opening the basicfamily.odesign, I see only the Group element but not diagram definition. Created attachment 256224 [details]
Better representation of our model state
This is an updated version of our model state. Hopefully with the design file correctly uploaded this time
Hi, Your zip seems corrupted, I am not able to extract the sub archives of your combined zip. Furthermore, could you upload your archive in a more common format like zip for example ? I needed to get a specific tool to try to extract your zipx files but it fails. Regards, Maxime Created attachment 256246 [details]
Third zip file try
Hopefully this zip file will work. These were zipped with a legacy version of Winzip.
Bailay, you might have to look into org.eclipse.sirius.diagram.ui.internal.edit.parts.SquareEditPart. I think that if your style edit policy also overrides createDefaultEditPolicies to do nothing, it will work. Your style edit part currently inherits its createDefaultEditPolicies from org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart, one of the installed policy try to answer the create connection request in a pure GMF mode and does not let the connection tool get a command from the Sirius edit policy installed on the node edit part. Note that in the emtpy createDefaultPolicies() methods is shown in the sample style edit part of the custom style documentation but we should add some comments about this before the sample class. New Gerrit change created: https://git.eclipse.org/r/55000 Thanks for the response. And overriding createDefaultEditPolicy method to do nothing did make it so our custom shapes worked with the connection tool. Gerrit change https://git.eclipse.org/r/55000 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=ec3b7c511b30a0027dc33947461becab662d62b1 Documentation has been modified. Validated with Sirius 3.1.0.201509241504 Available in Sirius 3.1.0. |
Created attachment 256211 [details] Zip file containing the zipped projects to test with We create a border node that has a custom style supplied by a custom editpart with our own shape. We also create a editPartProvider that provides our shape. We have a creation tool that connects these border nodes together. If we use Sirius defined shapes as our Style the Connection Tool works just fine. If we, however, use our custom style border node the connection tool does not work. Supplied are a version of the basic family model from the example that illustrates the problem. I define a basic custom style that is a simple square shape and try to use the connection tool with it and it fails to recognize that it is a valid connection point. The BasicFamilyModelWithCustomEditPart.zip contains the model code and the custom edit part. The ModedAndDesign contains the model and the odesign file. Import projects from the BasicFamilyModelWithCustomEditPart.zip and run a eclipse application. Import the ModelAndDesign.zip into the running eclipse. open a diagram and try to connection the border nodes to each other with the custom style active. It will not allow it. modify the odesign file and set the ConditionalStyle expression to self = null to allow the sirius defined shape style to be selected and try the connection again. It should be allowed this time. Thanks,