Closed jolehmann closed 2 years ago
Regarding the Requests: 1) The position of the arrows is unfortunately due to the arrow thickness rendered by Sirius. If you look at the marker when the arrow is selected, it is in the right place. Even if you manually set the thickness of the connector to zero, the tip is in the right place.
2) The deletion of the white background is another Jira issue and belongs to EDITORS-278, but this issue will also be worked on during the practical course, which means that the adjustment will take place there.
3) Package name and variable name in camelCase are adapted in the upcoming commit. Tabbed indentation like this is throughout the entire Sirius project, not just in the new classes. Should this really be adjusted?
After the last commit, all new classes are now conform to the palladio codeconventions.
I have a question regarding the anchor point. Would it be possible to calculate the offset of the thickness and then use a new anchor point, since you already individually calculate them as far as I understand the code. I'm not sure whether this is actually a good idea, but it could fix this non-center arrow.
The idea sounded like a good one and I just wrote a decorator that slides the tip back on the edge with PIXEL_OFFSET as follows:
"reference" is the point where the arrow comes from, "anchorPoint" is the usually calculated anchor.
The problem is that the display depends on the scaling of the editor, that means with PIXEL_OFFSET = 10 the whole thing looks good in full zoom, but if you are further away, the offset is much too big. Because the anchor point is calculated independently of the editor, only via the diagram, you unfortunately have no access to the scaling during calculation.
I am therefore think to leave it at the old state. Or do you have another idea?
Update:
It is indeed possible, I only had to translate the points temporarily into the coordinate system of the parent figure. With a PIXEL_OFFSET = 2, which also corresponds to the set Sirius Edge Size, it looks good now.
Now the only question is to include the whole thing cleanly in the class structure...
I added a PixelOffsetDecorator which is used in the SinkRoleStyleConfigurationProvider like shown below. Since you can easily insert this decorator, I also added it to the ProvidedRole and InfrastructureProvidedRole, because there the arrow also pointed a bit in the circle.
I pushed the implementation to my branch EDITORS-225-offset, you can take a look there. If this is ok, I will transfer the changes to the branch here for the pull request.
I think the changes in your branch look fine. In some cases there is still some offset visible, but that might be a Linux problem. But it is already much better than before. Therefore, I would suggest adding the changes to the pull request.
I have now merged the offset branch into here. So there is nothing standing in the way of the PR now? :)
Die Ankerpunkte der Assembly Diagramm Konektoren wurden entsprechend nachfolgender Grafik umgesetzt.
Die Anpassungen befinden sich in: org.palladiosimulator.editors.sirius.custom.style.styleconfiguration org.palladiosimulator.editors.sirius.custom.style.styleconfiguration.anchorProvider org.palladiosimulator.editors.sirius.custom.style.styleconfiguration.provider
Zusätzlich wurden die Grafiken der Nodes zentriert.