eclipse 显示注释不起作用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19726389/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Show annotations not working
提问by Vignesh
I use Eclipse with egit plugin. When I click Team -> Show Annotations, it shows up nothing. But I could view annotations by going to the history and then right clicking on the desired change set.
我使用带有 egit 插件的 Eclipse。当我单击 Team -> Show Annotations 时,它什么也没显示。但是我可以通过转到历史记录然后右键单击所需的更改集来查看注释。
Shouldn't the first way show annotations from the latest version of that file I am working on?
第一种方式不应该显示我正在处理的该文件的最新版本的注释吗?
回答by Derek
I found eclipse bug 394161that says the show annotations functionality won't work unless you set your EGit preferences to ignore whitespace changes. You can do that by going to Window -> Preferences -> Team -> Git and checking the box that says "Ignore whitespace changes". That fixed the problem for me.
我发现了Eclipse 错误 394161,它表示除非您将 EGit 首选项设置为忽略空格更改,否则显示注释功能将不起作用。您可以通过转到窗口 -> 首选项 -> 团队 -> Git 并选中“忽略空格更改”框来实现。那为我解决了问题。
回答by iled
I was having the same problem and this worked for me (in two different computers):
我遇到了同样的问题,这对我有用(在两台不同的计算机上):
Make sure annotations are well set up, for example, if you want to see errors on the vertical ruler, you must have that option activated. Preferences > General > Editors > Text Editors > Annotations > Errors > Show in > Vertical ruler
Make sure your project is marked as a PyDev project. Right-click on your project > PyDev > Set as PyDev Project(if you see Remove PyDev Project configit is already marked as one)
Lastly, make sure your source folder is correctly identified. Right-click on your source folder > PyDev > Set as source folder (add to PYTHONPATH)
确保注释设置良好,例如,如果您想查看垂直标尺上的错误,则必须激活该选项。首选项 > 常规 > 编辑器 > 文本编辑器 > 注释 > 错误 > 显示范围 > 垂直标尺
确保您的项目被标记为 PyDev 项目。右键单击您的项目 > PyDev > 设置为 PyDev 项目(如果您看到删除 PyDev 项目配置,它已被标记为一个)
最后,确保您的源文件夹被正确识别。右键单击您的源文件夹 > PyDev > 设置为源文件夹(添加到 PYTHONPATH)
In the last step, if you see Set as non-source folder (remove from PYTHONPATH)it is already marked as one and, in that case, this solution shouldn't work for you, but you can try to undo and redo steps 2 and 3.
在最后一步中,如果您看到Set as non-source folder (remove from PYTHONPATH)它已被标记为 one,在这种情况下,此解决方案不适合您,但您可以尝试撤消并重做步骤 2和 3。
I'm using Eclipse Kepler, PyDev 3.2 and EGit 3.2.
我正在使用 Eclipse Kepler、PyDev 3.2 和 EGit 3.2。
回答by The Gilbert Arenas Dagger
I banged my head on this for a bit today. Right-clicking a file in Project Explorer or Package Explorer, then selecting "Team" > "Show Annotations" does not work (at least in version 4.5.1). So don't do that. I found the easiest way to show annotations is just click on the vertical ruler then select "Show Annotations" from there.
我今天对此感到有点头疼。在项目资源管理器或包资源管理器中右键单击文件,然后选择“团队”>“显示注释”不起作用(至少在 4.5.1 版中)。所以不要那样做。我发现显示注释的最简单方法是单击垂直标尺,然后从那里选择“显示注释”。
By the way, the ignore whitespace bug that @Derek mentions has been fixed. From the bug ticket,
顺便说一句,@Derek 提到的忽略空白错误已得到修复。从错误票,
After updating to the 3.4.0.201405071430 showing the annotations worked also without setting the property "Ignore whitespace changes" So the bug seems to be fixed.
更新到 3.4.0.201405071430 后,显示注释也有效,而无需设置“忽略空格更改”属性,因此该错误似乎已修复。
I verified that I am not impacted by the bug in 4.5.1
我确认我没有受到 4.5.1 中的错误的影响