Commit a2360eb4 authored by Alexander Diewald's avatar Alexander Diewald

Merge branch '3853' into 'master'

[3853] Revisit method to launch co-simulation server

See merge request !326
parents f36fa034 49e5b5cb
CCodeGeneratorEasyStartMenu.java aee60ea30cbe51832305ffd448cabc4fafab4452 GREEN
CGeneratorExecutionTarget.java 270fd30aaa67a294fd2bf4585044b46a54ee907f GREEN
FMUGeneratorEasyStartMenu.java 4c2ae30d89d32bb045affa580c052db467c3d35d GREEN
FMUGeneratorExecutionTarget.java 5f9d46042f23a92e0775bdca5ebb3c99b735ee40 GREEN
FMUGeneratorExecutionTarget.java a2075edc7fc987934232228ebbb86997b84741fc GREEN
JavaCodeGeneratorEasyStartMenu.java 08a5ef75fe3ff45840c1cf9e705cb226a1232efb GREEN
JavaGeneratorExecutionTarget.java dba521d1b700365c0522b7c70e49653fcced66cb GREEN
......@@ -21,7 +21,6 @@ import static java.nio.file.Files.createTempDirectory;
import static org.apache.commons.io.FileUtils.deleteDirectory;
import static org.apache.commons.lang.ArrayUtils.addAll;
import static org.eclipse.core.runtime.FileLocator.resolve;
import static org.eclipse.jface.dialogs.MessageDialog.openInformation;
import static org.eclipse.ui.PlatformUI.getWorkbench;
import static org.fortiss.af3.expression.utils.DataDictionaryUtils.findDataDictionary;
import static org.fortiss.af3.generator.common.textgen.c.FMUModelDescriptionTextGenerator.fmuArchiveToXML;
......@@ -32,6 +31,7 @@ import static org.fortiss.tooling.base.utils.SystemUtils.isMacOSXPlatform;
import static org.fortiss.tooling.base.utils.SystemUtils.isOs64BitArch;
import static org.fortiss.tooling.base.utils.SystemUtils.isWindowsPlatform;
import static org.fortiss.tooling.kernel.ui.util.MessageUtilsExtended.showErrorInUIThread;
import static org.fortiss.tooling.kernel.ui.util.MessageUtilsExtended.showInfoInUIThread;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.error;
import static org.fortiss.tooling.kernel.utils.ResourceUtils.getResourceURI;
......@@ -110,7 +110,6 @@ public class FMUGeneratorExecutionTarget extends ExecutionTargetBase {
FMUArchivePackage fmuSource = (FMUArchivePackage)executable.getExecutableObject();
ExecutionConfiguration config = executable.getConfiguration();
Shell currentShell = getWorkbench().getActiveWorkbenchWindow().getShell();
DataDictionary dd = findDataDictionary(((EObject)executable.getSource()));
Double samplingTime = null;
IResource targetFolder;
......@@ -181,7 +180,7 @@ public class FMUGeneratorExecutionTarget extends ExecutionTargetBase {
error(AF3ComponentUIActivator.getDefault(), cex.getMessage(), cex);
}
if(config != null) {
openInformation(currentShell, "Successful FMU export",
showInfoInUIThread("[Success: FMI export]",
fmuSource.getModelDescription().getName() + ".fmu was successfuly generated!");
}
}
......@@ -353,7 +352,6 @@ public class FMUGeneratorExecutionTarget extends ExecutionTargetBase {
* Needed since a runtime execution blocks when the limited size output buffer is full.
* Therefore we need to concurrently read from BOTH the error and the output stream.
*/
// TODO
@SuppressWarnings("javadoc")
private static final class InputStreamConsumer implements Callable<List<String>> {
InputStream s;
......
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="res"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="res"/>
<classpathentry exported="true" kind="lib" path="lib/xchart-3.5.2.jar"/>
<classpathentry exported="true" kind="lib" path="lib/coe-1.0.6.jar"/>
<classpathentry kind="output" path="build"/>
</classpath>
......@@ -15,5 +15,6 @@ Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Vendor: fortiss GmbH
Bundle-ClassPath: .,
lib/xchart-3.5.2.jar
lib/xchart-3.5.2.jar,
lib/coe-1.0.6.jar
Eclipse-BundleShape: dir
CosimulationConfigurationsDialog.java 9fcc43de9ff6ee40b7cb9136155ba937e65b12bb GREEN
CosimulatorGraphGenerator.java 3f786448ab2d977ab9b855d09289df6b6eef61c1 GREEN
CosimulatorGraphGenerator.java dfbe726adbe6acdf66556c2c7b2d45145a286616 GREEN
FMUSimulatorEasyStartMenu.java d11e36db19e4e46b9f662f6e1d2d762bf0a2c67b GREEN
FMUSimulatorExecutionTarget.java e4985e5a691a851db84eac6b015b68b8c15de681 GREEN
FMUSimulatorExecutionTarget.java f792d051c0bd08050bf6367f0e958eb0f5a96e22 GREEN
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.cosimulation.ui.simulator;
import static java.io.File.separator;
import static java.lang.Double.parseDouble;
import static java.util.Arrays.asList;
import static javax.swing.SwingUtilities.invokeLater;
......@@ -75,8 +76,8 @@ public class CosimulatorGraphGenerator {
String line = "";
String targetFolder = getAF3EclipseProject().getLocation().toOSString();
for(String portName : portsToDisplay) {
try(BufferedReader fileReader =
new BufferedReader(new FileReader(targetFolder + "\\" + rootName + ".csv"))) {
try(BufferedReader fileReader = new BufferedReader(
new FileReader(targetFolder + separator + rootName + ".csv"))) {
line = fileReader.readLine();
String[] tokens = line.split(";");
int timeIndex = asList(tokens).indexOf("time");
......
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