Commit 4edcd882 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ added migrated word export



Change-Id: Ic906b54d89901c3707cd5ab5d8ff28aca4440e28
Signed-off-by: Philip Makedonski's avatarmakedonski <makedonski@informatik.uni-goettingen.de>
parent 9f62bf74
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
<booleanAttribute key="append.args" value="true"/>
<booleanAttribute key="askclear" value="true"/>
<booleanAttribute key="automaticAdd" value="true"/>
<booleanAttribute key="automaticValidate" value="false"/>
<stringAttribute key="bad_container_name" value="/org.etsi.mts.tdl.TDLan2/.launch/"/>
<stringAttribute key="bootstrap" value=""/>
<stringAttribute key="checked" value="[NONE]"/>
<booleanAttribute key="clearConfig" value="false"/>
<booleanAttribute key="clearws" value="false"/>
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/TOP"/>
<booleanAttribute key="default" value="true"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../runtime-EclipseXtext"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx2512m"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="true"/>
<booleanAttribute key="useProduct" value="true"/>
<booleanAttribute key="usefeatures" value="false"/>
</launchConfiguration>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.etsi.mts.tdl.tools.to.docx.ui</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Ui
Bundle-SymbolicName: org.etsi.mts.tdl.tools.to.docx.ui;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.etsi.mts.tdl.tools.to.docx.ui.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.ui.editors;bundle-version="3.5.0",
org.eclipse.ui.ide;bundle-version="3.5.0",
org.eclipse.ui.workbench,
com.google.inject,
org.eclipse.xtext.ui,
org.etsi.mts.tdl.model,
org.etsi.mts.tdl.tools.to.docx,
org.etsi.mts.tdl.tools.to.docx
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
source.. = src/
output.. = bin/
bin.includes = plugin.xml,\
META-INF/,\
.,\
icons/
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.ui.commands">
<category
name="TDL"
id="org.etsi.mts.tdl.tools.to.docx.ui.commands.category">
</category>
<command
categoryId="org.etsi.mts.tdl.tools.to.docx.ui.commands.category"
id="org.etsi.mts.tdl.tools.to.docx.ui.commands.generateCommand"
name="Generate Word document">
</command>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
commandId="org.etsi.mts.tdl.tools.to.docx.ui.commands.generateCommand"
class="org.etsi.mts.tdl.tools.to.docx.ui.handlers.GenerationHandler">
</handler>
</extension>
<extension
point="org.eclipse.ui.bindings">
<key
commandId="org.etsi.mts.tdl.tools.to.docx.ui.commands.generateCommand"
contextId="org.eclipse.ui.contexts.window"
sequence="M1+6"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
</key>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="menu:org.eclipse.ui.main.menu?after=additions">
<menu
label="TDL"
mnemonic="T"
id="org.etsi.mts.tdl.tools.menus.TDLMenu">
<command
commandId="org.etsi.mts.tdl.tools.to.docx.ui.commands.generateCommand"
mnemonic="G"
id="org.etsi.mts.tdl.tools.to.docx.ui.menus.generateCommand">
</command>
</menu>
</menuContribution>
<menuContribution
locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
<toolbar
id="org.etsi.mts.tdl.tools.to.docx.ui.toolbars.generate">
<command
commandId="org.etsi.mts.tdl.tools.to.docx.ui.commands.generateCommand"
icon="icons/WordIcon.png"
tooltip="Generate Word Document"
id="org.etsi.mts.tdl.tools.to.docx.ui.toolbars.generateCommand">
</command>
</toolbar>
</menuContribution>
</extension>
</plugin>
package org.etsi.mts.tdl.tools.to.docx.ui;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "org.etsi.mts.tdl.tools.to.docx.ui"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
/**
* The constructor
*/
public Activator() {
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
/**
* Returns an image descriptor for the image file at the given
* plug-in relative path
*
* @param path the path
* @return the image descriptor
*/
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
}
}
<?xml version="1.0" encoding="UTF-8"?><projectDescription><name>DUMMY</name><comment></comment><projects></projects><buildSpec></buildSpec><natures></natures></projectDescription>
\ No newline at end of file
package org.etsi.mts.tdl.tools.to.docx.ui.handlers;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.xtext.ui.resource.IResourceSetProvider;
import org.etsi.mts.tdl.tools.to.docx.TemplateApp;
import org.etsi.mts.tdl.Package;
import com.google.inject.Inject;
/**
* Our sample handler extends AbstractHandler, an IHandler base class.
* @see org.eclipse.core.commands.IHandler
* @see org.eclipse.core.commands.AbstractHandler
*/
public class GenerationHandler extends AbstractHandler {
@Inject
IResourceSetProvider resourceSetProvider;
/**
* The constructor.
*/
public GenerationHandler() {
}
/**
* the command has been executed, so extract extract the needed information
* from the application context.
*/
public Object execute(ExecutionEvent event) throws ExecutionException {
ISelection selection = HandlerUtil.getCurrentSelection(event);
IEditorInput input = HandlerUtil.getActiveEditorInput(event);
IFile file = null;
IProject project = null;
if (input != null && input instanceof FileEditorInput) {
file = ((FileEditorInput) input).getFile();
project = file.getProject();
} else if (selection !=null && selection instanceof IStructuredSelection) {
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
Object firstElement = structuredSelection.getFirstElement();
if (firstElement instanceof IFile) {
file = (IFile) firstElement;
project = file.getProject();
}
}
if (file !=null) {
URI uri = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
ResourceSet rs = new ResourceSetImpl();
Resource r = rs.getResource(uri, true);
TemplateApp app = new TemplateApp();
app.inlineEventOccurrenceTemplates(r);
app.attachSources(r);
//app.setTemplateName(templateName);
app.generate(file.getRawLocation().toOSString(), r);
}
return null;
}
@Override
public boolean isEnabled() {
return true;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/docx4j-3.2.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jaxb-xmldsig-core-1.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jaxb-xslfo-1.0.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/log4j-1.2.17.jar"/>
<classpathentry exported="true" kind="lib" path="lib/serializer.jar"/>
<classpathentry exported="true" kind="lib" path="lib/slf4j-api-1.7.12.jar"/>
<classpathentry exported="true" kind="lib" path="lib/slf4j-log4j12-1.7.12.jar"/>
<classpathentry exported="true" kind="lib" path="lib/xalan.jar"/>
<classpathentry exported="true" kind="lib" path="lib/xercesImpl.jar"/>
<classpathentry exported="true" kind="lib" path="lib/xml-apis.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.etsi.mts.tdl.tools.to.docx</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Docx
Bundle-SymbolicName: org.etsi.mts.tdl.tools.to.docx
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.xtext,
org.eclipse.ocl.common,
org.eclipse.ocl.ecore,
org.etsi.mts.tdl.model,
org.eclipse.swt,
org.eclipse.xtext.ui,
org.etsi.mts.tdl.TPLan2.ui,
org.apache.commons.io,
org.etsi.mts.tdl.TPLan2
Export-Package: org.etsi.mts.tdl.tools.to.docx
Bundle-ClassPath: lib/docx4j-3.2.1.jar,
lib/jaxb-xmldsig-core-1.0.0.jar,
lib/jaxb-xslfo-1.0.1.jar,
lib/log4j-1.2.17.jar,
lib/serializer.jar,
lib/slf4j-api-1.7.12.jar,
lib/slf4j-log4j12-1.7.12.jar,
lib/xalan.jar,
lib/xercesImpl.jar,
lib/xml-apis.jar,
.
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
lib/docx4j-3.2.1.jar,\
lib/jaxb-xmldsig-core-1.0.0.jar,\
lib/jaxb-xslfo-1.0.1.jar,\
lib/log4j-1.2.17.jar,\
lib/serializer.jar,\
lib/slf4j-api-1.7.12.jar,\
lib/slf4j-log4j12-1.7.12.jar,\
lib/xalan.jar,\
lib/xercesImpl.jar,\
lib/xml-apis.jar
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment