Java 类com.intellij.uiDesigner.LoaderFactory 实例源码

项目:consulo-ui-designer    文件:ClientPropertiesManager.java   
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;
}
项目:intellij-ce-playground    文件:ReloadCustomComponentsAction.java   
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);
    }
  }
}
项目:tools-idea    文件:ReloadCustomComponentsAction.java   
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);
    }
  }
}
项目:consulo-ui-designer    文件:ReloadCustomComponentsAction.java   
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);
    }
  }
}
项目:intellij-ce-playground    文件:ComponentItemDragObject.java   
@NotNull
public Dimension getInitialSize(final RadContainer targetContainer) {
  final ClassLoader loader = LoaderFactory.getInstance(targetContainer.getProject()).getLoader(targetContainer.getModule());
  return myItem.getInitialSize(targetContainer.getDelegee(), loader);
}
项目:intellij-ce-playground    文件:RadComponentFactory.java   
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);
}
项目:tools-idea    文件:ComponentItemDragObject.java   
@NotNull
public Dimension getInitialSize(final RadContainer targetContainer) {
  final ClassLoader loader = LoaderFactory.getInstance(targetContainer.getProject()).getLoader(targetContainer.getModule());
  return myItem.getInitialSize(targetContainer.getDelegee(), loader);
}
项目:tools-idea    文件:RadComponentFactory.java   
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);
}
项目:consulo-ui-designer    文件:InsertComponentProcessor.java   
@Nullable
public static RadComponentFactory getRadComponentFactory(Project project, final String className)
{
    ClassLoader loader = LoaderFactory.getInstance(project).getProjectClassLoader();
    return getRadComponentFactory(className, loader);
}
项目:consulo-ui-designer    文件:ComponentItemDragObject.java   
@NotNull
public Dimension getInitialSize(final RadContainer targetContainer) {
  final ClassLoader loader = LoaderFactory.getInstance(targetContainer.getProject()).getLoader(targetContainer.getModule());
  return myItem.getInitialSize(targetContainer.getDelegee(), loader);
}
项目:consulo-ui-designer    文件:RadComponentFactory.java   
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);
}