Commit 2d63b5bd authored by Gergo Ujhelyi's avatar Gergo Ujhelyi
Browse files

Main Controller headless launcher


Signed-off-by: Gergo Ujhelyi's avatarGergo Ujhelyi <ujhelyi.gergo@ericsson.com>
parent d8c7f279
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: TITAN_Runtime Plug-in
Bundle-SymbolicName: org.eclipse.titan.runtime
Bundle-SymbolicName: org.eclipse.titan.runtime;singleton:=true
Bundle-Version: 7.2.0.7_CAX_105_7730_R2A_20201030-1000
Require-Bundle: org.antlr.runtime;bundle-version="4.3.0"
Require-Bundle: org.antlr.runtime;bundle-version="4.3.0",
org.eclipse.equinox.app,
org.eclipse.core.variables;bundle-version="3.4.800",
org.eclipse.core.runtime;bundle-version="3.20.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
......
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
id="java_mctr"
point="org.eclipse.core.runtime.applications">
<application
cardinality="singleton-global"
thread="main"
visible="true">
<run
class="org.eclipse.titan.runtime.core.mctr.MctrCliHeadlessRunner">
</run>
</application>
</extension>
</plugin>
package org.eclipse.titan.runtime.core.mctr;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
import java.util.Iterator;
import java.util.Map;
public class MctrCliHeadlessRunner implements IApplication {
private MainController mainController;
@Override
public Object start(IApplicationContext context) throws Exception {
Map<Object, Object> arguments = context.getArguments();
String[] args = (String[]) arguments.get("application.args");
final Cli userInterface = new Cli();
final int max_ptcs = -1;
mainController = new MainController();
userInterface.setMainController(mainController);
mainController.initialize(userInterface, max_ptcs);
userInterface.enterLoop(args);
return null;
}
@Override
public void stop() {
mainController.terminate();
}
}
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