initialize
This commit is contained in:
32
interface/testcenter/.classpath
Normal file
32
interface/testcenter/.classpath
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
36
interface/testcenter/.project
Normal file
36
interface/testcenter/.project
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>data-interface-testcenter</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,4 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/main/resources=UTF-8
|
||||
encoding/<project>=UTF-8
|
||||
@@ -0,0 +1,8 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
@@ -0,0 +1,4 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="data-interface-testcenter">
|
||||
<wb-resource deploy-path="/" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/" source-path="/src/main/resources"/>
|
||||
</wb-module>
|
||||
</project-modules>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<faceted-project>
|
||||
<installed facet="java" version="1.8"/>
|
||||
<installed facet="jst.utility" version="1.0"/>
|
||||
</faceted-project>
|
||||
@@ -0,0 +1,2 @@
|
||||
disabled=06target
|
||||
eclipse.preferences.version=1
|
||||
32
interface/testcenter/pom.xml
Normal file
32
interface/testcenter/pom.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.itac.interface.interfaces</groupId>
|
||||
<artifactId>data-interface-testcenter</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>data-interface-testcenter</name>
|
||||
<version>${mes.interface.version}</version>
|
||||
<parent>
|
||||
<groupId>com.itac.interface</groupId>
|
||||
<artifactId>data-interface</artifactId>
|
||||
<version>${mes.interface.version}</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.itac.interface.interfaces</groupId>
|
||||
<artifactId>data-interface-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itac.product</groupId>
|
||||
<artifactId>util-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itac.interface.interfaces</groupId>
|
||||
<artifactId>data-interface-xmlapi</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itac.interface.interfaces</groupId>
|
||||
<artifactId>data-interface-basic</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,186 @@
|
||||
/*
|
||||
* Copyright (c) 2016 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.simulation;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.itac.mes.config.domain.Parameter;
|
||||
import com.itac.mes.datainterface.ConfigurationException;
|
||||
import com.itac.mes.datainterface.ParameterUpdateTool;
|
||||
import com.itac.mes.datainterface.annotations.AInit;
|
||||
import com.itac.mes.datainterface.annotations.AInstantiationType;
|
||||
import com.itac.mes.datainterface.annotations.AParamValue;
|
||||
import com.itac.mes.datainterface.annotations.AParameter;
|
||||
import com.itac.mes.datainterface.annotations.InstantiationType;
|
||||
import com.itac.mes.datainterface.datasource.directory.WildCardFilter;
|
||||
import com.itac.mes.datainterface.filehandler.FileException;
|
||||
import com.itac.mes.datainterface.filehandler.FileTools;
|
||||
import com.itac.mes.datainterface.gui.DataInterfaceMenuAction;
|
||||
import com.itac.mes.datainterface.gui.IWorkerPane;
|
||||
import com.itac.util.logging.LogHandler;
|
||||
import com.itac.util.logging.LogLevel;
|
||||
|
||||
@AInstantiationType(name = "testCenter", type = InstantiationType.MACHINESIMULATION)
|
||||
public class FormattingCode extends DefaultMachineSimulation {
|
||||
|
||||
public static final String ID_EXECUTE_SCRIPT = "executeScript";
|
||||
public static final String ID_RELOAD_SCRIPT = "reload";
|
||||
public static final String ID_SHOW_SCRIPT = "showScript";
|
||||
|
||||
// @formatter:off
|
||||
private static final String SIMULATIONS_TESTCENTER = "simulation.testcenter";
|
||||
private static final String DESTINATION_DIRECTORY = SIMULATIONS_TESTCENTER + ".destinationDirectory";
|
||||
private static final String SOURCE_DIRECTORY = SIMULATIONS_TESTCENTER + ".sourceDirectory";
|
||||
private static final String FILE_MASK = SIMULATIONS_TESTCENTER + ".fileMask";
|
||||
// @formatter:on
|
||||
|
||||
@AParameter(name = SIMULATIONS_TESTCENTER, description = "TestCenter", visibility = "MachineSimulation=com.itac.mes.datainterface.simulation.TestCenter", dimPath = ParameterUpdateTool.DEFAULT_DIM_PATH)
|
||||
private Parameter paramSource;
|
||||
@AParameter(name = DESTINATION_DIRECTORY, parent = SIMULATIONS_TESTCENTER, description = "Zielverzeichnis fuer Testdateien", type = String.class)
|
||||
private Parameter paramDestDir;
|
||||
@AParameter(name = SOURCE_DIRECTORY, parent = SIMULATIONS_TESTCENTER, description = "Quellverzeichnis fuer Testdateien", type = String.class)
|
||||
private Parameter paramSourceDir;
|
||||
@AParameter(name = FILE_MASK, parent = SIMULATIONS_TESTCENTER, description = "Dateifilter fuer Testdateien", type = String.class)
|
||||
private Parameter paramFileMask;
|
||||
|
||||
private File sourceDirectory;
|
||||
private File destDirectory;
|
||||
private WildCardFilter wildcardfilter;
|
||||
|
||||
// die einzelnen Menu-Items werden hier deklariert, und spaeter geadded
|
||||
private DataInterfaceMenuAction reloadDirectoryMenuItem = new DataInterfaceMenuAction("reload Directory", "reload",
|
||||
ID_RELOAD_SCRIPT);
|
||||
private DataInterfaceMenuAction executeScriptServerMenuItem = new DataInterfaceMenuAction("run script",
|
||||
"executeScript", ID_EXECUTE_SCRIPT);
|
||||
private DataInterfaceMenuAction showScriptMenuItem = new DataInterfaceMenuAction("show script", "showScript",
|
||||
ID_SHOW_SCRIPT);
|
||||
|
||||
public FormattingCode() {
|
||||
super();
|
||||
addSimMenuItem(reloadDirectoryMenuItem);
|
||||
addSimMenuItem(executeScriptServerMenuItem);
|
||||
addSimMenuItem(showScriptMenuItem);
|
||||
}
|
||||
|
||||
@AParamValue(value = SOURCE_DIRECTORY)
|
||||
public void setSourceDirectory(String value) throws ConfigurationException {
|
||||
File directory = new File(value);
|
||||
getConfiguration().checkDirectory(directory);
|
||||
sourceDirectory = directory;
|
||||
}
|
||||
|
||||
@AParamValue(value = DESTINATION_DIRECTORY)
|
||||
public void setDestinationDirectory(String value) throws ConfigurationException {
|
||||
File directory = new File(value);
|
||||
getConfiguration().checkDirectory(directory);
|
||||
destDirectory = directory;
|
||||
}
|
||||
|
||||
@AParamValue(value = FILE_MASK)
|
||||
public void setFileMask(String value) throws ConfigurationException {
|
||||
try {
|
||||
wildcardfilter = new WildCardFilter(value);
|
||||
} catch (Exception exception) {
|
||||
throw new ConfigurationException("Can not create Filename filter from expression '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@AInit
|
||||
protected void atInit() {
|
||||
reloadDirectoryMenuItem.setEnabled(getConfigurationResult() == OK);
|
||||
if (getConfigurationResult() == OK) {
|
||||
reload();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param machineSimPane
|
||||
*/
|
||||
public void setSimulationPane(IWorkerPane machineSimPane) {
|
||||
super.setSimulationPane(machineSimPane);
|
||||
reload();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(DataInterfaceMenuAction menuAction) {
|
||||
//
|
||||
if (menuAction == executeScriptServerMenuItem) {
|
||||
executeScriptServerMenuItem.setEnabled(false);
|
||||
}
|
||||
super.execute(menuAction);
|
||||
}
|
||||
|
||||
// remotely callable function
|
||||
protected void showScript() {
|
||||
File[] selectedValues = ((ITestCenterPane) getWorkerPane()).getSelectedScripts();
|
||||
if (selectedValues == null || selectedValues.length == 0) {
|
||||
return;
|
||||
}
|
||||
// alle dies values sind Files; diese muessen in das Zielverzeichnis
|
||||
// kopiert werden
|
||||
for (File script : selectedValues) {
|
||||
try {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
FileReader fr = new FileReader(script);
|
||||
String line;
|
||||
BufferedReader f;
|
||||
f = new BufferedReader(fr);
|
||||
while ((line = f.readLine()) != null) {
|
||||
buffer.append(line).append("\n");
|
||||
}
|
||||
f.close();
|
||||
((ITestCenterPane) getWorkerPane()).setScriptText(buffer.toString());
|
||||
} catch (IOException e) {
|
||||
LogHandler.log(LogLevel.ERROR,
|
||||
"Error reading the file " + script.getAbsolutePath() + ":\n" + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
executeScriptServerMenuItem.setEnabled(true);
|
||||
}
|
||||
|
||||
// remotely callable function
|
||||
protected void executeScript() {
|
||||
File[] selectedValues = ((ITestCenterPane) getWorkerPane()).getSelectedScripts();
|
||||
if (selectedValues.length == 0) {
|
||||
return;
|
||||
}
|
||||
// alle dies values sind Files; diese muessen in das Zielverzeichnis
|
||||
// kopiert werden
|
||||
for (File script : selectedValues) {
|
||||
try {
|
||||
FileTools.copyFile(script, destDirectory, overrideExistingfiles);
|
||||
} catch (FileException e1) {
|
||||
writeMessage(LogLevel.ERROR, e1.getMessage());
|
||||
LogHandler.log(getClass().getSimpleName(), LogLevel.ERROR, "copy file in script execution failed", e1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* remotely callable function
|
||||
* <p>
|
||||
* Neu laden des konfiguriereten sourceDirectory Verzeichnisses und anzeigen des Ergebnisses in der Liste
|
||||
*/
|
||||
private void reload() {
|
||||
LogHandler.debug("reload directory '" + sourceDirectory.getAbsolutePath() + " '");
|
||||
|
||||
File[] directory = sourceDirectory.listFiles(wildcardfilter);
|
||||
if (getWorkerPane() != null) {
|
||||
if (directory.length == 0) {
|
||||
((ITestCenterPane) getWorkerPane()).clearFiles();
|
||||
}
|
||||
((ITestCenterPane) getWorkerPane()).setDirectoryName(sourceDirectory);
|
||||
((ITestCenterPane) getWorkerPane()).setFiles(directory);
|
||||
}
|
||||
executeScriptServerMenuItem.setEnabled(false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,183 @@
|
||||
/*
|
||||
* Copyright (c) 2016 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.simulation;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.itac.mes.config.domain.Parameter;
|
||||
import com.itac.mes.datainterface.ConfigurationException;
|
||||
import com.itac.mes.datainterface.ParameterUpdateTool;
|
||||
import com.itac.mes.datainterface.annotations.AInit;
|
||||
import com.itac.mes.datainterface.annotations.AInstantiationType;
|
||||
import com.itac.mes.datainterface.annotations.AParamValue;
|
||||
import com.itac.mes.datainterface.annotations.AParameter;
|
||||
import com.itac.mes.datainterface.annotations.InstantiationType;
|
||||
import com.itac.mes.datainterface.datasource.directory.WildCardFilter;
|
||||
import com.itac.mes.datainterface.filehandler.FileException;
|
||||
import com.itac.mes.datainterface.filehandler.FileTools;
|
||||
import com.itac.mes.datainterface.gui.DataInterfaceMenuAction;
|
||||
import com.itac.mes.datainterface.gui.IWorkerPane;
|
||||
import com.itac.util.logging.LogHandler;
|
||||
import com.itac.util.logging.LogLevel;
|
||||
|
||||
@AInstantiationType(name = "testCenter", type = InstantiationType.MACHINESIMULATION)
|
||||
public class TestCenter extends DefaultMachineSimulation {
|
||||
public static final String ID_EXECUTE_SCRIPT = "executeScript";
|
||||
public static final String ID_RELOAD_SCRIPT = "reload";
|
||||
public static final String ID_SHOW_SCRIPT = "showScript";
|
||||
|
||||
private static final String SIMULATIONS_TESTCENTER = "simulation.testcenter";
|
||||
private static final String DESTINATION_DIRECTORY = SIMULATIONS_TESTCENTER + ".destinationDirectory";
|
||||
private static final String SOURCE_DIRECTORY = SIMULATIONS_TESTCENTER + ".sourceDirectory";
|
||||
private static final String FILE_MASK = SIMULATIONS_TESTCENTER + ".fileMask";
|
||||
|
||||
@AParameter(name = SIMULATIONS_TESTCENTER, description = "TestCenter",
|
||||
visibility = "MachineSimulation=com.itac.mes.datainterface.simulation.TestCenter",
|
||||
dimPath = ParameterUpdateTool.DEFAULT_DIM_PATH)
|
||||
private Parameter paramSource;
|
||||
@AParameter(name = DESTINATION_DIRECTORY, parent = SIMULATIONS_TESTCENTER, description = "Zielverzeichnis fuer Testdateien",
|
||||
type = String.class)
|
||||
private Parameter paramDestDir;
|
||||
@AParameter(name = SOURCE_DIRECTORY, parent = SIMULATIONS_TESTCENTER, description = "Quellverzeichnis fuer Testdateien",
|
||||
type = String.class)
|
||||
private Parameter paramSourceDir;
|
||||
@AParameter(name = FILE_MASK, parent = SIMULATIONS_TESTCENTER, description = "Dateifilter fuer Testdateien", type = String.class)
|
||||
private Parameter paramFileMask;
|
||||
|
||||
private File sourceDirectory;
|
||||
private File destDirectory;
|
||||
private WildCardFilter wildcardfilter;
|
||||
|
||||
// die einzelnen Menu-Items werden hier deklariert, und spaeter geadded
|
||||
private DataInterfaceMenuAction reloadDirectoryMenuItem = new DataInterfaceMenuAction("reload Directory", "reload",
|
||||
ID_RELOAD_SCRIPT);
|
||||
private DataInterfaceMenuAction executeScriptServerMenuItem = new DataInterfaceMenuAction("run script", "executeScript",
|
||||
ID_EXECUTE_SCRIPT);
|
||||
private DataInterfaceMenuAction showScriptMenuItem = new DataInterfaceMenuAction("show script", "showScript", ID_SHOW_SCRIPT);
|
||||
|
||||
public TestCenter() {
|
||||
super();
|
||||
addSimMenuItem(reloadDirectoryMenuItem);
|
||||
addSimMenuItem(executeScriptServerMenuItem);
|
||||
addSimMenuItem(showScriptMenuItem);
|
||||
}
|
||||
|
||||
@AParamValue(value = SOURCE_DIRECTORY)
|
||||
public void setSourceDirectory(String value) throws ConfigurationException {
|
||||
File directory = new File(value);
|
||||
getConfiguration().checkDirectory(directory);
|
||||
sourceDirectory = directory;
|
||||
}
|
||||
|
||||
@AParamValue(value = DESTINATION_DIRECTORY)
|
||||
public void setDestinationDirectory(String value) throws ConfigurationException {
|
||||
File directory = new File(value);
|
||||
getConfiguration().checkDirectory(directory);
|
||||
destDirectory = directory;
|
||||
}
|
||||
|
||||
@AParamValue(value = FILE_MASK)
|
||||
public void setFileMask(String value) throws ConfigurationException {
|
||||
try {
|
||||
wildcardfilter = new WildCardFilter(value);
|
||||
} catch (Exception exception) {
|
||||
throw new ConfigurationException("Can not create Filename filter from expression '" + value + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@AInit
|
||||
protected void atInit() {
|
||||
reloadDirectoryMenuItem.setEnabled(getConfigurationResult() == OK);
|
||||
if (getConfigurationResult() == OK) {
|
||||
reload();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param machineSimPane
|
||||
*/
|
||||
public void setSimulationPane(IWorkerPane machineSimPane) {
|
||||
super.setSimulationPane(machineSimPane);
|
||||
reload();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(DataInterfaceMenuAction menuAction) {
|
||||
//
|
||||
if (menuAction == executeScriptServerMenuItem) {
|
||||
executeScriptServerMenuItem.setEnabled(false);
|
||||
}
|
||||
super.execute(menuAction);
|
||||
}
|
||||
|
||||
// remotely callable function
|
||||
protected void showScript() {
|
||||
File[] selectedValues = ((ITestCenterPane) getWorkerPane()).getSelectedScripts();
|
||||
if (selectedValues == null || selectedValues.length == 0) {
|
||||
return;
|
||||
}
|
||||
// alle dies values sind Files; diese muessen in das Zielverzeichnis kopiert werden
|
||||
for (File script : selectedValues) {
|
||||
try {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
FileReader fr = new FileReader(script);
|
||||
String line;
|
||||
BufferedReader f;
|
||||
f = new BufferedReader(fr);
|
||||
while ((line = f.readLine()) != null) {
|
||||
buffer.append(line).append("\n");
|
||||
}
|
||||
f.close();
|
||||
((ITestCenterPane) getWorkerPane()).setScriptText(buffer.toString());
|
||||
} catch (IOException e) {
|
||||
LogHandler.log(LogLevel.ERROR, "Error reading the file " + script.getAbsolutePath() + ":\n" + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
executeScriptServerMenuItem.setEnabled(true);
|
||||
}
|
||||
|
||||
// remotely callable function
|
||||
protected void executeScript() {
|
||||
File[] selectedValues = ((ITestCenterPane) getWorkerPane()).getSelectedScripts();
|
||||
if (selectedValues.length == 0) {
|
||||
return;
|
||||
}
|
||||
// alle dies values sind Files; diese muessen in das Zielverzeichnis kopiert werden
|
||||
for (File script : selectedValues) {
|
||||
try {
|
||||
FileTools.copyFile(script, destDirectory, overrideExistingfiles);
|
||||
} catch (FileException e1) {
|
||||
writeMessage(LogLevel.ERROR, e1.getMessage());
|
||||
LogHandler.log(getClass().getSimpleName(), LogLevel.ERROR, "copy file in script execution failed", e1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* remotely callable function
|
||||
* <p>
|
||||
* Neu laden des konfiguriereten sourceDirectory Verzeichnisses und anzeigen des Ergebnisses in der Liste
|
||||
*/
|
||||
private void reload() {
|
||||
LogHandler.debug("reload directory '" + sourceDirectory.getAbsolutePath() + " '");
|
||||
|
||||
File[] directory = sourceDirectory.listFiles(wildcardfilter);
|
||||
if (getWorkerPane() != null) {
|
||||
if (directory.length == 0) {
|
||||
((ITestCenterPane) getWorkerPane()).clearFiles();
|
||||
}
|
||||
((ITestCenterPane) getWorkerPane()).setDirectoryName(sourceDirectory);
|
||||
((ITestCenterPane) getWorkerPane()).setFiles(directory);
|
||||
}
|
||||
executeScriptServerMenuItem.setEnabled(false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
#20101118 frankp
|
||||
com.itac.mes.datainterface.simulation.TestCenter
|
||||
#com.itac.mes.datainterface.simulation.DatabaseSimulation
|
||||
5
interface/testcenter/target/classes/META-INF/MANIFEST.MF
Normal file
5
interface/testcenter/target/classes/META-INF/MANIFEST.MF
Normal file
@@ -0,0 +1,5 @@
|
||||
Manifest-Version: 1.0
|
||||
Built-By: frankp
|
||||
Build-Jdk: 1.8.0_111
|
||||
Created-By: Maven Integration for Eclipse
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#Generated by Maven Integration for Eclipse
|
||||
#Tue Oct 13 14:05:20 CEST 2020
|
||||
version=9.10.00beta-DEVELOPER
|
||||
groupId=com.itac.interface.interfaces
|
||||
m2e.projectName=data-interface-testcenter
|
||||
m2e.projectLocation=C\:\\projects_jee\\imsinterface\\mainline\\interface\\testcenter
|
||||
artifactId=data-interface-testcenter
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.itac.interface.interfaces</groupId>
|
||||
<artifactId>data-interface-testcenter</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>data-interface-testcenter</name>
|
||||
<version>${mes.interface.version}</version>
|
||||
<parent>
|
||||
<groupId>com.itac.interface</groupId>
|
||||
<artifactId>data-interface</artifactId>
|
||||
<version>${mes.interface.version}</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.itac.interface.interfaces</groupId>
|
||||
<artifactId>data-interface-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itac.product</groupId>
|
||||
<artifactId>util-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itac.interface.interfaces</groupId>
|
||||
<artifactId>data-interface-xmlapi</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itac.interface.interfaces</groupId>
|
||||
<artifactId>data-interface-basic</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,3 @@
|
||||
#20101118 frankp
|
||||
com.itac.mes.datainterface.simulation.TestCenter
|
||||
#com.itac.mes.datainterface.simulation.DatabaseSimulation
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
#Generated by Maven
|
||||
#Tue Jun 12 15:12:13 CEST 2018
|
||||
version=9.00.01alpha-DEVELOPER
|
||||
groupId=com.itac.interface.interfaces
|
||||
artifactId=data-interface-testcenter
|
||||
Reference in New Issue
Block a user