X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Fforms%2FFormUtils.java;h=cf9984b864bbb1329259d2a013e38c34ea9203f4;hb=fb731ddbb765291c6286288a7c6f396db91a2eb3;hp=400aa735c273ebaca5a9cfa78f8b7574ebf76def;hpb=963ae5174de8ec335d2e8ddf3ed8f2be5a297e19;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms/src/org/argeo/cms/forms/FormUtils.java b/org.argeo.cms/src/org/argeo/cms/forms/FormUtils.java index 400aa735c..cf9984b86 100644 --- a/org.argeo.cms/src/org/argeo/cms/forms/FormUtils.java +++ b/org.argeo.cms/src/org/argeo/cms/forms/FormUtils.java @@ -14,6 +14,7 @@ import org.apache.commons.logging.LogFactory; import org.argeo.ArgeoException; import org.argeo.cms.CmsView; import org.argeo.cms.util.CmsUtils; +import org.argeo.eclipse.ui.EclipseUiUtils; import org.eclipse.jface.fieldassist.ControlDecoration; import org.eclipse.jface.fieldassist.FieldDecorationRegistry; import org.eclipse.jface.viewers.DoubleClickEvent; @@ -32,15 +33,10 @@ public class FormUtils { public final static String DEFAULT_SHORT_DATE_FORMAT = "dd/MM/yyyy"; - /** Simply checks if a string is not null nor empty */ - public static boolean notEmpty(String stringToTest) { - return stringToTest == null || "".equals(stringToTest.trim()); - } - /** Best effort to convert a String to a calendar. Fails silently */ public static Calendar parseDate(DateFormat dateFormat, String calStr) { Calendar cal = null; - if (notEmpty(calStr)) { + if (EclipseUiUtils.notEmpty(calStr)) { try { Date date = dateFormat.parse(calStr); cal = new GregorianCalendar();