List of usage examples for java.beans PropertyEditorManager setEditorSearchPath
public static void setEditorSearchPath(String[] path)
From source file:org.eclipse.wb.internal.swing.model.property.editor.beans.JavaBeanEditorProvider.java
@Override public PropertyEditor getEditorForType(Class<?> propertyType) throws Exception { String propertyTypeName = propertyType.getName(); if (Object.class.isAssignableFrom(propertyType) && propertyType != char[].class && propertyType != byte[].class && propertyType != int[].class && propertyType != int[][].class && propertyTypeName.indexOf("java.lang.") == -1 && propertyTypeName.indexOf("java.util.") == -1 && propertyTypeName.indexOf("java.awt.") == -1 && propertyTypeName.indexOf("javax.swing.") == -1 && propertyTypeName.indexOf("org.eclipse.") == -1) { String[] standard_editorSearchPath = PropertyEditorManager.getEditorSearchPath(); try {/*from w w w .j av a2s. c o m*/ PropertyEditorManager.setEditorSearchPath( (String[]) ArrayUtils.removeElement(standard_editorSearchPath, "sun.beans.editors")); java.beans.PropertyEditor propertyEditor = PropertyEditorManager.findEditor(propertyType); if (propertyEditor != null) { return createEditor(propertyEditor); } } finally { PropertyEditorManager.setEditorSearchPath(standard_editorSearchPath); } } return null; }