This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 200389 - ExtractLayer flattens bundlevalue entries from separate packages
Summary: ExtractLayer flattens bundlevalue entries from separate packages
Status: RESOLVED WONTFIX
Alias: None
Product: ide
Classification: Unclassified
Component: Features On Demand (show other bugs)
Version: 7.1
Hardware: PC Linux
: P4 normal (vote)
Assignee: Jaroslav Tulach
URL: http://deadlock.netbeans.org/hudson/j...
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-26 13:33 UTC by Jesse Glick
Modified: 2012-05-25 16:26 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2011-07-26 13:33:34 UTC
Localized name for MultiFileObject@da9d23[Templates/NetBeansModuleDevelopment/org-netbeans-modules-apisupport-project-ui-wizard-action-NewActionIterator] does not match Action != Wizard

In source:

package org.netbeans.modules.apisupport.project.ui.wizard.action;
@TemplateRegistration(displayName="#template", ...)
@Messages("template=Action")
...
package org.netbeans.modules.apisupport.project.ui.wizard.wizard;
@TemplateRegistration(displayName="#template", ...)
@Messages("template=Wizard")

In ide.ergonomics/build/classes/org/netbeans/modules/ide/ergonomics/apisupport/layer.xml:

<file name="org-netbeans-modules-apisupport-project-ui-wizard-action-NewActionIterator">
  <attr name="displayName" bundlevalue="org.netbeans.modules.ide.ergonomics.apisupport.Bundle#template"/>
</>
<file name="org-netbeans-modules-apisupport-project-ui-wizard-wizard-NewWizardIterator">
  <attr name="displayName" bundlevalue="org.netbeans.modules.ide.ergonomics.apisupport.Bundle#template"/>
</>

and sibling Bundle.properties:

template=Action
template=Wizard
...

ExtractLayer is blindly appending bundle keys from separate packages without even checking whether they overlap. Looks like this logic needs to be rewritten, and probably directly parsing Bundle.properties files rather than using the current hacky Ant patternsets and Concat.

I think this is just a test failure with no visible effect, since the New File templates are in a category which is never even displayed until you have turned on apisupport anyway. But until I work around the problem it is blocking propagation from core-main.
Comment 1 Jesse Glick 2011-07-26 13:47:12 UTC
core-main #96269d22c5ea has a diagnostic improvement and workaround.
Comment 2 Jaroslav Tulach 2011-07-27 11:45:56 UTC
Fix is complex. Test correctly catches problems. Workaround is easy: just rename your bundle keys.
Comment 3 Quality Engineering 2011-07-27 14:10:38 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/96269d22c5ea
User: Jesse Glick <jglick@netbeans.org>
Log: Workaround for, and detection of, #200389 (ergonomics.ant.ExtractLayer bug).
Comment 4 Jesse Glick 2011-07-27 16:49:03 UTC
Sorry, I meant to downgrade to P3 after committing the workaround and sanity check.
Comment 5 Jaroslav Tulach 2012-02-02 18:35:29 UTC
Happened once, not problem since then. Will close "won'tfix" next time.
Comment 6 Jaroslav Tulach 2012-05-25 13:33:00 UTC
Since ergonomics#ac985d00dd18 the build will fail in case there are duplicated keys with different values. That is all I want to do on the infrastructure side. It is up to developers to choose the keys wisely now. Closing.
Comment 7 Jesse Glick 2012-05-25 16:26:40 UTC
Why is j2ee/earproject/ui/wizards/Bundle.properties defining a key for emptyEjbJar.xml to begin with? Probably this can simply be deleted.