Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 194769

Summary: GenModel operations getEditPluginID()/getEditorPluginID() should be converted to attributes with default values.
Product: [Modeling] EMF Reporter: Alex Shatalin <shatalin>
Component: CoreAssignee: Marcelo Paternostro <marcelop>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: Ed.Merks
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Alex Shatalin CLA 2007-06-28 10:08:30 EDT
Currently GenModel contains two operations: getEditPluginID()/getEditorPluginID() calculating corresponding pluginIDs based on other GenModel properties. Return values of these operations can be desynchronized with actual pluginIDs if editDirectory/editorDirectory was modified by user to redirect output of the code generator to some other (exisiting) plugins. This inconsistency leads us to the future errors while generating the code for another model referencing this one. Code generator uses GenModel.getEditPluginID() to reflect corresponding dependency in generated manifest.mf (via GenModel.getEditRequiredPlugins()) as a result generated manifest.mf will reference incorrect plugin with ID returned by GenModel.getEditPluginID(). Same with GenModel.getEditorRequiredPlugins()

I suggest to convert getEditPluginID()/getEditorPluginID() operations to a properties with precalculated default values. As a result user will be able to modify these properties to get rid of mentioned compilation problem.

Example: any model referencing GenModel.ecore will face this problem. Actual output of the .edit/.editor plugins for GenModel.ecore was redirected into org.eclipse.emf.codegen.ecore.ui, values returned from getEditPluginID()/getEditorPluginID() in this situation are incorrect.
Comment 1 Ed Merks CLA 2007-06-28 13:05:12 EDT
I'm pretty sure this is a duplicate of https://bugs.eclipse.org/bugs/show_bug.cgi?id=163597, right?

It would even be possible to make them unsettable properties and compute the default as we do now so that if you change the model plugin ID but but haven't explicitly changed the others, they will continue to match.

*** This bug has been marked as a duplicate of bug 163597 ***