Example #1
0
 /**
  * Uses reflection to load an implementation of the class. Returns false if it failed for some
  * reason. This allows us to remove implementation classes (for example, to get rid of the
  * dependency on Mozilla for GTK2 users/builds
  */
 private boolean loadEditor(String clazz) {
   try {
     // Don't replace an existing editor
     if (editorPaneImpl != null) return true;
     Class c = Class.forName(clazz);
     editorPaneImpl = (EditorPane) c.getConstructors()[0].newInstance(null);
     return true;
   } catch (Exception e) {
     return false;
   }
 }