Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TDL Open Source
TOP IDE
Commits
0aeca31c
Commit
0aeca31c
authored
Jun 17, 2020
by
Philip Makedonski
Browse files
+ generation ui improvement
parent
e75ef3e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
plugins/org.etsi.mts.tdl.tools.to.docx.ui/src/org/etsi/mts/tdl/tools/to/docx/ui/handlers/GenerationHandler.java
.../mts/tdl/tools/to/docx/ui/handlers/GenerationHandler.java
+16
-2
No files found.
plugins/org.etsi.mts.tdl.tools.to.docx.ui/src/org/etsi/mts/tdl/tools/to/docx/ui/handlers/GenerationHandler.java
View file @
0aeca31c
...
...
@@ -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
;
/**
...
...
@@ -26,7 +28,10 @@ import com.google.inject.Inject;
*/
public
class
GenerationHandler
extends
AbstractHandler
{
@Inject
IResourceSetProvider
resourceSetProvider
;
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
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment