Community
Participate
Working Groups
Element that have same nature, of common ancestors (e.g. Classifiers) could share (or inherit from) common ItemSemanticEditPolicy. Whereas it is possible to add edit policy as a replacement for an existing one in the GMFGen model, ItemSemanticEditPolicy sharing these is difficult due to the host ElementType passed in the constructor. An alternate solution is to retrieve this element type when needed rather the keeping it as a Class constant. A good candidate for this is UMLBaseItemSemanticEditPolicy#getContextElementType(IEditCommandRequest request) method which could be be overridden. This requires the method to be "protected" instead of "private". Moreover this could also be useful to deal with View / EditPart with no visual id, String semantic hint.
Done in r2584.