diff options
author | 2020-12-02 19:23:15 +0100 | |
---|---|---|
committer | 2020-12-02 19:23:15 +0100 | |
commit | 52241f46c3793b94ff0b7e8ada361881e1474b97 (patch) | |
tree | 6d484ba1fc345e42f401b9db8554746d232877db /Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf | |
parent | Merge branch 'master' of github.com:viatra/VIATRA-Generator (diff) | |
download | VIATRA-Generator-52241f46c3793b94ff0b7e8ada361881e1474b97.tar.gz VIATRA-Generator-52241f46c3793b94ff0b7e8ada361881e1474b97.tar.zst VIATRA-Generator-52241f46c3793b94ff0b7e8ada361881e1474b97.zip |
Fix VQL validator breakage after Execute Application Configuration
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf')
-rw-r--r-- | Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/execute/ExecuteScriptHandler.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/execute/ExecuteScriptHandler.java b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/execute/ExecuteScriptHandler.java index 380410d0..8d9d07a6 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/execute/ExecuteScriptHandler.java +++ b/Application/hu.bme.mit.inf.dslreasoner.application.ui/src/hu/bme/mit/inf/dslreasoner/application/ui/execute/ExecuteScriptHandler.java | |||
@@ -12,14 +12,23 @@ import org.eclipse.jface.viewers.ISelection; | |||
12 | import org.eclipse.jface.viewers.StructuredSelection; | 12 | import org.eclipse.jface.viewers.StructuredSelection; |
13 | import org.eclipse.ui.handlers.HandlerUtil; | 13 | import org.eclipse.ui.handlers.HandlerUtil; |
14 | 14 | ||
15 | import com.google.inject.Inject; | ||
16 | import com.google.inject.Injector; | ||
17 | |||
15 | import hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor; | 18 | import hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor; |
16 | 19 | ||
17 | public class ExecuteScriptHandler extends AbstractHandler implements IHandler { | 20 | public class ExecuteScriptHandler extends AbstractHandler implements IHandler { |
18 | 21 | ||
19 | ScriptExecutor scriptExecutor = new ScriptExecutor(RuntimeConsoleBasedScriptConsole.FACTORY); | 22 | ScriptExecutor scriptExecutor; |
23 | |||
24 | @Inject | ||
25 | public void setInjector(Injector injector) { | ||
26 | scriptExecutor = new ScriptExecutor(RuntimeConsoleBasedScriptConsole.FACTORY, injector); | ||
27 | } | ||
20 | 28 | ||
21 | @Override | 29 | @Override |
22 | public Object execute(ExecutionEvent event) throws ExecutionException { | 30 | public Object execute(ExecutionEvent event) throws ExecutionException { |
31 | assert scriptExecutor != null : "Injector must be set"; | ||
23 | ISelection selection = HandlerUtil.getCurrentSelection(event); | 32 | ISelection selection = HandlerUtil.getCurrentSelection(event); |
24 | if(selection instanceof StructuredSelection) { | 33 | if(selection instanceof StructuredSelection) { |
25 | StructuredSelection structuredSelection = (StructuredSelection) selection; | 34 | StructuredSelection structuredSelection = (StructuredSelection) selection; |