diff --git a/bundles/us.nineworlds.xstreamer.ia.core/src/us/nineworlds/xstreamer/ia/core/Activator.java b/bundles/us.nineworlds.xstreamer.ia.core/src/us/nineworlds/xstreamer/ia/core/Activator.java index 25941ff..f88d5f6 100644 --- a/bundles/us.nineworlds.xstreamer.ia.core/src/us/nineworlds/xstreamer/ia/core/Activator.java +++ b/bundles/us.nineworlds.xstreamer.ia.core/src/us/nineworlds/xstreamer/ia/core/Activator.java @@ -48,7 +48,7 @@ public Activator() { public void start(BundleContext context) throws Exception { Activator.context = context; - Bundle dataBundle = Platform.getBundle(us.nineworlds.xstreamer.ia.data.Activator.DATA_BUNDLE_ID); + Bundle dataBundle = Platform.getBundle("us.nineworlds.xstreamer.ia.data"); IPath deploymentsPath = new Path("deployments/deployments.json"); IPath commandCardsPath = new Path("commandCards/commandcards.json"); diff --git a/bundles/us.nineworlds.xstreamer.ia.data/.classpath b/bundles/us.nineworlds.xstreamer.ia.data/.classpath index 43b9862..323b07b 100644 --- a/bundles/us.nineworlds.xstreamer.ia.data/.classpath +++ b/bundles/us.nineworlds.xstreamer.ia.data/.classpath @@ -2,6 +2,5 @@ - diff --git a/bundles/us.nineworlds.xstreamer.ia.data/META-INF/MANIFEST.MF b/bundles/us.nineworlds.xstreamer.ia.data/META-INF/MANIFEST.MF index 9353ff4..f228d19 100644 --- a/bundles/us.nineworlds.xstreamer.ia.data/META-INF/MANIFEST.MF +++ b/bundles/us.nineworlds.xstreamer.ia.data/META-INF/MANIFEST.MF @@ -3,10 +3,4 @@ Bundle-ManifestVersion: 2 Bundle-Name: Data Bundle-SymbolicName: us.nineworlds.xstreamer.ia.data Bundle-Version: 0.7.0.qualifier -Bundle-Activator: us.nineworlds.xstreamer.ia.data.Activator -Require-Bundle: org.eclipse.core.runtime, - us.nineworlds.xstreamer.lib;bundle-version="0.7.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Bundle-ActivationPolicy: lazy -Export-Package: us.nineworlds.xstreamer.ia.data Eclipse-BundleShape: dir diff --git a/bundles/us.nineworlds.xstreamer.ia.data/build.properties b/bundles/us.nineworlds.xstreamer.ia.data/build.properties index 32653cb..5758731 100644 --- a/bundles/us.nineworlds.xstreamer.ia.data/build.properties +++ b/bundles/us.nineworlds.xstreamer.ia.data/build.properties @@ -1,6 +1,5 @@ -source.. = src/ -output.. = bin/ bin.includes = META-INF/,\ - .,\ commandCards/,\ - deployments/ + deployments/,\ + templates/ + \ No newline at end of file diff --git a/bundles/us.nineworlds.xstreamer.ia.data/src/us/nineworlds/xstreamer/ia/data/Activator.java b/bundles/us.nineworlds.xstreamer.ia.data/src/us/nineworlds/xstreamer/ia/data/Activator.java deleted file mode 100644 index aebacc5..0000000 --- a/bundles/us.nineworlds.xstreamer.ia.data/src/us/nineworlds/xstreamer/ia/data/Activator.java +++ /dev/null @@ -1,24 +0,0 @@ -package us.nineworlds.xstreamer.ia.data; - -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; - -public class Activator implements BundleActivator { - - private static BundleContext context; - - public static final String DATA_BUNDLE_ID = "us.nineworlds.xstreamer.ia.data"; - - static BundleContext getContext() { - return context; - } - - public void start(BundleContext bundleContext) throws Exception { - Activator.context = bundleContext; - } - - public void stop(BundleContext bundleContext) throws Exception { - Activator.context = null; - } - -} diff --git a/bundles/us.nineworlds.xstreamer.ia/src/us/nineworlds/xstreamer/ia/jobs/GenerateArmyJob.java b/bundles/us.nineworlds.xstreamer.ia/src/us/nineworlds/xstreamer/ia/jobs/GenerateArmyJob.java index d65b936..f87caaf 100644 --- a/bundles/us.nineworlds.xstreamer.ia/src/us/nineworlds/xstreamer/ia/jobs/GenerateArmyJob.java +++ b/bundles/us.nineworlds.xstreamer.ia/src/us/nineworlds/xstreamer/ia/jobs/GenerateArmyJob.java @@ -23,6 +23,7 @@ import freemarker.template.Configuration; import freemarker.template.Template; import us.nineworlds.iadata.IASpec; +import us.nineworlds.xstreamer.Logger; import us.nineworlds.xstreamer.ia.core.Activator; public class GenerateArmyJob extends Job { @@ -73,10 +74,12 @@ private IStatus writeArmy(boolean obsRefreshFlag, String templateInputDirectory, armyTemplate.process(input, playerArmyFile); } catch (Exception e) { e.printStackTrace(); + Logger.error("Exception writing Army " + templateOutputDirectory, e); return Status.CANCEL_STATUS; } finally { IOUtils.closeQuietly(playerArmyFile); } + Logger.info("File " + playerFilename + " written successfully"); return Status.OK_STATUS; } @@ -91,7 +94,7 @@ private String templateInputDirectory() { File templateDirectory = FileUtils.toFile(realUrl); templateInputDirectory = templateDirectory.getCanonicalPath().toString() + File.separator + "army" + File.separator + "html"; } catch (Exception ex) { - + Logger.error("Exception creating Template Input Directory ", ex); } return templateInputDirectory; }