| Summary: | Add DRepresentation.getDescription() | ||
|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Yvan Lussaud <yvan.lussaud> |
| Component: | Core | Assignee: | Project inbox <sirius.core-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | esteban.dugueperoux, pierre-charles.david |
| Version: | 1.0.0 | Keywords: | triaged |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Yvan Lussaud
Indeed we could have something like that :
DRepresentation {
T <T extends RepresentationDescription> getDescription();
}
or yet :
DRepresentation<T extends RepresentationDescription> {
T getDescription();
}
with the implementations :
DDiagram<DiagramDescription> {
DiagramDescription getDescription();
}
I think the second proposition make more sens. I'm not sure about adding generics in our meta-model. Maybe it would work fine, maybe not. We have zero experience with it, I'm not sure this specific issue if worth taking the risk to create problems. Yes, I understand this would be only a single case, but already the second proposition has impacts on all dialects, in description and representation classes. A simple RepresentationDescription DRepresentation.getRepresentationDescription() would require client code to downcast, but at least it's a simple, localized change with no risk. It could be a derived reference implemented in each dialect by the existing getDescription() references. Should be fixed by using: new DRepresentationQuery(drep).getRepresentationDescriptor().getDescription(). It's not exactly what was requested as it it not directly on DRepresentation, but it seems close enough. |