public static void log(Throwable e) {
   if (e instanceof InvocationTargetException)
     e = ((InvocationTargetException) e).getTargetException();
   IStatus status = null;
   if (e instanceof CoreException) status = ((CoreException) e).getStatus();
   else status = new Status(IStatus.ERROR, getPluginId(), IStatus.OK, e.getMessage(), e);
   log(status);
 }
 public static void logErrorMessage(String message) {
   log(new Status(IStatus.ERROR, getPluginId(), IStatus.ERROR, message, null));
 }