Unverified Commit 9ca8323f authored by Lenard Nagy's avatar Lenard Nagy Committed by GitHub
Browse files

Merge pull request #618 from GergoUjhelyi/master

main controller headless launcher
parents d8c7f279 e6566ba1
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>
......@@ -49,7 +49,7 @@ public final class ConfigCharsetDetector {
* Files.readAllBytes(p_file.toPath());
**/
} catch (IOException e) {
throw new TtcnError(e);
throw new TtcnError(e.getMessage());
} finally {
try {
if (file_input != null) {
......@@ -59,7 +59,7 @@ public final class ConfigCharsetDetector {
file_channel.close();
}
} catch (IOException e) {
throw new TtcnError(e);
throw new TtcnError(e.getMessage());
}
}
}
......
/******************************************************************************
* Copyright (c) 2000-2021 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
******************************************************************************/
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