1 14 package org.eclipse.core.databinding.util; 15 16 import org.eclipse.core.runtime.IStatus; 17 18 24 public class Policy { 25 26 29 public static final boolean DEFAULT = false; 30 31 34 public static final String JFACE_DATABINDING = "org.eclipse.core.databinding"; 36 private static ILogger log; 37 38 41 private static ILogger getDummyLog() { 42 return new ILogger() { 43 public void log(IStatus status) { 44 System.err.println(status.getMessage()); 45 } 46 }; 47 } 48 49 56 public static synchronized void setLog(ILogger logger) { 57 log = logger; 58 } 59 60 68 public static synchronized ILogger getLog() { 69 if (log == null) { 70 log = getDummyLog(); 71 } 72 return log; 73 } 74 75 } 76 | Popular Tags |