Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 163597 - Provide direct control over edit/editor/tests plugin ID
Summary: Provide direct control over edit/editor/tests plugin ID
Status: VERIFIED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Edit (show other bugs)
Version: 2.4.0   Edit
Hardware: PC Linux-GTK
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Dave Steinberg CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 194769 (view as bug list)
Depends on:
Blocks: 204200
  Show dependency tree
 
Reported: 2006-11-06 16:20 EST by Volker Wegert CLA
Modified: 2008-01-28 16:39 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Wegert CLA 2006-11-06 16:20:52 EST
I've got a (minor) problem with the generated MANIFEST.MF file. The EMF genmodelis used to generate three bundles: tld.xyz.core, tld.xyz.edit and tld.xyz.editor. The  MANIFEST.MF file generated by GMF contains

Require-Bundle: org.eclipse.core.runtime,
[...]
 tld.xyz.core;visibility:=reexport,
 tld.xyz.core.edit;visibility:=reexport,
 org.eclipse.gmf.runtime.draw2d.ui;visibility:=reexport,
 org.eclipse.draw2d;visibility:=reexport

instead of

Require-Bundle: org.eclipse.core.runtime,
[...]
 tld.xyz.core;visibility:=reexport,
 tld.xyz.edit;visibility:=reexport,
 org.eclipse.gmf.runtime.draw2d.ui;visibility:=reexport,
 org.eclipse.draw2d;visibility:=reexport

- for the edit bundle, there's a ".core" inserted that shouldn't be there.
Comment 1 Artem Tikhomirov CLA 2006-11-07 08:27:02 EST
I believe there's wrong value for edit plugin id in your .genmodel
Template for manifest.mf relies on values in .genmodel (genModel.getModelPluginID() and genModel.getEditPluginID()), no manual construction of plugin id takes place.
Comment 2 Volker Wegert CLA 2006-11-07 14:18:12 EST
Although I can set the Model Plug-In ID in the .genmodel (it's set to tld.xyz.core), there's no property to set either the Edit Plug-In ID or the Editor Plug-In ID. It's only possible to set the target directories and the Plug-in Classes (both are correct - /tld.xyz.edit/src and tld.xyz.edit.Activator). Just to be sure, I've searched the .genmodel in the text editor - there's no String ".core.edit" in it. 

--> I'd say 
Comment 3 Volker Wegert CLA 2006-11-07 14:18:50 EST
Although I can set the Model Plug-In ID in the .genmodel (it's set to tld.xyz.core), there's no property to set either the Edit Plug-In ID or the Editor Plug-In ID. It's only possible to set the target directories and the Plug-in Classes (both are correct - /tld.xyz.edit/src and tld.xyz.edit.Activator). Just to be sure, I've searched the .genmodel in the text editor - there's no String ".core.edit" in it. 
Comment 4 Volker Wegert CLA 2006-11-07 14:25:57 EST
Sorry. Browser went crazy in mid-air. 

--> I'd say getEditPluginID() is just not written for this kind of arrangement:

--snip--
  public String getEditPluginID()
  {
    if (sameModelEditProject())
    {
      return getModelPluginID();
    }
    else
    {
      return getModelPluginID() + ".edit";
    }
  }
--snip--

Will there be a way to adjust the plugin IDs of Edit and Editor Plugins separately in the future?


Comment 5 Artem Tikhomirov CLA 2006-11-07 14:30:46 EST
Apparently, edit plug-in id is hardcoded in GenModelImpl (@see #getEditPluginID), while #generateEdit() ignores this setting and uses editDirectory instead.
Comment 6 Ed Merks CLA 2006-11-07 14:52:52 EST
Unless I misunderstand, this is all working as designed and there is simply a desire to be able to control the .edit plugin's ID directly via a property rather than having it be based purely on the model plugin's ID.  So I'll mark this as an enhancement request.
Comment 7 Didier Villevalois CLA 2007-04-17 06:25:49 EDT
Ed: I wished that feature for a long time. In fact, there are lots of time where products are cut into many parts by separating UI from models. For instance, i've got some models that are used internally in the runtime of my product, but can be edited in its SDK.

Having the possibility to get :
model plugin ID: org.smth.product.runtime.mymodel1
edit plugin ID: org.smth.product.ui.mymodel1.edit
editor plugin ID: org.smth.product.ui.mymodel1.editor

BTW, i think GMF has a unique "Package Name Prefix" that is used to derive the plugin ID, the package prefix and IMHO i find this more consistent with Eclipse way where most plugins have their ID equal to the root package of the java code it contains.
Comment 8 Ed Merks CLA 2007-06-28 13:05:12 EDT
*** Bug 194769 has been marked as a duplicate of this bug. ***
Comment 9 Eike Stepper CLA 2007-12-20 09:45:38 EST
I'd like to add own plugin dependencies to my generated edit plugin.
Is there a mechanism similar to the Model Plug-in Variables property?

Ed in the newsgroup:
No, but that would kind of make sense for both edit and editor.   It's indirectly related to https://bugs.eclipse.org/bugs/show_bug.cgi?id=163597  so I suppose you could open a different feature request or add it to that existing one (since we need to add additional state features for the GenModel anyway to support the above so adding a bunch at once is a bit easier). 
Comment 10 Ed Merks CLA 2007-12-24 14:34:17 EST
Support for plugin IDs for edit, editor, and tests projects as well as plugin variables for each has been committed to CVS for 2.4.
Comment 11 Nick Boldt CLA 2008-01-09 10:29:33 EST
Fixed in I200801090807.
Comment 12 Nick Boldt CLA 2008-01-28 16:39:49 EST
Move to verified as per bug 206558.