Bug 181187

Summary: Need a method to add extension models to gmfgen model
Product: [Modeling] GMF-Tooling (ARCHIVED) Reporter: Richard Gronback <richard.gronback>
Component: CoreAssignee: Anna Karjakina <akarjakina>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: tikhomirov.artem
Version: 2.0Keywords: contributed
Target Milestone: 2.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
"Add extension model..." context action with common-styled wizard added
tikhomirov.artem: review-
Action is completely rewritten
none
Terribly sorry, I have forgotten to include one more class to the previous patch! tikhomirov.artem: review+

Description Richard Gronback CLA 2007-04-05 08:42:23 EDT
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?
Comment 1 Artem Tikhomirov CLA 2007-04-12 08:53:15 EDT
Related bug #181844
Comment 2 Artem Tikhomirov CLA 2007-04-13 11:21:00 EDT
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.
Comment 3 Anna Karjakina CLA 2007-04-16 06:48:01 EDT
Created attachment 63889 [details]
"Add extension model..." context action with common-styled wizard added
Comment 4 Artem Tikhomirov CLA 2007-04-17 11:17:47 EDT
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.
Comment 5 Anna Karjakina CLA 2007-04-17 18:43:15 EDT
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.
Comment 6 Anna Karjakina CLA 2007-04-17 19:12:21 EDT
Created attachment 64119 [details]
Terribly sorry, I have forgotten to include one more class to the previous patch!
Comment 7 Artem Tikhomirov CLA 2007-04-18 09:16:01 EDT
reviewed, slightly refactored and committed.
Comment 8 Richard Gronback CLA 2008-08-13 13:11:46 EDT
[target cleanup] 2.0 M7 was the original target milestone for this bug
Comment 9 Eclipse Webmaster CLA 2010-07-19 12:17:39 EDT
[GMF Restructure] Bug 319140 : product GMF and component
UI was the original product and component for this bug