[英]Find the just written code in a java file with Eclipse (i.e. highlight the new part of code)
Context 上下文
I am modifying a big project in Java. 我正在用Java修改一个大项目。 In a file, I make some modification to the code (maybe inadvertently). 在文件中,我对代码进行了一些修改(可能是无意间)。 The file is marked with a little *
close to the name (that means it is still not saved). 该文件在名称旁边带有一个*
标记(这表示该文件仍未保存)。
Question 题
How to find where the new characters were just written? 如何找到新字符的书写位置?
I know I can use ctrl+z to undo the changes and, thus, find the place where the changes were made. 我知道我可以使用ctrl + z撤消更改,从而找到进行更改的位置。 What I am looking for is a way of highlighting the new part in the existing code. 我正在寻找的是一种突出现有代码中新部分的方法。
Eclipse already shows this information by default. Eclipse默认已经显示了此信息。 Every unsaved change is marked on the left line number ruler. 每个未保存的更改都标记在左行号标尺上。
Deleted lines are marked with an horizontal line "-". 删除的行用水平线“-”标记。
Added/changed lines are marked with a different color of the line number. 添加/更改的行用不同的行号标记。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.