Exemplo n.º 1
0
 public static void writeToLog(String errorMsg, Throwable e, Object originatingClass) {
   ComparePlugin plugin = getDefault();
   getDefault()
       .getLog()
       .log(
           new Status(
               IStatus.ERROR,
               plugin.getBundle().getSymbolicName(),
               IStatus.ERROR,
               errorMsg + " in class " + originatingClass.getClass().getName(), // $NON-NLS-1$
               e));
 }
Exemplo n.º 2
0
 public static String getResourceString(String key) {
   ResourceBundle bundle = ComparePlugin.getDefault().getResourceBundle();
   try {
     return bundle.getString(key);
   } catch (MissingResourceException e) {
     return key;
   }
 }