Commit 6d1ed91c authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+fixed bundle path handling in target



Change-Id: Iab2873920c7d0efdb90bf0819b461fa2900ed81b
Signed-off-by: default avatarmakedonski <makedonski@informatik.uni-goettingen.de>
parent dbe76dbb
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
package org.etsi.mts.tdl.tools.to.docx;

import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -207,6 +209,13 @@ public class TemplateApp {
	    Bundle bundle = Platform.getBundle("org.etsi.mts.tdl.tools.to.docx");
	    String template = bundle.getLocation().substring(15)+templateFileName;
	    String empty = bundle.getLocation().substring(15)+wordTemplateExporter.getInputFileName();
	    try {
	    	template = org.eclipse.core.runtime.FileLocator.toFileURL(bundle.getEntry(templateFileName)).getPath();
			empty = org.eclipse.core.runtime.FileLocator.toFileURL(bundle.getEntry("empty.docx")).getPath();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		wordTemplateExporter.setTemplateFileName(template);
		wordTemplateExporter.setInputFileName(empty);