Bug 234605 - Support runtime classes customization in a classloader and codemodification-friendly manner
Summary: Support runtime classes customization in a classloader and codemodification-f...
Status: NEW
Alias: None
Product: GMF-Tooling (ARCHIVED)
Classification: Modeling
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 2.3   Edit
Assignee: Artem Tikhomirov CLA
QA Contact:
URL:
Whiteboard: Usability
Keywords: performance
Depends on:
Blocks:
 
Reported: 2008-05-29 08:47 EDT by Artem Tikhomirov CLA
Modified: 2010-07-19 22:10 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Artem Tikhomirov CLA 2008-05-29 08:47:28 EDT
There might be cases, when generated editor is not satisfied with a class available from runtime and needs it slightly tuned, though the change is not that general to get propagated to runtime (or it's general enough but is not yet part of runtime). Often, such classes are used in few places throughout generated code, and present approach, with new anonymous inner class being injected each time it's needed is superfluous and troublesome. Examples include identical NonResizableEditPolicy subclass for each node label, or ListCompartmentEditPolicy from bug #147855. Hence, there's need to get such classes generated only once (and only if needed) and reused throughout generated editor.
Comment 1 Artem Tikhomirov CLA 2008-05-29 10:16:48 EDT
BTW, subclasses of NotResizableEditPolicy (added with bug #149041), may be replaced with:
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new SelectionHandlesEditPolicy() {
	protected List createSelectionHandles() {
		return Collections.singletonList(NonResizableHandleKit.moveHandle((GraphicalEditPart) getHost()));
	}
});

Besides, if no policy is installed at all, label seems to be unmovable, hence it's not clear what was the original reason for the bug #149041. Perhaps, there's some other change meanwhile that resulted in label not being movable? It might turn out we don't need any editpolicy at all (if we are fine with default selection)
Comment 2 Artem Tikhomirov CLA 2008-11-11 08:51:08 EST
Note: bug #245158 adds more code into the editpolicies subclasses of NodeLabelEditPart.xpt, and might need to be concidered when performing the change.
Comment 3 Artem Tikhomirov CLA 2010-04-30 18:07:51 EDT
Both NodeLabelEditPart and LinkLabelEditPart has been refactored to generate respective EditPolicy class only once (as nested class in diagram's EditPart). Although this is a huge leap forward, it is still not the best solution, imo (I'm looking for a generic/consistent way to solve such issues)
Comment 4 Eclipse Webmaster CLA 2010-07-19 22:10:27 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Models - Generation was the original product and component for this bug