如何在 Netbeans 中重新排序自动生成的方法? [英] How to reorder automatically generated methods in Netbeans?

查看:19
本文介绍了如何在 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.

如果您真的想移动这些块,请使用其他编辑器(Gedit、记事本...)打开 Java 文件并在此处重新排序块.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆