在日食中分两种方法 [英] Diff two methods in eclipse

查看:277
本文介绍了在日食中分两种方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个生成java代码的eclipse。所以如果一个方法在那里并重新生成,我想显示旧的方法和新生成的方法,以便用户可以看到差异。这是可能的吗?

解决方案

我使用的是Eclipse开普勒,所以根据你的版本,里程可能会有所不同。

要将以前生成的版本的方法进行比较,请执行以下操作:


  1. 打开课程

  2. 显示大纲视图(窗口 - >显示视图 - >大纲)

  3. 按住CTRL并单击要比较的方法。 / li>
  4. 右键单击突出显示的方法。

  5. 点击与本地历史比较 - >元素

  6. 双击您想要比较的修订版本。

您将得到一个类似于比较两个文件的差异窗口。


I have an eclipse which generates java code. So if a method is there and is regenerated I want to show the old method and the newly generated one so the user can see the difference. Is this possible?

解决方案

I'm using Eclipse Kepler, so depending on your version your mileage may vary.

To compare a method with a previously generated version, do the following:

  1. Open the class.
  2. Show the Outline view (Window->Show View->Outline)
  3. Hold CTRL and click on the method you wish to compare.
  4. Right click on the highlighted method.
  5. Click on "Compare With->Element From Local History"
  6. Double click with the revision you wish to compare with.

You'll get a diff window similar to if you were comparing two files.

这篇关于在日食中分两种方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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