1 12 13 package org.eclipse.jface.internal.databinding.provisional.validation; 14 15 import org.eclipse.jface.internal.databinding.internal.BindingMessages; 16 17 20 public class ReadOnlyValidator implements IValidator { 21 22 private static ReadOnlyValidator singleton = null; 23 24 29 public static ReadOnlyValidator getDefault() { 30 if (singleton == null) { 31 singleton = new ReadOnlyValidator(); 32 } 33 return singleton; 34 } 35 36 39 public ValidationError isPartiallyValid(Object fragment) { 40 return ValidationError.error(BindingMessages.getString("Validate_NoChangeAllowed")); } 43 44 47 public ValidationError isValid(Object value) { 48 return null; 50 } 51 52 } 53 | Popular Tags |