diff options
author | Torsten Sommer | 2013-07-13 20:25:25 +0000 |
---|---|---|
committer | Torsten Sommer | 2013-07-13 20:25:25 +0000 |
commit | 7dfd6e05025999a495911641f0b9cfc409bc4834 (patch) | |
tree | 608e9bf39d44627533304ee7ee2daada802db38d /bundles/runtime/org.eclipse.fx.core | |
parent | 6d57663f8f2c9a606dc02ea416dbe94d18b96423 (diff) | |
parent | abbae7435278dd652a3c4eaa6854c71d64a16b20 (diff) | |
download | org.eclipse.efxclipse-7dfd6e05025999a495911641f0b9cfc409bc4834.tar.gz org.eclipse.efxclipse-7dfd6e05025999a495911641f0b9cfc409bc4834.tar.xz org.eclipse.efxclipse-7dfd6e05025999a495911641f0b9cfc409bc4834.zip |
Merge remote-tracking branch 'origin/master' into ecp
Diffstat (limited to 'bundles/runtime/org.eclipse.fx.core')
3 files changed, 84 insertions, 1 deletions
diff --git a/bundles/runtime/org.eclipse.fx.core/META-INF/MANIFEST.MF b/bundles/runtime/org.eclipse.fx.core/META-INF/MANIFEST.MF index 79e797d63..6ab24ec8e 100755 --- a/bundles/runtime/org.eclipse.fx.core/META-INF/MANIFEST.MF +++ b/bundles/runtime/org.eclipse.fx.core/META-INF/MANIFEST.MF @@ -4,8 +4,42 @@ Bundle-Name: %Bundle-Name Bundle-SymbolicName: org.eclipse.fx.core
Bundle-Version: 0.8.1.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Import-Package: javax.inject;version="1.0.0"
+Import-Package: javafx.animation;version="2.2.0",
+ javafx.application;version="2.2.0",
+ javafx.beans;version="2.2.0",
+ javafx.beans.binding;version="2.2.0",
+ javafx.beans.property;version="2.2.0",
+ javafx.beans.property.adapter;version="2.2.0",
+ javafx.beans.value;version="2.2.0",
+ javafx.collections;version="2.2.0",
+ javafx.concurrent;version="2.2.0",
+ javafx.css;version="8.0.0",
+ javafx.embed.swing;version="2.2.0",
+ javafx.embed.swt;version="2.2.0",
+ javafx.event;version="2.2.0",
+ javafx.fxml;version="2.2.0",
+ javafx.geometry;version="2.2.0",
+ javafx.scene;version="2.2.0",
+ javafx.scene.canvas;version="2.2.0",
+ javafx.scene.chart;version="2.2.0",
+ javafx.scene.control;version="2.2.0",
+ javafx.scene.control.cell;version="2.2.0",
+ javafx.scene.effect;version="2.2.0",
+ javafx.scene.image;version="2.2.0",
+ javafx.scene.input;version="2.2.0",
+ javafx.scene.layout;version="2.2.0",
+ javafx.scene.media;version="2.2.0",
+ javafx.scene.paint;version="2.2.0",
+ javafx.scene.shape;version="2.2.0",
+ javafx.scene.text;version="2.2.0",
+ javafx.scene.transform;version="2.2.0",
+ javafx.scene.web;version="2.2.0",
+ javafx.stage;version="2.2.0",
+ javafx.util;version="2.2.0",
+ javafx.util.converter;version="2.2.0",
+ javax.inject;version="1.0.0"
Export-Package: org.eclipse.fx.core,
+ org.eclipse.fx.core.fxml,
org.eclipse.fx.core.log,
org.eclipse.fx.core.update
Bundle-Vendor: %Bundle-Vendor
diff --git a/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/fxml/ExtendedFXMLLoader.java b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/fxml/ExtendedFXMLLoader.java new file mode 100644 index 000000000..835bc7880 --- /dev/null +++ b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/fxml/ExtendedFXMLLoader.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright (c) 2013 BestSolution.at and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation + *******************************************************************************/ +package org.eclipse.fx.core.fxml; + +import java.io.IOException; + +import javafx.fxml.FXMLLoader; + + +public class ExtendedFXMLLoader { + public <T> T load(ClassLoader cl, String path) throws IOException { + try { + Class<?> clazz = cl.loadClass(path.replace('/', '.')); + FXMLDocument<T> d = (FXMLDocument<T>) clazz.newInstance(); + return d.load(null); + } catch (ClassNotFoundException e) { + return FXMLLoader.load(cl.getResource(path)); + } catch (InstantiationException e) { + throw new IOException(e); + } catch (IllegalAccessException e) { + throw new IOException(e); + } + } +} diff --git a/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/fxml/FXMLDocument.java b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/fxml/FXMLDocument.java new file mode 100644 index 000000000..5c11234be --- /dev/null +++ b/bundles/runtime/org.eclipse.fx.core/src/org/eclipse/fx/core/fxml/FXMLDocument.java @@ -0,0 +1,17 @@ +/******************************************************************************* + * Copyright (c) 2013 BestSolution.at and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation + *******************************************************************************/ +package org.eclipse.fx.core.fxml; + +import java.util.ResourceBundle; + +public abstract class FXMLDocument<T> { + public abstract T load(ResourceBundle bundle); +} |