Java 类com.intellij.uiDesigner.lw.CompiledClassPropertiesProvider 实例源码

项目:intellij-ce-playground    文件:RadNestedForm.java   
public RadNestedForm(final ModuleProvider module, final String formFileName, final String id) throws Exception {
  super(module, JPanel.class, id);
  myFormFileName = formFileName;
  LOG.debug("Loading nested form " + formFileName);
  VirtualFile formFile = ResourceFileUtil.findResourceFileInDependents(getModule(), formFileName);
  if (formFile == null) {
    throw new IllegalArgumentException("Couldn't find virtual file for nested form " + formFileName);
  }
  Document doc = FileDocumentManager.getInstance().getDocument(formFile);
  final ClassLoader classLoader = LoaderFactory.getInstance(getProject()).getLoader(formFile);
  final LwRootContainer rootContainer = Utils.getRootContainer(doc.getText(), new CompiledClassPropertiesProvider(classLoader));
  myRootContainer = XmlReader.createRoot(module, rootContainer, classLoader, null);
  if (myRootContainer.getComponentCount() > 0) {
    getDelegee().setLayout(new BorderLayout());
    JComponent nestedFormDelegee = myRootContainer.getComponent(0).getDelegee();
    getDelegee().add(nestedFormDelegee, BorderLayout.CENTER);

    setRadComponentRecursive(nestedFormDelegee);
  }

  if (isCustomCreateRequired()) {
    setCustomCreate(true);
  }
}
项目:tools-idea    文件:RadNestedForm.java   
public RadNestedForm(final ModuleProvider module, final String formFileName, final String id) throws Exception {
  super(module, JPanel.class, id);
  myFormFileName = formFileName;
  LOG.debug("Loading nested form " + formFileName);
  VirtualFile formFile = ResourceFileUtil.findResourceFileInDependents(getModule(), formFileName);
  if (formFile == null) {
    throw new IllegalArgumentException("Couldn't find virtual file for nested form " + formFileName);
  }
  Document doc = FileDocumentManager.getInstance().getDocument(formFile);
  final ClassLoader classLoader = LoaderFactory.getInstance(getProject()).getLoader(formFile);
  final LwRootContainer rootContainer = Utils.getRootContainer(doc.getText(), new CompiledClassPropertiesProvider(classLoader));
  myRootContainer = XmlReader.createRoot(module, rootContainer, classLoader, null);
  if (myRootContainer.getComponentCount() > 0) {
    getDelegee().setLayout(new BorderLayout());
    JComponent nestedFormDelegee = myRootContainer.getComponent(0).getDelegee();
    getDelegee().add(nestedFormDelegee, BorderLayout.CENTER);

    setRadComponentRecursive(nestedFormDelegee);
  }

  if (isCustomCreateRequired()) {
    setCustomCreate(true);
  }
}
项目:consulo-ui-designer    文件:RadNestedForm.java   
public RadNestedForm(final ModuleProvider module, final String formFileName, final String id) throws Exception {
  super(module, JPanel.class, id);
  myFormFileName = formFileName;
  LOG.debug("Loading nested form " + formFileName);
  VirtualFile formFile = ResourceFileUtil.findResourceFileInDependents(getModule(), formFileName);
  if (formFile == null) {
    throw new IllegalArgumentException("Couldn't find virtual file for nested form " + formFileName);
  }
  Document doc = FileDocumentManager.getInstance().getDocument(formFile);
  final ClassLoader classLoader = LoaderFactory.getInstance(getProject()).getLoader(formFile);
  final LwRootContainer rootContainer = Utils.getRootContainer(doc.getText(), new CompiledClassPropertiesProvider(classLoader));
  myRootContainer = XmlReader.createRoot(module, rootContainer, classLoader, null);
  if (myRootContainer.getComponentCount() > 0) {
    getDelegee().setLayout(new BorderLayout());
    JComponent nestedFormDelegee = myRootContainer.getComponent(0).getDelegee();
    getDelegee().add(nestedFormDelegee, BorderLayout.CENTER);

    setRadComponentRecursive(nestedFormDelegee);
  }

  if (isCustomCreateRequired()) {
    setCustomCreate(true);
  }
}
项目:intellij-ce-playground    文件:AsmCodeGeneratorTest.java   
private LwRootContainer loadFormData(final String formPath) throws Exception {
  String formData = FileUtil.loadFile(new File(formPath));
  final CompiledClassPropertiesProvider provider = new CompiledClassPropertiesProvider(getClass().getClassLoader());
  return Utils.getRootContainer(formData, provider);
}
项目:tools-idea    文件:AsmCodeGeneratorTest.java   
private LwRootContainer loadFormData(final String formPath) throws Exception {
  String formData = FileUtil.loadFile(new File(formPath));
  final CompiledClassPropertiesProvider provider = new CompiledClassPropertiesProvider(getClass().getClassLoader());
  return Utils.getRootContainer(formData, provider);
}
项目:consulo-ui-designer    文件:AsmCodeGeneratorTest.java   
private LwRootContainer loadFormData(final String formPath) throws Exception {
  String formData = FileUtil.loadFile(new File(formPath));
  final CompiledClassPropertiesProvider provider = new CompiledClassPropertiesProvider(getClass().getClassLoader());
  return Utils.getRootContainer(formData, provider);
}