简体   繁体   English

使用Eclipse在Java文件中找到刚刚编写的代码(即突出显示代码的新部分)

[英]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.

相关问题 类加载代码,即使用Eclipse不能在LISA中使用 - Class Loading Code i.e. working with Eclipse not Working in LISA 如何使用eclipse中编写的Java代码在远程桌面中导航(例如,打开Mozilla)? - How can i navigate (e.g. open Mozilla) in a Remote Desktop by using java code written in eclipse? 在eclipse环境下用java编写的代码 - code written in java on eclipse environment 如何在没有多重继承的情况下避免代码重复(即在 Java 中)? - How do I avoid code duplication without multiple inheritance (i.e. in java)? 通过eclipse打开Java文件没有错误,但是如果我只是复制源代码,则会产生错误 - No-error on opening a java file through eclipse, but produces errors if I just copy the source code 用Java编写的标签(即扩展BodyTagSupport或TagSupport)是否比.tag文件表现更好? - Do tags written in Java (i.e., extending BodyTagSupport or TagSupport) perform better than .tag files? 在Eclipse Mars中格式化Java代码的特定部分 - Format specific part of Java code in Eclipse Mars 我应该如何处理在 Eclipse IDE 中折射写得不好的 Reverse Polish Notation java 代码 - How should i approach refracting the badly written Reverse Polish Notation java code in Eclipse IDE 在Eclipse中,如何找到引发某些Exception的Java代码? - In Eclipse, how can I find Java code that throws a certain Exception? 在cmd提示符下编译并运行在Eclipse上编写的Java代码 - compile and run java code written on Eclipse on cmd prompt
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM