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 252868

Summary: Actions do not display their name in the layer-file.
Product: apisupport Reporter: kmilito
Component: ProjectAssignee: Martin Kozeny <mkozeny>
Status: NEW ---    
Severity: normal CC: err, markiewb
Priority: P3    
Version: 8.0.2   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: layer-file pic

Description kmilito 2015-06-08 11:19:28 UTC
Created attachment 154100 [details]
layer-file pic

When adding actions in an application the names of the actions are ok, however, when actions are expanded in the layer.xml file, instead of seeing the name of the action it only reads "AlwaysEnabledAction[null]"

I guess that when you right click on the action and set "Localize Name..", the action name should have been changed, however, nothing changes.

But if "Localize Name.." is set in the build files instead of the source files the name is successfully updated, the problem is the of course, build files are created every time the app is compiled.

It would be a nice feature to be able to annotate the name that the action should have in the layer-file, however I think this is not yet implemented.

In the attached picture the issue can be seen.
Comment 1 err 2015-06-08 23:09:16 UTC
Actions that come with the IDE show displayName. The actions created in a module with the wizard do not, they don't even show the layer file name.

This makes maintenance difficult, all you see is a list of always enabled actions. (consider the usage of "Go to declaration")

What is the technique to get the action name displayed in <layer in context> and why doesn't the wizard use it?
Comment 2 Ondrej Vrabec 2015-09-11 15:51:03 UTC
Problem is in org.netbeans.modules.apisupport.project.layers.BadgingSupport.annotateNameGeneral. It used to work when action display names where inside the Bundle.properties inside the sources, now with @Messages annotation they are generated into build/classes and BadgingSupport is unable to handle it at the moment.

If you move the display name into Bundle.properties, it will work.