Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,7 @@ public void launch(ILaunchConfiguration config, String mode, ILaunch launch, IPr
this.runKantra(configuration);
}
}

private MessageConsole findConsole(String name) {
ConsolePlugin plugin = ConsolePlugin.getDefault();
IConsoleManager conMan = plugin.getConsoleManager();
IConsole[] existing = conMan.getConsoles();
for (int i = 0; i < existing.length; i++)
if (name.equals(existing[i].getName()))
return (MessageConsole) existing[i];
MessageConsole myConsole = new MessageConsole(name, null);
conMan.addConsoles(new IConsole[]{myConsole});
return myConsole;
}


private void runKantra(ConfigurationElement configuration) {
if (WindupLaunchDelegate.activeRunner != null) {
WindupLaunchDelegate.activeRunner.kill();
Expand All @@ -119,7 +107,7 @@ private void runKantra(ConfigurationElement configuration) {
});


kantraJob = new Job(NLS.bind(Messages.generate_windup_report_for, configuration.getName())) {
kantraJob = new Job("Kantra Running - " + configuration.getName()) {
@Override
protected IStatus run(IProgressMonitor monitor) {
kantraMonitor = monitor;
Expand All @@ -133,10 +121,12 @@ public void done(IJobChangeEvent event) {
super.done(event);
System.out.println("kantra job done");
WindupLaunchDelegate.activeRunner.kill();
markerService.generateMarkersForConfiguration(configuration);
kantraMonitor.done();
viewService.renderReport(configuration);
}
});
kantraJob.setUser(false);
kantraJob.setUser(true);
kantraJob.schedule();


Expand Down Expand Up @@ -177,15 +167,25 @@ public void done(IJobChangeEvent event) {
};
Consumer<Boolean> onComplete = (msg) -> {
System.out.println("onComplete: " + msg);
viewService.renderReport(configuration);
markerService.generateMarkersForConfiguration(configuration);
kantraJob.cancel();
};
Consumer<String> onFailed = (msg) -> {
System.out.println("onFailed: " + msg);
System.out.println("onFailed: " + msg.toString());
System.out.println(msg.toString());
kantraJob.cancel();
};
WindupLaunchDelegate.activeRunner.runKantra(inputs, output, sources, targets, onMessage, onComplete, onFailed);
}

private MessageConsole findConsole(String name) {
ConsolePlugin plugin = ConsolePlugin.getDefault();
IConsoleManager conMan = plugin.getConsoleManager();
IConsole[] existing = conMan.getConsoles();
for (int i = 0; i < existing.length; i++)
if (name.equals(existing[i].getName()))
return (MessageConsole) existing[i];
MessageConsole myConsole = new MessageConsole(name, null);
conMan.addConsoles(new IConsole[]{myConsole});
return myConsole;
}
}