简体   繁体   English

如何在 eclipse 中启用快速修复

[英]How to enable quick fix in eclipse

How to enable quick fix while hover over error in eclipse?当 hover 在 eclipse 中出现错误时,如何启用快速修复? Currently it looks like this, so I can't import by using this popup目前它看起来像这样,所以我无法使用此弹出窗口导入在此处输入图像描述

So, I want it to be like this:所以,我希望它是这样的:

在此处输入图像描述

I already restarted few times my eclipse, also I followed instructions how to check: Windows > Preferences > Java > Editor > Content Assist > Advanced But nothing helped... So, the point is how to enable quick fix just by hovering over the error, I don-t want't to use Ctrl+1 or Edit > Quick Fix every time.我已经重新启动了几次我的 eclipse,我也按照说明进行了检查:Windows > 首选项 > Java > 编辑器 > 内容辅助 > 高级修复只是没有帮助,我不想每次都使用 Ctrl+1 或 Edit > Quick Fix。

I am a beginner so I don't know whether it might help or not我是初学者,不知道有没有用

I had the similar problem I wanted to see the quick fix available when the cursor is on the error(red line) (underlined blue words so that I can click and quickly fix or change what is necessary)我遇到了类似的问题,我想在 cursor 出现错误(红线)时查看可用的快速修复(带下划线的蓝色文字,以便我可以单击并快速修复或更改必要的内容)

The problem was the something I installed from eclipse marketplace("dark theme devStyle") I didn't know how to change the background color and I thought I needed that dark theme devStyle to change color.问题是我从 eclipse 市场安装的东西(“深色主题 devStyle”)我不知道如何更改背景颜色,我认为我需要深色主题 devStyle 来更改颜色。 So I simply unintalled it and the problem solved.所以我只是将它卸载并解决了问题。 Also I deleted the metadata folder in the workspace to make a default setting.我还删除了工作区中的元数据文件夹以进行默认设置。

I had a similar issue after installing Dark theme devstyle from eclipse market place.从 eclipse 市场安装 Dark 主题 devstyle 后,我遇到了类似的问题。

The solution for me was to power off my PC and turn it back on again and It worked.我的解决方案是关闭我的电脑并重新打开它,它工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM