private List<String> getExistingConstructorSignatures() { List<String> existing= new ArrayList<>(); IMethodBinding[] methods= fType.getDeclaredMethods(); for (int index= 0; index < methods.length; index++) { if (methods[index].isConstructor()) { StringBuilder buffer= new StringBuilder(); createSignature(methods[index], buffer, null); existing.add(buffer.toString()); } } return existing; }
private List getExistingConstructorSignatures() { List existing= new ArrayList(); IMethodBinding[] methods= fType.getDeclaredMethods(); for (int index= 0; index < methods.length; index++) { if (methods[index].isConstructor()) { StringBuffer buffer= new StringBuffer(); createSignature(methods[index], buffer, null); existing.add(buffer.toString()); } } return existing; }
private List<String> getExistingConstructorSignatures() { List<String> existing= new ArrayList<>(); IMethodBinding[] methods= fType.getDeclaredMethods(); for (int index= 0; index < methods.length; index++) { if (methods[index].isConstructor()) { StringBuffer buffer= new StringBuffer(); createSignature(methods[index], buffer, null); existing.add(buffer.toString()); } } return existing; }
@Override public IStatus validate(Object[] selection) { StringBuilder buffer= new StringBuilder(); final IMethodBinding constructor= fDialog.getSuperConstructorChoice(); createSignature(constructor, buffer, selection); if (fSignatures.contains(buffer.toString())) return new StatusInfo(IStatus.WARNING, ActionMessages.GenerateConstructorUsingFieldsAction_error_duplicate_constructor); return new StatusInfo(IStatus.INFO, Messages.format(ActionMessages.GenerateConstructorUsingFieldsAction_fields_selected, new Object[] { String.valueOf(countSelectedFields(selection)), String.valueOf(fEntries)})); } }
public IStatus validate(Object[] selection) { StringBuffer buffer= new StringBuffer(); final IMethodBinding constructor= fDialog.getSuperConstructorChoice(); createSignature(constructor, buffer, selection); if (fSignatures.contains(buffer.toString())) return new StatusInfo(IStatus.WARNING, ActionMessages.GenerateConstructorUsingFieldsAction_error_duplicate_constructor); return new StatusInfo(IStatus.INFO, Messages.format(ActionMessages.GenerateConstructorUsingFieldsAction_fields_selected, new Object[] { String.valueOf(countSelectedFields(selection)), String.valueOf(fEntries)})); } }
@Override public IStatus validate(Object[] selection) { StringBuffer buffer= new StringBuffer(); final IMethodBinding constructor= fDialog.getSuperConstructorChoice(); createSignature(constructor, buffer, selection); if (fSignatures.contains(buffer.toString())) return new StatusInfo(IStatus.WARNING, ActionMessages.GenerateConstructorUsingFieldsAction_error_duplicate_constructor); return new StatusInfo(IStatus.INFO, Messages.format(ActionMessages.GenerateConstructorUsingFieldsAction_fields_selected, new Object[] { String.valueOf(countSelectedFields(selection)), String.valueOf(fEntries)})); } }