@Override void init() { if (originalPath == null) { originalPath = Arrays.asList(PropertyEditorManager.getEditorSearchPath()); } } };
/** * Gets the package names that will be searched for property editors. * * @return The package names that will be searched for property editors. */ public String[] getEditorSearchPath() { return PropertyEditorManager.getEditorSearchPath(); }
@Override public void restored() { String[] old = PropertyEditorManager.getEditorSearchPath(); List<String> l = new ArrayList<>(Arrays.asList(old)); l.add("nl.cloudfarming.client.editors"); PropertyEditorManager.setEditorSearchPath(l.toArray(new String[l.size()])); }
List editorSearchPath = new LinkedList(Arrays.asList(PropertyEditorManager.getEditorSearchPath())); editorSearchPath.addAll(propertyEditorPaths); PropertyEditorManager.setEditorSearchPath((String[]) editorSearchPath.toArray(new String[editorSearchPath.size()]));
List editorSearchPath = new LinkedList(Arrays.asList(PropertyEditorManager.getEditorSearchPath())); StringTokenizer paths = new StringTokenizer(propertyEditorPaths, " ,"); editorSearchPath.addAll(Collections.list(paths));
List editorSearchPath = new LinkedList(Arrays.asList(PropertyEditorManager.getEditorSearchPath())); StringTokenizer paths = new StringTokenizer(propertyEditorPaths, " ,"); editorSearchPath.addAll(Collections.list(paths));
List editorSearchPath = new LinkedList(Arrays.asList(PropertyEditorManager.getEditorSearchPath())); StringTokenizer paths = new StringTokenizer(propertyEditorPaths, " ,"); editorSearchPath.addAll(Collections.list(paths));
List editorSearchPath = new LinkedList(Arrays.asList(PropertyEditorManager.getEditorSearchPath())); StringTokenizer paths = new StringTokenizer(propertyEditorPaths, " ,"); editorSearchPath.addAll(Collections.list(paths));
private static void doInitEditors() { String[] currentPath = PropertyEditorManager.getEditorSearchPath(); int length = currentPath != null ? currentPath.length : 0; String[] newPath = new String[length+2]; System.arraycopy(currentPath, 0, newPath, 2, length); // Put the JBoss editor path first // The default editors are not very flexible newPath[0] = "org.jboss.util.propertyeditor"; newPath[1] = "org.jboss.mx.util.propertyeditor"; PropertyEditorManager.setEditorSearchPath(newPath); /* Register the editor types that will not be found using the standard class name to editor name algorithm. For example, the type String[] has a name '[Ljava.lang.String;' which does not map to a XXXEditor name. */ Class<String[]> strArrayType = String[].class; PropertyEditorManager.registerEditor(strArrayType, StringArrayEditor.class); @SuppressWarnings("unchecked") Class<Class[]> clsArrayType = Class[].class; PropertyEditorManager.registerEditor(clsArrayType, ClassArrayEditor.class); Class<int[]> intArrayType = int[].class; PropertyEditorManager.registerEditor(intArrayType, IntArrayEditor.class); }
String[] searchPath = PropertyEditorManager.getEditorSearchPath(); String[] newSearchPath = new String[searchPath.length+1]; newSearchPath[0] = "org.netbeans.beaninfo.editors";
" does not support a custom editor; valueType=" + type.getName() + "; PropertyEditorManager says: " + PropertyEditorManager.findEditor(type) + "; search path is: " + Arrays.toString(PropertyEditorManager.getEditorSearchPath()) + "; CCL: " + Thread.currentThread().getContextClassLoader() );
public Object run() String[] currentPath = PropertyEditorManager.getEditorSearchPath(); int length = currentPath != null ? currentPath.length : 0; String[] newPath = new String[length+2];