Community
Participate
Working Groups
The XML catalog allows a user to enter multiple entries with the same key. For example, I can create two entries for the namespace http://somenamespace. The catalog only uses the first entry. Allowing the addition of the second only seems to add confusion as to which entry will be used doesn't seem to serve a useful purpose.
Craig, will you please triage and/or re-assign these bugs that were assigned to Ella?
Gabriel, I think we need to add UI feedback in the catalog to guard against this situation.
Created attachment 67275 [details] Patch Resolves issue whereby duplicate entries were possible in XML catalog. Dialog now compares entry against existing catalog by ensuring that, if key or key type have changed (or is new), the provided key does not already resolve to another record. To ensure optimal performance, comparison only occurs when user clicks "OK", and warning is shown if entry is a duplicate.
Created attachment 77468 [details] Patch Revised patch.
Gabriel, please review Joshua's patch and then work with Keith to commit and release.
I think we want to make sure that catalog contributions through extensions are treated the same way: we need some sort of warning - perhaps in the log - when we read the catalog contributions from the extensions registry and we encounter a duplicate contribution.
Targetting to 3.0 m6 to commit joshua's patch. Valentin, could you please open a new bug for the issue in comment #6? Thanks.
(In reply to comment #7) > Valentin, could you please open a new bug for the issue in comment #6? Thanks. Done, see bug 221399.
Amy, reassigning to you to commit and release for M6.
Patch has been revised. It as not become stale and its functionality works properly.
Created attachment 94443 [details] Patch Updated header dates
Thank you Gabriel, I've made a few very minor mods (variable names, etc), committed and released the patch for WTP 3.0 builds > v200804011757.
I am thinking the dialog used to add/edit entries could be improved in the future to show the error message in a message area at the top. Perhaps we could use TitleAreaDialog or something similar. Also, the workspace resource selection dialog seems to show all projects, even the closed ones...I would think we could/should filter those out. Time is short now, so unless trivial, these enhancements should wait until the next release. Gabriel, please consider my comments and if appropriate open the required RFEs.
Valentin, With regards of comment 13 I think these are all good suggestions. I would recommend however, rather than treating small UI items of individual components in isolation, revising the look&feel of the complete set of XML tools together in order to come up with a better, more consistant design that blends into the platform style.
Verified with S-3.0M6-20080404114343
mass change to add 'contributed' keyword based on bugzilla query, please correct if that's not accurate (by marking patches as obsolete and removing the 'contributed' keyword.
Closing.
Although a little late, I've verified this fix on WTP 3.0RC4. I was about to open a bug for the way in which the error is reported as it's not consistent with the behaviour of the Eclipse platform (I think the error should be reported as soon as the duplicate key is entered, not after I click OK) but I saw that Valentin has already made this suggestion in comment 13. Was a bug opened to track this issue?
The duplicate error message is displayed when the a given entry can be match in any catalog, it should be displayed when a conflict within a catalog entry is found.
Created attachment 137042 [details] Patch This patch ensures that conflicts are verified within a given catalog entries and not across all catalogs.
As requested by Valentin, the fix for the duplicate entry error message will be handled in a separate bug.
The issue of the duplicate entry error message will be handled in Bug 277738.