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 - Actions do not display their name in the layer-file.
Summary: Actions do not display their name in the layer-file.
Status: NEW
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal with 3 votes (vote)
Assignee: Martin Kozeny
Depends on:
Reported: 2015-06-08 11:19 UTC by kmilito
Modified: 2015-09-11 15:51 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

layer-file pic (13.60 KB, image/png)
2015-06-08 11:19 UTC, kmilito

Note You need to log in before you can comment on or make changes to this bug.
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 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, it will work.