Commit 0aeca31c authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ generation ui improvement

parent e75ef3e5
......@@ -9,14 +9,16 @@ 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.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IWorkbenchWindow;
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;
/**
......@@ -27,6 +29,9 @@ import com.google.inject.Inject;
public class GenerationHandler extends AbstractHandler {
@Inject
IResourceSetProvider resourceSetProvider;
private IWorkbenchWindow window;
/**
* The constructor.
*/
......@@ -64,8 +69,17 @@ public class GenerationHandler extends AbstractHandler {
//app.setTemplateName(templateName);
app.generate(file.getRawLocation().toOSString(), r);
}
MessageDialog.openInformation(
Display.getDefault().getActiveShell(),
// window.getShell(),
"Generating Document",
"Document generated: "+file.getName());
return null;
}
public void init(IWorkbenchWindow window) {
this.window = window;
}
@Override
public boolean isEnabled() {
......
Markdown is supported
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