mention method name in edit contract intention text

This commit is contained in:
peter
2014-03-05 22:19:27 +01:00
parent c1b03f0163
commit 80049dfc29
@@ -61,7 +61,7 @@ public class EditContractIntention extends BaseIntentionAction {
final PsiMethod method = getTargetMethod(project, editor, file);
if (method != null) {
boolean hasContract = ControlFlowAnalyzer.findContractAnnotation(method) != null;
setText(hasContract ? "Edit method contract" : "Add method contract");
setText(hasContract ? "Edit method contract of '" + method.getName() + "'" : "Add method contract to '" + method.getName() + "'");
return true;
}
return false;