Skip to content

Commit

Permalink
eclipse-archived#190 Completed interpreter to run application
Browse files Browse the repository at this point in the history
  • Loading branch information
rtotaro committed Jan 27, 2017
1 parent 333a404 commit c880297
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,27 @@

public class TqCLPtolemyLaunchShortcut implements ILaunchShortcut {

@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void launch(ISelection selection, String mode) {
Object firstElement = ((IStructuredSelection) selection).getFirstElement();
if (firstElement instanceof IFile) {
try {
IFile file = (IFile) firstElement;
java.net.URI rawLocationURI = file.getRawLocationURI();

IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager();
MessageConsole messageConsole = new MessageConsole(file.getName(), "TqCL", null, false);
consoleManager.addConsoles(new IConsole[] { messageConsole });
MessageConsoleStream newMessageStream = messageConsole.newMessageStream();
// MessageConsoleStream newMessageStream = messageConsole.newMessageStream();
// newMessageStream

TqclInterpreter interpreter = new TqclInterpreter();
CompositeActor model = (CompositeActor) interpreter.interpret(file.getName(), file.getContents(),
file.getParent().getLocationURI(), CompositeActor.class);

String moml = model.exportMoML();

System.out.println(moml);
// String moml = model.exportMoML();
//
// System.out.println(moml);

//workflow service could be exposed by a different plugin; not workflow editor
WorkflowExecutionService executionService = TriqEditorPlugin.getDefault().getWorkflowExecutionService();
Expand Down

0 comments on commit c880297

Please sign in to comment.