帮助安装 PMD Eclipse 插件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4921580/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 15:44:31  来源:igfitidea点击:

Help installing PMD Eclipse plugin

javaeclipseeclipse-pluginredhatpmd

提问by user338154

I am trying to install PMD onto my Eclipse Helios installation. I follow the usual instructions to use the 'Install New Software' feature within Eclipse. All seems to go swimmingly and the installation completes. After restarting Eclipse, the option to use PMD is not there as expected (by right-clicking on a project).

我正在尝试将 PMD 安装到我的 Eclipse Helios 安装中。我按照通常的说明在 Eclipse 中使用“安装新软件”功能。一切似乎都很顺利,安装完成。重新启动 Eclipse 后,使用 PMD 的选项不存在(通过右键单击项目)。

Could someone advise on any steps I may have missed? Eclipse is the 20100617-1415 version installed on Red Hat running KDE.

有人可以就我可能遗漏的任何步骤提出建议吗?Eclipse 是安装在运行 KDE 的 Red Hat 上的 20100617-1415 版本。

Any guidance will be appreciated.

任何指导将不胜感激。

Thanks

谢谢

回答by Andrew Eisenberg

Either the PMD plugin had an error on installation, or there was a problem when trying to start the plugin up. Either way, there should be something in your error log.

PMD 插件在安装时出错,或者在尝试启动插件时出现问题。无论哪种方式,您的错误日志中都应该有一些内容。

I'd first check there to see if something relevant in the log (open the Error logview). If not, then you can check to see if the plugin is actually installed. Click on Help -> About Eclipse -> Installation Details -> plugins and look for PMD.

我会首先检查那里是否有相关的日志(打开Error log视图)。如果没有,那么您可以检查插件是否已实际安装。单击帮助 -> 关于 Eclipse -> 安装详细信息 -> 插件并查找 PMD。

If it is installed, then try uninstalling and reinstalling it. If the PMD plugin is not installed, then something failed.

如果已安装,请尝试卸载并重新安装。如果未安装 PMD 插件,则说明失败。

Make sure that your eclipse/ directory is writable for the current user (while not a hard requirement, many plugins do need this for some reason).

确保你的 eclipse/ 目录对于当前用户是可写的(虽然不是硬性要求,但出于某种原因,许多插件确实需要这个)。

回答by Cengiz

Unfortunately it is not possible to install PMD from the Eclipse Marketplace. Only way: Help > Install New Software... > Add... > http://pmd.sourceforge.net/eclipse

不幸的是,无法从 Eclipse Marketplace 安装 PMD。唯一的方法:帮助 > 安装新软件... > 添加... > http://pmd.sourceforge.net/eclipse

回答by Harbinger

Maybe you have installed eclipse-pmd instead of PMD. It'll be avalible only in the project's properties option.

也许你安装了 eclipse-pmd 而不是 PMD。它仅在项目的属性选项中可用。

You can better try to install from http://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/But, make sure the Window-Preferences-General-Network Connection is "Direct" and "Native".

您可以更好地尝试从http://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/安装 但是,请确保 Window-Preferences-General-Network Connection 是“Direct”和“Native” .

And restart. You'll surely find the PMD in preferences. I did for Keplar and works fine.

并重新启动。您肯定会在首选项中找到 PMD。我为 Kepler 做的,效果很好。

回答by Joby Wilson Mathews

To install the PMD plugin for Eclipse:

为 Eclipse 安装 PMD 插件:

To configure PMD, select "Windows"->"Preferences", then select PMD.

要配置 PMD,请选择“Windows”->“首选项”,然后选择 PMD。

To run PMD, right-click on a project node and select "PMD"->"Check code with PMD".

要运行 PMD,请右键单击项目节点并选择“PMD”->“使用 PMD 检查代码”。

For more info refer LINK

有关更多信息,请参阅LINK