如何在Netbeans中重新排序自动生成的方法? [英] How to reorder automatically generated methods in Netbeans?
问题描述
当使用Netbeans的功能从GUI生成事件处理程序时,例如,当生成的方法的主体是可编辑的时,我找不到一种方法来改变类的代码中生成的方法的顺序。
When using Netbeans' features for generating event handlers from a GUI, for example, while the body of the generated methods are editable, I cannot find a way to change the order of the generated methods within the code of a class.
生成的代码不允许剪切和粘贴剪切。
Cutting for cutting and pasting is not allowed with generated code.
我怎么可能这样做?
非常感谢!
推荐答案
你不能在Netbeans中做到这一点。这不是一个优先事项,因为你可以使用导航器。
You can't do that in Netbeans. It's not really a priority because you can use the Navigator instead.
如果你真的想移动这些块,请用另一个编辑器打开Java文件(Gedit,Notepad。 ..)并在这里重新排序块。
If you really want to move those blocks, open the Java file with an other editor (Gedit, Notepad...) and re-order the blocks here.
您还可以删除 // GEN-FIRST
和 // GEN-LAST
使它们可以在Netbeans中编辑。
You can also remove the //GEN-FIRST
and //GEN-LAST
to make them editable in Netbeans.
这篇关于如何在Netbeans中重新排序自动生成的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!