Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/grails/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Layout NetBeans 7.3自定义/编辑工具栏位置_Layout_User Interface_Action_Netbeans 7 - Fatal编程技术网

Layout NetBeans 7.3自定义/编辑工具栏位置

Layout NetBeans 7.3自定义/编辑工具栏位置,layout,user-interface,action,netbeans-7,Layout,User Interface,Action,Netbeans 7,我已经为客户端创建了新的TopComonent,然后从主菜单下拉列表中向主工具栏和视图文件夹添加了新的图标单击操作。但我的问题是,我设置动作的每个位置总是把它放在工具栏的开头,但我需要它放在最后 @ActionID( category = "Build", id = "some.action") @ActionRegistration( iconBase = "path.to.icom.image", displayName = "

我已经为客户端创建了新的TopComonent,然后从主菜单下拉列表中向主工具栏和视图文件夹添加了新的图标单击操作。但我的问题是,我设置动作的每个位置总是把它放在工具栏的开头,但我需要它放在最后

@ActionID(
        category = "Build",
        id = "some.action")
@ActionRegistration(
        iconBase = "path.to.icom.image",
        displayName = "someName")
@ActionReferences({
    @ActionReference(path = "Menu/View", position = 400),
    @ActionReference(path = "Toolbars/Refresh", position = 700)
})
@Messages("CTL_SomeAction=Refresh")

那么我可以在netBeans中编辑main layer.xml吗

您需要做的是在模块中创建一个xml文件(例如layer.xml)。然后,您将从生成的-layer.xml文件中复制并粘贴所需内容,该文件可在左侧窗口的“文件”选项卡下找到,路径如下:[您的模块名]/build/classes/META-INF/generated-layer.xml。 通常,根据您现在的问题,您可能需要layer.xml文件的以下信息(如果您指定了该名称):

在保存清单文件并运行模块后,应该是正常的

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN"
                            "http://www.netbeans.org/dtds/filesystem-1_2.dtd">

<filesystem>
    <folder name="Toolbars">
        <folder name="Refresh">
            <attr intvalue="1000" name="position"/>
        </folder>
    </folder>
</filesystem>
OpenIDE-Module-Layer: org/yourorg/modulename/layer.xml