public List<Class> getConfiguredClasses(@NotNull Project project) { List<Class> result = new ArrayList<>(); for(String className : myPropertyMap.keySet()) { try { result.add(Class.forName(className, true, LoaderFactory.getInstance(project).getProjectClassLoader())); } catch(ClassNotFoundException e) { // TODO: do something better than ignore? } } return result; }
public void actionPerformed(AnActionEvent e) { Project project = e.getData(CommonDataKeys.PROJECT); if (project == null) return; LoaderFactory.getInstance(project).clearClassLoaderCache(); final FileEditor[] fileEditors = FileEditorManager.getInstance(project).getAllEditors(); for(FileEditor editor: fileEditors) { if (editor instanceof UIFormEditor) { ((UIFormEditor) editor).getEditor().readFromFile(true); } } }
public void actionPerformed(AnActionEvent e) { Project project = e.getData(PlatformDataKeys.PROJECT); if (project == null) return; LoaderFactory.getInstance(project).clearClassLoaderCache(); final FileEditor[] fileEditors = FileEditorManager.getInstance(project).getAllEditors(); for(FileEditor editor: fileEditors) { if (editor instanceof UIFormEditor) { ((UIFormEditor) editor).getEditor().readFromFile(true); } } }
@NotNull public Dimension getInitialSize(final RadContainer targetContainer) { final ClassLoader loader = LoaderFactory.getInstance(targetContainer.getProject()).getLoader(targetContainer.getModule()); return myItem.getInitialSize(targetContainer.getDelegee(), loader); }
public RadComponent newInstance(ModuleProvider moduleProvider, String className, String id) throws ClassNotFoundException { Module module = moduleProvider.getModule(); final Class<?> aClass = Class.forName(className, true, LoaderFactory.getInstance(module.getProject()).getLoader(module)); return newInstance(moduleProvider, aClass, id); }
@Nullable public static RadComponentFactory getRadComponentFactory(Project project, final String className) { ClassLoader loader = LoaderFactory.getInstance(project).getProjectClassLoader(); return getRadComponentFactory(className, loader); }