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)); }
public static String getResourceString(String key) { ResourceBundle bundle = ComparePlugin.getDefault().getResourceBundle(); try { return bundle.getString(key); } catch (MissingResourceException e) { return key; } }