Bug 110332 - Provide control over DiagramEditPart creation from Diagram.
Summary: Provide control over DiagramEditPart creation from Diagram.
Status: NEW
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement
Target Milestone: 2.1   Edit
Assignee: Anthony Hunter CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-22 11:00 EDT by Artem Tikhomirov CLA
Modified: 2010-07-19 22:00 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Artem Tikhomirov CLA 2005-09-22 11:00:08 EDT
Few classes listed below perform complex initialization of graphical viewer 
with sole purpose to obtain DiagramEditPart:

PrintHelper.createDiagramEditPart(Diagram,PreferencesHint)
CopyToImageUtil.createDiagramEditPart(Diagram,Shell,PreferencesHint)
OffscreenEditPartFactory.createDiagramEditPart(Diagram)

Besides, similar initialization takes place in 
DiagramEditor.configureGraphicalViewer() which we opt for being generated.

It seems reasonable to allow "toolsmith" to have control over that process and 
to keep that functionality in a single place with explicit API.

Using IAdaptable mechanism to get DiagramEditPart (or some new dedicated 
interface that might respect possible uses/extra features) from Diagram would 
be (an Eclipse-style :) solution, e.g. existing code will change to:

DiagramEditPart createDiagramEditPart(Diagram diagram) {
    return (DiagramEditPart) Platform.getAdapterManager().getAdapter(diagram, 
DiagramEditPart.class);
}
Comment 1 Steven R. Shaw CLA 2005-10-06 14:35:45 EDT
Changing component to "Runtime Diagram"
Comment 2 Guennadi V. Vanine CLA 2006-01-29 13:23:58 EST
would be nice to have it ASAP
Comment 3 Steven R. Shaw CLA 2006-01-29 20:33:31 EST
This is not currently in our plans for 3.2.  Contributions welcome...
Comment 4 Anthony Hunter CLA 2007-06-19 11:29:07 EDT
Not yet assigned to a release (assigned to a milestone with the Plan keyword).

Moving to the next release, GMF 2.1. 

Comment 5 Eclipse Webmaster CLA 2010-07-19 22:00:18 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime was the original product and component for this bug