mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 17:52:07 +10:00
OSX build
This commit is contained in:
Binary file not shown.
Binary file not shown.
+24
-2
@@ -299,8 +299,30 @@ public class Presenter implements IPlugInPort {
|
|||||||
if (componentTypes == null) {
|
if (componentTypes == null) {
|
||||||
LOG.info("Loading component types.");
|
LOG.info("Loading component types.");
|
||||||
componentTypes = new HashMap<String, List<ComponentType>>();
|
componentTypes = new HashMap<String, List<ComponentType>>();
|
||||||
List<Class<?>> componentTypeClasses = JarScanner.getInstance()
|
// On Mac we use ":" to split paths, so check for that
|
||||||
.scanFolder("library/", IDIYComponent.class);
|
String[] classPath = System.getProperty("java.class.path").split(
|
||||||
|
System.getProperty("java.class.path").contains(";") ? ";"
|
||||||
|
: ":");
|
||||||
|
Set<Class<?>> componentTypeClasses = new HashSet<Class<?>>();
|
||||||
|
for (String path : classPath) {
|
||||||
|
path = path.replace('\\', '/');
|
||||||
|
File f = new File(path);
|
||||||
|
try {
|
||||||
|
if (f.isDirectory()) {
|
||||||
|
LOG.info("Scanning folder for components: "
|
||||||
|
+ f.getAbsolutePath());
|
||||||
|
componentTypeClasses.addAll(JarScanner.getInstance()
|
||||||
|
.scanFolder(path, IDIYComponent.class));
|
||||||
|
} else {
|
||||||
|
LOG.info("Scanning JAR for components: "
|
||||||
|
+ f.getAbsolutePath());
|
||||||
|
componentTypeClasses.addAll(JarScanner.getInstance()
|
||||||
|
.scanJar(f, IDIYComponent.class));
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOG.warn("Could not scan path " + path, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
for (Class<?> clazz : componentTypeClasses) {
|
for (Class<?> clazz : componentTypeClasses) {
|
||||||
if (!Modifier.isAbstract(clazz.getModifiers())) {
|
if (!Modifier.isAbstract(clazz.getModifiers())) {
|
||||||
ComponentType componentType = ComponentProcessor
|
ComponentType componentType = ComponentProcessor
|
||||||
|
|||||||
Reference in New Issue
Block a user