英文:
How to override behaviour of ResetWindowsAction in netbeans open IDE?
问题
我尝试在NetBeans平台中使用NetBeans开放式IDE自定义菜单项下的重置窗口点击操作。NetBeans的当前实现会清除属性模式和输出模式的所有顶部组件,但编辑器模式和资源管理器模式除外。
我的要求是,在单击“重置窗口”后,使用“Actions/Window/org-netbeans-core-windows-actions-ResetWindowsAction.instance”,保持输出模式和资源管理器模式保持最小化状态。
英文:
I was trying to customize the reset window click action under menu items in netbeans platform using netbeans open IDE. Current implementation of netbeans clears up all the top components of property mode and output mode except for editor mode and explorer mode.
My requirement is to keep the output mode and explore mode minimized even after clicking 'reset windows' using "Actions/Window/org-netbeans-core-windows-actions-ResetWindowsAction.instance".
答案1
得分: 1
你需要编写一个 Netbeans 插件,其中将会:
- 移除 Window 菜单中当前的 ResetWindowsAction 引用
- 实现自己的动作(可以拥有相同的 "Reset Windows" 显示名称),并在 Window 菜单中添加对它的引用
这比你想象的要简单得多:创建一个 Netbeans 模块和一个动作。Netbeans 动作向导会处理所有的连接工作。这个“官方的” Netbeans 插件创建教程 会告诉你如何进行插件的创建和任务 2。
至于任务 1,在 Netbeans 中,打开你的模块 > 重要文件 > XML 层 > 上下文中的此层 > 菜单栏 > Window,选择 "org-netbeans-core-windows-actions-ResetWindowsAction" 条目然后删除它。
供参考,当前 ResetWindowsAction 的代码在这里。
英文:
You need to write a Netbeans plugin which will:
- Remove the current ResetWindowsAction reference in the Window menu
- Implement your own action (which can have the same "Reset Windows" display name) and add a reference to it in the Window menu
It's much easier than you may think: create a Netbeans module and an Action. Netbeans Action wizard will do all the plumbing stuff. This "official" netbeans plugin creation tutorial explains you how to do the plugin creation and task 2.
For task 1, in Netbeans, open your module > Important Files > XML Layer > this layer in context > Menu Bar > Window, select the "org-netbeans-core-windows-actions-ResetWindowsAction" entry and Delete.
For information the code of the current ResetWindowsAction is here.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论