Bug 181187 - Need a method to add extension models to gmfgen model
Summary: Need a method to add extension models to gmfgen model
Status: RESOLVED FIXED
Alias: None
Product: GMF-Tooling (ARCHIVED)
Classification: Modeling
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P1 normal (vote)
Target Milestone: 2.0   Edit
Assignee: Anna Karjakina CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-04-05 08:42 EDT by Richard Gronback CLA
Modified: 2010-07-19 12:17 EDT (History)
1 user (show)

See Also:


Attachments
"Add extension model..." context action with common-styled wizard added (25.60 KB, patch)
2007-04-16 06:48 EDT, Anna Karjakina CLA
tikhomirov.artem: review-
Details | Diff
Action is completely rewritten (16.95 KB, patch)
2007-04-17 18:43 EDT, Anna Karjakina CLA
no flags Details | Diff
Terribly sorry, I have forgotten to include one more class to the previous patch! (17.76 KB, patch)
2007-04-17 19:12 EDT, Anna Karjakina CLA
tikhomirov.artem: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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