简体   繁体   English

使用Eclipse添加继承方法签名的快速方法

[英]Quick way to add the signature of an inherited method using Eclipse

I know there is a feature "Add unimplemented methods" in case one implements a Java interface. 我知道有一个功能“添加未实现的方法”,以防实现Java接口。 I would like to know if there is a way to select a couple of the inherited methods and generate their signatures automatically as in the previously mentioned case. 我想知道是否有一种方法可以选择几个继承的方法并像前面提到的情况一样自动生成它们的签名。 I have to mention that I'm using Eclipse Helios for Java. 我不得不提到我正在使用Java的Eclipse Helios。

Sure, here's how: 当然可以,方法如下:

Right click -> Source -> Override/Implement Methods 右键单击 -> -> 覆盖/实现方法

在此处输入图片说明

Apart from what aioobe said, you can take advantage of a feature called code completion . 除了aioobe所说的之外,您还可以利用称为代码完成功能。 Simply hold Ctrl+Space and a menu will appear with methods you may wish to override. 只需按住Ctrl +空格键 ,就会出现一个菜单,其中包含您可能希望覆盖的方法。 Depending on what you are doing, this could be faster than the other solution mentioned. 根据您的操作,这可能比提到的其他解决方案要快。

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

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