[英]Is there a shortcut to add exceptions to a method signature in Eclipse?
[英]Add annotation while changing method signature in eclipse
我想通過重構來改變eclipse中的方法簽名。 是否可以添加帶有重構注釋的新參數? 即:我有一個方法:
public void foo(int a) ;
現在我想重構它:
public void foo(int a, @Someannotation int b);
PS我正在使用eclipse helios 。
編輯:目前它支持以下內容:
不,今天不可能。 還有一個錯誤 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=381449
添加沒有注釋的新參數。 Eclipse將為所有方法調用添加新參數的默認值。 然后在方法定義中添加注釋:它只定義一次,並且在源編輯器中鍵入@Someannotation
不應該太難。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.