mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
javafx: scene builder: move stubs to separate module
This commit is contained in:
Generated
+1
@@ -4,6 +4,7 @@
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/ByteCodeViewer/ByteCodeViewer.iml" filepath="$PROJECT_DIR$/plugins/ByteCodeViewer/ByteCodeViewer.iml" group="plugins" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/javaFX/FxBuilderEmbedder/FxBuilderEmbedder.iml" filepath="$PROJECT_DIR$/plugins/javaFX/FxBuilderEmbedder/FxBuilderEmbedder.iml" group="plugins/JavaFX" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/javaFX/FxBuilderEmbedder/Stubs/FxBuilderStubs.iml" filepath="$PROJECT_DIR$/plugins/javaFX/FxBuilderEmbedder/Stubs/FxBuilderStubs.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/IntelliLang/IntelliLang.iml" filepath="$PROJECT_DIR$/plugins/IntelliLang/IntelliLang.iml" group="plugins/IntelliLang" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/IntelliLang/IntelliLang-java.iml" filepath="$PROJECT_DIR$/plugins/IntelliLang/IntelliLang-java.iml" group="plugins/IntelliLang" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/IntelliLang/IntelliLang-javaee.iml" filepath="$PROJECT_DIR$/plugins/IntelliLang/IntelliLang-javaee.iml" group="plugins/IntelliLang" />
|
||||
|
||||
@@ -216,10 +216,7 @@ def layoutFull(String home, String targetDirectory, String patchedDescriptorDir
|
||||
module("common-javaFX-plugin")
|
||||
}
|
||||
jar("embedder.jar") {
|
||||
module("FXBuilderEmbedder") {
|
||||
exclude(name: "com/**")
|
||||
exclude(name: "javafx/**")
|
||||
}
|
||||
module("FXBuilderEmbedder")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/stubsSrc" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="FxBuilderStubs" scope="PROVIDED" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/stubsSrc" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/resources" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="module" module-name="FxBuilderStubs" scope="PROVIDED" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="lang-api" />
|
||||
@@ -23,6 +24,7 @@
|
||||
<orderEntry type="module" module-name="common-javaFX-plugin" />
|
||||
<orderEntry type="module" module-name="manifest" />
|
||||
<orderEntry type="module" module-name="idea-ui" />
|
||||
<orderEntry type="module" module-name="FxBuilderEmbedder" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
||||
+7
-4
@@ -14,6 +14,8 @@ import com.intellij.openapi.util.UserDataHolderBase;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.ui.HyperlinkLabel;
|
||||
import com.intellij.util.PathUtil;
|
||||
import javafx.embed.swing.JFXPanel;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -111,9 +113,7 @@ public class SceneBuilderEditor extends UserDataHolderBase implements FileEditor
|
||||
private void loadSceneBuilder(SceneBuilderInfo info) throws Exception {
|
||||
mySceneLoader = createSceneLoader(info);
|
||||
|
||||
System.out.println(mySceneLoader.loadClass("com.oracle.javafx.scenebuilder.app.SceneBuilderApp"));
|
||||
|
||||
Class<?> wrapperClass = mySceneLoader.loadClass("org.jetbrains.plugins.javaFX.sceneBuilder.SceneBuilderWrapper");
|
||||
Class<?> wrapperClass = Class.forName("org.jetbrains.plugins.javaFX.sceneBuilder.SceneBuilderWrapper", false, mySceneLoader);
|
||||
myFxPanel = (JComponent)wrapperClass.getMethod("create", String.class).invoke(null, myFile.getPath());
|
||||
|
||||
myPanel.add(myFxPanel, SCENE_CARD);
|
||||
@@ -155,7 +155,10 @@ public class SceneBuilderEditor extends UserDataHolderBase implements FileEditor
|
||||
throw new Exception(info.libPath + " no jar found");
|
||||
}
|
||||
|
||||
return new URLClassLoader(urls.toArray(new URL[urls.size()]));
|
||||
urls.add(new File(PathUtil.getJarPathForClass(JFXPanel.class)).toURI().toURL());
|
||||
urls.add(new File(PathUtil.getJarPathForClass(SceneBuilderWrapper.class)).toURI().toURL());
|
||||
|
||||
return new URLClassLoader(urls.toArray(new URL[urls.size()]), null);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user