Removing the introspection. The class name was a private static String anyway,
thus there's no reason why the class should not be accessed directly.
This BTW fix issue #32646.
1.1 --- a/vcscore/src/org/netbeans/modules/vcscore/annotation/AnnotationPatternPropertyEditor.java Mon Apr 07 11:32:22 2003 +0000
1.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/annotation/AnnotationPatternPropertyEditor.java Mon Apr 07 14:48:30 2003 +0000
1.3 @@ -30,8 +30,6 @@
1.4 public abstract class AnnotationPatternPropertyEditor extends PropertyEditorSupport {
1.5
1.6
1.7 - private static final String CUSTOM_EDITOR_CLASS = "org.netbeans.modules.vcscore.annotation.AnnotPatternCustomEditor";
1.8 -
1.9 public void setValue(Object value) {
1.10 super.setValue(value);
1.11 }
1.12 @@ -61,22 +59,9 @@
1.13 public abstract String getDefaultAnnotationPattern();
1.14
1.15 public java.awt.Component getCustomEditor() {
1.16 - java.awt.Component toReturn = null;
1.17 - try {
1.18 - Class customEdClass = Class.forName(CUSTOM_EDITOR_CLASS, true, (NbClassLoader)Lookup.getDefault().lookup(NbClassLoader.class));
1.19 - toReturn = (java.awt.Component)customEdClass.newInstance();
1.20 - java.lang.reflect.Method method = customEdClass.getMethod("setCallingPropertyEditor", new Class[] {AnnotationPatternPropertyEditor.class});
1.21 - if (method != null) {
1.22 - method.invoke(toReturn, new Object[] {this});
1.23 - } else {
1.24 -// System.out.println("is null");
1.25 - }
1.26 - } catch (final Exception clExc) {
1.27 -// System.out.println("exception");
1.28 - clExc.printStackTrace();
1.29 - }
1.30 -
1.31 - return toReturn;
1.32 + AnnotPatternCustomEditor editor = new AnnotPatternCustomEditor();
1.33 + editor.setCallingPropertyEditor(this);
1.34 + return editor;
1.35 }
1.36
1.37 public boolean supportsCustomEditor() {