Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 72215 - Locate dependant genmodels using PDE src extension mechanism
Summary: Locate dependant genmodels using PDE src extension mechanism
Status: VERIFIED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Tools (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P2 enhancement (vote)
Target Milestone: Past   Edit
Assignee: Dave Steinberg CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-18 16:47 EDT by Randy Hudson CLA
Modified: 2008-01-28 16:46 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Randy Hudson CLA 2004-08-18 16:47:04 EDT
Model generation requires that the genmodels be present in the workspace in 
order to be GENed against. This is not the flexibility offered by the PDE for 
developing plug-ins in general.  Plug-ins may be loaded as binary, or simply 
external.

The PDE looks for a src JAR via an extension point:
  <extension point = "org.eclipse.pde.core.source">
     <location path="src" />
  </extension>

EMF could look for genmodels using its own similar extension point, which 
presumably would only be present within an SDK/SRC plug-in, which would not be 
part of a runtime feature. Or it could reuse the PDE support and API (if it 
exists) to get a "source" file, whether loaded in the workspace or in an 
external plug-in source zip. The reuse makes some sense because .java files are 
not needed at runtime either.
Comment 1 Ed Merks CLA 2005-02-18 07:17:02 EST
[plan pri=2 est=2w/]
Comment 2 Philipp W. Kutter CLA 2005-03-14 17:23:28 EST
At http://www.eclipse.org/newsportal/article.php?id=9446&group=eclipse.tools.emf
I describe a problem, where I try to solve this problem by including the
.genmodel in the plugin, and then importing the plugin in the workspace.

Ed Merks suggests that this is related to this bug here. Do you want me to send
the example code I sent to the newsgroup?
Comment 3 Ed Merks CLA 2005-05-16 08:15:23 EDT
Randy,

We've made a number of changes in this area.  Instead of saving models to
src/model we will save them to model.  We also generate a plugin registration
indicating where the .genmodel for a given package is located. For all our
existing plugins, we've changed them to match this new pattern. For example, for
the Ecore model itself there is this registration:

  <extension point="org.eclipse.emf.ecore.generated_package">
    <package
        uri = "http://www.eclipse.org/emf/2002/Ecore"
        class = "org.eclipse.emf.ecore.EcorePackage"
        genModel = "model/Ecore.genmodel" />
  </extension>

The binary plugin will include the model/*.ecore and model/*.genmodel so that
they can be reused and the wizards will provide access to these registered
versions when you build a new model.

Dave and Marcelo are writing a document to describe all this...
Comment 4 Randy Hudson CLA 2005-05-16 10:15:55 EDT
Sounds great. Will the extension and model go in the runtime plug-in?
Comment 5 Nick Boldt CLA 2005-05-19 15:58:19 EDT
Fixed in Build 2.1.0 I200505191347
Comment 6 Pratik Shah CLA 2005-07-25 15:25:28 EDT
Ed, where is this document that you mention in comment 3?
Comment 7 Dave Steinberg CLA 2005-07-25 15:30:08 EDT
The document is at
http://eclipse.org/emf/docs.php?doc=docs/whatsnew/tools2.1.html#binary
Comment 8 Nick Boldt CLA 2008-01-28 16:46:46 EST
Move to verified as per bug 206558.