Layer.xml without names



I have a little question about the layer.xml file of my Netbeans Platform application. This is how is shown:


enter image description here


Any object is named "AlwaysEnabledAction[null]" and it makes some confusion. On web i have seen some examples when the Actions use the correctly name, so... why my layer's preview isn't like the others?


This is an example of how I define an Action



`@ActionID(
category = "Project",
id = "it.bpe.bpebricks.ui.EncloseNewAction")
@ActionRegistration(
lazy = true,
iconBase = "images/menu/source/enclose.png",
displayName = "#CTL_EncloseNewAction")
@ActionReferences({
@ActionReference(
path = "Menu/Source",
position = 1),
@ActionReference(
path = "Toolbars/Source",
position = 1),
@ActionReference(
path = "Shortcuts",
name = "D-E")
})
@Messages("CTL_EncloseNewAction=Enclose")`


Thanks


1 comment:

  1. The problem in my Netbeans 8.2 version of the program is that the layer.xml cannot parse the line:
    displayName = "#CTL_EncloseNewAction"
    correctly. It doesn't know how to do the lookup to the Messages. Instead just change to:
    displayName = "Enclose". Changing annotation does not immediately update in the XML layer file. You will need to clean and build the project in order for the xml file to be updated.

    ReplyDelete