2010/4/27 Hallvard Trætteberg
<hal@xxxxxxxxxxx>
Olivier,
I'm trying to get familiar with Wazaabi's design, both model and implementation. It seems that for each concrete widget EClass, e.g. Label, there is an EditPart/EditPartImpl, EditPartHelper and View. Could you explain the role of each of these? I think some sequence diagrams explaining how the collaborate would be great. I've just discovered the PlantUML project and Eclipse plugin, that makes the creation of such diagrams as documentation fairly easy. Just add a textual representation of the diagram using a simple syntax to a comment in the Java code, and view the diagram in the PlantUML view.
>From looking at the code, I get the impression that there's a lot of boilerplate code, with potential to simplify things. E.g. each edit part has a helper, and most (if not all) delegate to it in methods like the following two.
public void notifyChanged(Notification notification) {
if (isActive()) {
editPartHelper.notifyChanged(notification);
super.notifyChanged(notification);
}
}
protected void refreshVisuals() {
editPartHelper.refreshVisuals();
super.refreshVisuals();
}
Since the field for the edit part helper is declared fairly low in the subclass hierarchy, you also have to have these methods in each of these subclasses. If you introduced an abstract method getEditPartHelper() in an abstract edit part impl. class, you could also move these methods up into an abstract, to avoid duplicate code.
If I'm going to help you with TabFolder and Tab widgets, I will need a better understanding of the design.
Hallvard
_______________________________________________
pmf-dev mailing list
pmf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pmf-dev