Skip to main content



      Home
Home » Eclipse Projects » Sirius » The judgement of DDiagramElementSynchronizer.isSameDescription()(The judgement of DDiagramElementSynchronizer.isSameDescription())
The judgement of DDiagramElementSynchronizer.isSameDescription() [message #1784680] Mon, 02 April 2018 04:38 Go to next message
Eclipse UserFriend
private boolean isSameDescription(StyleDescription bestStyleDescription, Style style, Style bestStyle) {
return bestStyleDescription == style.getDescription() && bestStyle.eClass().equals(style.eClass());
}


About this function, we think that maybe the judgement of bestStyle.eClass().equals(style.eClass()) is redundant. If the StyleDescription is same, the class of the Style is also same. So why Sirius needs to judge the class of Style?

In our analysis, if deleting the jugement of Style'class, the performance of style refresh maybe improved. About the DDiagramElementSynchronizer.refreshStyle(), when the StyleDescription is same, there is no need to invoke mappingHelper.getBestStyle() which will create a new Style and update the Style according to StyleDescription.

We hope anyone can give us some advise or explaination about this problem.
Thanks!

[Updated on: Mon, 02 April 2018 04:39] by Moderator

Re: The judgement of DDiagramElementSynchronizer.isSameDescription() [message #1784941 is a reply to message #1784680] Fri, 06 April 2018 03:42 Go to previous message
Eclipse UserFriend
This code has not changed for a long time, so my memory is a little fuzzy, but from what I remember the test is actually needed to handle cases where style customizations are applied. This may not be the case in your own modeler, but there are several mechanisms (conditional styles, style customizations, mapping imports which override the default style, etc.) where the relationship between a Style instance and StyleDescription are more complex than they look at first glance, and this test is needed to handle those.
Previous Topic:Mapping of a group of instances as a node in a diagram
Next Topic:Is there parallel operation in Sirius?
Goto Forum:
  


Current Time: Sun Jul 13 17:16:12 EDT 2025

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

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

Back to the top