如何在Eclipse Juna中获得生成Getter / Setter,就像在Eclipse Juno中一样?

时间:2014-07-30 14:21:52

标签: php eclipse getter-setter eclipse-pdt

所以上周,我将Eclipse从Juno升级到了Luna。在Juno上,我安装的PHP开发工具给了我一个Generate Getters/Setters Source菜单项。这已不再是这种情况。我是否必须为此安装另一个插件?

Eclipse Juno上的插件:

plugins $ ls | grep php
org.eclipse.php.core.parser_3.2.0.201402182015.jar
org.eclipse.php.core.parser_3.3.0.201407212212.jar
org.eclipse.php.core_3.2.0.201402182015.jar
org.eclipse.php.core_3.3.0.201407212212.jar
org.eclipse.php.debug.core_3.2.0.201402182015.jar
org.eclipse.php.debug.core_3.3.0.201407212212.jar
org.eclipse.php.debug.daemon_3.2.0.201402182015.jar
org.eclipse.php.debug.daemon_3.3.0.201407212212.jar
org.eclipse.php.debug.ui_3.2.0.201402182015.jar
org.eclipse.php.debug.ui_3.3.0.201407212212.jar
org.eclipse.php.formatter.core_3.2.0.201402182015.jar
org.eclipse.php.formatter.core_3.3.0.201407212212.jar
org.eclipse.php.formatter.ui_3.2.0.201402182015.jar
org.eclipse.php.formatter.ui_3.3.0.201407212212.jar
org.eclipse.php.help_3.2.0.201402182015.jar
org.eclipse.php.help_3.3.0.201407212212.jar
org.eclipse.php.server.core_3.2.0.201402182015.jar
org.eclipse.php.server.core_3.3.0.201407212212.jar
org.eclipse.php.server.ui_3.2.0.201402182015.jar
org.eclipse.php.server.ui_3.3.0.201407212212.jar
org.eclipse.php.ui_3.2.0.201402182015.jar
org.eclipse.php.ui_3.3.0.201407212212.jar

Eclipse Luna上的插件:

plugins $ ls | grep php
org.eclipse.php.core.parser_3.3.0.201406110111.jar
org.eclipse.php.core_3.3.0.201406110111.jar
org.eclipse.php.debug.core_3.3.0.201406110111.jar
org.eclipse.php.debug.daemon_3.3.0.201406110111.jar
org.eclipse.php.debug.ui_3.3.0.201406110111.jar
org.eclipse.php.formatter.core_3.3.0.201406110111.jar
org.eclipse.php.formatter.ui_3.3.0.201406110111.jar
org.eclipse.php.help_3.3.0.201406110111.jar
org.eclipse.php.server.core_3.3.0.201406110111.jar
org.eclipse.php.server.ui_3.3.0.201406110111.jar
org.eclipse.php.ui_3.3.0.201406110111.jar

我从http://www.eclipse.org/downloads/download.php?file=/tools/pdt/downloads/pdt-Update-3.2.0.201306051924.zip下载了.zip,将其解压缩,并使用Install New Software进行安装...它有以下插件:

plugins $ ls 
org.eclipse.php.core.parser.source_3.2.0.201306051924.jar
org.eclipse.php.core.parser_3.2.0.201306051924.jar
org.eclipse.php.core.performance.tests_3.2.0.201306051924.jar
org.eclipse.php.core.source_3.2.0.201306051924.jar
org.eclipse.php.core.tests_3.2.0.201306051924.jar
org.eclipse.php.core_3.2.0.201306051924.jar
org.eclipse.php.debug.core.source_3.2.0.201306051924.jar
org.eclipse.php.debug.core_3.2.0.201306051924.jar
org.eclipse.php.debug.daemon.source_3.2.0.201306051924.jar
org.eclipse.php.debug.daemon_3.2.0.201306051924.jar
org.eclipse.php.debug.ui.source_3.2.0.201306051924.jar
org.eclipse.php.debug.ui_3.2.0.201306051924.jar
org.eclipse.php.formatter.core.tests_3.2.0.201306051924.jar
org.eclipse.php.formatter.core_3.2.0.201306051924.jar
org.eclipse.php.formatter.ui_3.2.0.201306051924.jar
org.eclipse.php.help.source_3.2.0.201306051924.jar
org.eclipse.php.help_3.2.0.201306051924.jar
org.eclipse.php.mylyn.ui_3.2.0.201306051924.jar
org.eclipse.php.server.core.source_3.2.0.201306051924.jar
org.eclipse.php.server.core_3.2.0.201306051924.jar
org.eclipse.php.server.ui.source_3.2.0.201306051924.jar
org.eclipse.php.server.ui_3.2.0.201306051924.jar
org.eclipse.php.ui.source_3.2.0.201306051924.jar
org.eclipse.php.ui.tests_3.2.0.201306051924.jar
org.eclipse.php.ui_3.2.0.201306051924.jar

所以这个功能是在去年6月之后添加的...然后在今年6月之前删除了?

2 个答案:

答案 0 :(得分:1)

所以我需要PDT Extensions ...

...

我甚至不记得安装它。当然,了解我,我会忘记再次安装,但接下来我会找到自己的问题!

答案 1 :(得分:0)

你是对的,你需要这个:PHP Development Tools 3.3 - Projects - Eclipse

那是为了Luna。