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

Bug 135571

Summary: No error reported for invalid generated_package extension
Product: [Modeling] EMF Reporter: Ed Willink <ed>
Component: ToolsAssignee: Dave Steinberg <davidms>
Status: VERIFIED FIXED QA Contact:
Severity: trivial    
Priority: P3 CC: Ed.Merks
Version: 1.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 135577    
Bug Blocks:    

Description Ed Willink CLA 2006-04-07 11:23:22 EDT
EMF 2.2.0M6, EMFT 1.0.0M6

Create a new Ecore model containing a package.
Load Resource..., Browse Registered Packages...
OCL is shown as a model. Select it. It does not appear in the
box to show successful selection.
Whereas Ecore is.

Subsequently Browse Registered Packages... shows a much shorter list of
packages.
Comment 1 Ed Willink CLA 2006-04-07 11:44:30 EDT
See 135577. OCL has inconsistent URIs.
Comment 2 Christian Damus CLA 2006-04-07 13:50:42 EDT
This use case works, now that Bug 135577 is fixed.
Comment 3 Ed Willink CLA 2006-04-08 02:15:58 EDT
Sorry that wasn't a fix, it was an explanation.

It remains the case that there was no error associated with the
magical disapperarance of the semi-registrations. There should be an
error following selection of an offered entry which propagates to
a blank conclusion.

Now that PDE is so good at semantic validation of plugin.xml, this also
demonstrates a bug in the registered package extension point. There should
be a validation warning to the effect that the package uri is inconsistent
with the genmodel content.
Comment 4 Christian Damus CLA 2006-04-10 10:38:13 EDT
The original issue wasn't framed in such terms.  I have rewritten the heading and forwarded to EMF to address the lack of error reporting.
Comment 5 Ed Merks CLA 2006-04-11 07:42:59 EDT
I'll record this for future reference but I don't think diagnosing this problem is so easily solveable.  Moreoever, it's not actually invalid to register a namespace for a package with a different namespace; one might use that as a redirect...

*** This bug has been marked as a duplicate of 104727 ***
Comment 6 Dave Steinberg CLA 2006-05-17 14:13:16 EDT
We should log a message for duplicate keys in all extension points that populate a registry
Comment 7 Ed Merks CLA 2006-05-17 15:25:15 EDT
The fixes to log errors for duplicate registrations is committed to CVS.
Comment 8 Nick Boldt CLA 2006-05-19 11:36:28 EDT
Fixed in 2.2.0.I200605181255.
Comment 9 Ed Willink CLA 2006-05-25 14:56:58 EDT
Good catch: Under RC5a I am now getting pairs of

Both 'org.eclipse.gmt.umlx.atl' and 'org.eclipse.gmt.umlx.atl register a package for 'http://www.eclipse.org/gmt/2005/PrimitiveTypes'

I did have a triple stupidity.

But there is a missing ' following the second plug-in name.
Comment 10 Ed Merks CLA 2006-05-25 15:14:54 EDT
Ed,

Thanks for noticing that.  Snarf and barf meant this error was in every message I did.  I've fixed it now.
Comment 11 Marcelo Paternostro CLA 2006-05-30 10:57:00 EDT
Fixed in 2.2.0RC6
Comment 12 Rafael Chaves CLA 2007-02-24 17:30:23 EST
I still see this behavior with EMF 2.3m4. OCL seems to have again a mismatch between URIs showing on plugin.xml and the ECore file (see bug 175426). If I choose a URI corresponding to one of the OCL 1.1.0 packages, the registered package selection dialog closes with no warning and but no Resource URI appears on the Load Resource dialog.

Should I open a new PR, or reopen this one?

Comment 13 Rafael Chaves CLA 2007-02-24 17:31:43 EST
Never mind, just understood that this bug is about warning against duplicate URIs.
Comment 14 Nick Boldt CLA 2008-01-28 16:39:34 EST
Move to verified as per bug 206558.