You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2010/07/23 16:20:40 UTC
svn commit: r967104 - in /pivot/trunk: eclipse/build.properties
wtk/src/org/apache/pivot/wtk/ScriptApplication.java
Author: gbrown
Date: Fri Jul 23 14:20:40 2010
New Revision: 967104
URL: http://svn.apache.org/viewvc?rev=967104&view=rev
Log:
Ensure that Pivot logo is included in Eclipse plugin; minor tweak to ScriptApplication.
Modified:
pivot/trunk/eclipse/build.properties
pivot/trunk/wtk/src/org/apache/pivot/wtk/ScriptApplication.java
Modified: pivot/trunk/eclipse/build.properties
URL: http://svn.apache.org/viewvc/pivot/trunk/eclipse/build.properties?rev=967104&r1=967103&r2=967104&view=diff
==============================================================================
--- pivot/trunk/eclipse/build.properties (original)
+++ pivot/trunk/eclipse/build.properties Fri Jul 23 14:20:40 2010
@@ -1,6 +1,6 @@
source.. = src/
output.. = bin/
bin.includes = *.xml,\
- *.png,\
+ icons/*.png,\
META-INF/,\
.
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ScriptApplication.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ScriptApplication.java?rev=967104&r1=967103&r2=967104&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/ScriptApplication.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ScriptApplication.java Fri Jul 23 14:20:40 2010
@@ -35,18 +35,12 @@ public class ScriptApplication implement
@Override
public void startup(Display display, Map<String, String> properties)
throws Exception {
+ // Get the location of the source file
String src = properties.get(SRC_KEY);
if (src == null) {
throw new IllegalArgumentException(SRC_KEY + " argument is required.");
}
- Resources resources = null;
- if (properties.containsKey(RESOURCES_KEY)) {
- resources = new Resources(properties.get(RESOURCES_KEY));
- }
-
- BXMLSerializer bxmlSerializer = new BXMLSerializer();
-
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
URL location = classLoader.getResource(src.substring(1));
@@ -62,7 +56,14 @@ public class ScriptApplication implement
throw new IllegalArgumentException("Cannot find source file \"" + src + "\".");
}
- bxmlSerializer.getNamespace().put("location", location);
+ // Load the resources
+ Resources resources = null;
+ if (properties.containsKey(RESOURCES_KEY)) {
+ resources = new Resources(properties.get(RESOURCES_KEY));
+ }
+
+ // Load the file and open the window
+ BXMLSerializer bxmlSerializer = new BXMLSerializer();
window = (Window)bxmlSerializer.readObject(location, resources);
window.open(display);
}