Netbeans的历史显示了100个变化,但我只做了几个。我该如何避免这种情况? [英] Netbeans history shows 100 changes but I made only a few. How do I avoid this?

查看:199
本文介绍了Netbeans的历史显示了100个变化,但我只做了几个。我该如何避免这种情况?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Netbeans中,当我做了十几次修改而不是修复时,我通常会通过查看历史,找到罪魁祸首,修复它并继续我的快乐方式立即找到罪魁祸首。花费很少的时间。

In Netbeans when I make a dozen changes that break more than they fix, usually I find the culprit right away by looking at the history, find the culprit, fix it, and go on my merry way. Takes very little time.

但我经常发现Netbeans显示了近100个变化。几乎所有这些都涉及下面两对历史记录的更改(每对中首先列出的旧行):

But often I find that Netbeans shows nearly 100 changes. Almost all of them involve changes like the two pairs of history lines below (older line listed first in each pair):

// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
// <editor-fold defaultstate="collapsed" desc="Generated Code">                          


// </editor-fold>//GEN-END:initComponents
// </editor-fold>            

绝大多数变化似乎只发生在Swing设计生成的语句中。

The vast majority of the changes seem to only occur on statements generated by Swing design.

为什么 // GEN-BEGIN:initComponents // GEN-END:initComponents 添加到我没有改变的行?

Why do //GEN-BEGIN:initComponents and //GEN-END:initComponents get added onto lines I didn't change?

我做了什么导致这个?

What did I do to cause this?

我该如何避免这种情况? (除了退出使用Swing设计,我已经在其他项目中使用了,但这是一个较旧的项目,我有点困惑。)

How can I avoid this? (Other than quit using Swing design, which I already have in other projects, but this is an older project that I'm sort of stuck with.)

我能做什么?做修复它所以我可以看到我改变的行?

What can I do to fix it so I can just see the lines I changed?

我去了这里但它没有告诉如何你也可以删除// GEN-FIRST和// GEN-最后使它们可以在Netbeans中编辑。

I went here but it doesn't tell how "You can also remove the //GEN-FIRST and //GEN-LAST to make them editable in Netbeans."

推荐答案

根据GUI编辑器属性重新生成折叠代码,每个 你建立的时间;你描述的效果并不出乎意料。改变一个特定的属性,例如使用自定义代码... 对话框,查看生成的代码如何更改。虽然源代码编辑器可以折叠生成的代码,但历史记录视图不能。

The folded code is regenerated, based on GUI editor properties, each time you build; the effect you describe is not unexpected. Alter a specific property, e.g. by using the Customize Code… dialog, and see how the generated code changes. While the source code editor can collapse generated code, the history views cannot.

一些缓解策略:


  • 将GUI编辑器的使用限制在真正需要它的相对较少数量的封闭容器中,如所示。这里

使用历史记录视图导航控件在可用更改之间移动。

Use the History View navigation controls to move among available changes.

识别差异查看器的消息列中的重要修订窗格。

Identify critical revisions in the Message column of the Diff Viewer pane.

检查选项>团队>历史记录与您的工作流程相匹配的设置。

Check Options > Team > History settings to match your workflow.

搜索历史记录视图 in帮助对话框以获得其他指导。

Search for History View in the help dialog for additional guidance.

这篇关于Netbeans的历史显示了100个变化,但我只做了几个。我该如何避免这种情况?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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