Community
Participate
Working Groups
A new feature discussed at EclipseCon and <a href="http://wiki.eclipse.org/index.php/GMF_New_and_Noteworthy#Graphdef_visual_editor_.28org.eclipse.gmf.graphdef.editor.29_enhanced">here</a> indicate it's possible to enhance generation through use of an extension model and custom templates. However, there is no "nice" way of adding these extension model elements to the gmfgen model at present. Perhaps the wizard that transforms the gmfmap model into the gmfgen model can have a place to add these customization models, to go along with new provisional dynamic templates field?
Related bug #181844
As a first try, I'd stick to a separate action (registered against .gmfgen), which pops up a dialog to select an EMF model (.ecore), asks for metaclass to instantiate and adds new eObject instance to the eResource.contents.
Created attachment 63889 [details] "Add extension model..." context action with common-styled wizard added
Comment on attachment 63889 [details] "Add extension model..." context action with common-styled wizard added 1. NPE on browse File System java.lang.NullPointerException at org.eclipse.emf.common.util.URI.createURIWithCache(URI.java:658) at org.eclipse.emf.common.util.URI.createURI(URI.java:536) at org.eclipse.gmf.internal.codegen.popup.actions.AddExtensionModelWizard$ModelImporterDetailPage.getModelLocationURI(AddExtensionModelWizard.java:221) 2. No need to allow for target encoding change. 3. Would be convenient to avoid two poorly populated pages.
Created attachment 64114 [details] Action is completely rewritten Action is completely rewritten to use standard wizard page from org.eclipse.gmf.bridge.ui module. Minor convinience tuning had to be added to org.eclipse.gmf.common as well.
Created attachment 64119 [details] Terribly sorry, I have forgotten to include one more class to the previous patch!
reviewed, slightly refactored and committed.
[target cleanup] 2.0 M7 was the original target milestone for this bug
[GMF Restructure] Bug 319140 : product GMF and component UI was the original product and component for this bug