diff --git a/src/main/java/tmltranslator/patternhandling/PatternConfig2Json.java b/src/main/java/tmltranslator/patternhandling/PatternConfig2Json.java index 316759b13993576593ceb5c5973765176e27a969..be9b3c1b7ac37bc67e1301482c6594589dfb6a2a 100644 --- a/src/main/java/tmltranslator/patternhandling/PatternConfig2Json.java +++ b/src/main/java/tmltranslator/patternhandling/PatternConfig2Json.java @@ -114,18 +114,17 @@ public class PatternConfig2Json { public PatternConfiguration getPaternConfiguration() { return patternConfiguration; } - + public PatternConfig2Json(String _patternPathName, PatternConfiguration _patternConfiguration) { - this.patternConfigurationPathName = _patternPathName; - this.patternConfiguration = _patternConfiguration; - } + this.patternConfigurationPathName = _patternPathName; + this.patternConfiguration = _patternConfiguration; + } public PatternConfig2Json(String _patternPathName) { - this.patternConfigurationPathName = _patternPathName; + this.patternConfigurationPathName = _patternPathName; this.patternConfiguration = new PatternConfiguration(); - } + } - public void patternConfiguration2Json() { try { FileWriter file = new FileWriter(patternConfigurationPathName); diff --git a/src/main/java/tmltranslator/patternhandling/PatternCreation.java b/src/main/java/tmltranslator/patternhandling/PatternCreation.java index 71dca2d4fbbf2e11dd87ec28a87012628a5a89ab..73225b804232dd9f48246f1c7037c1d384044f6d 100644 --- a/src/main/java/tmltranslator/patternhandling/PatternCreation.java +++ b/src/main/java/tmltranslator/patternhandling/PatternCreation.java @@ -81,32 +81,32 @@ public class PatternCreation implements Runnable { public final static String INTERNALPORTS = "internalPorts"; public final static String ATTRIBUTES = "attributes"; - private List<String> selectedTasks; - private String patternName; + private List<String> selectedTasks; + private String patternName; private String patternsPath; - private TMLMapping<?> tmap; + private TMLMapping<?> tmap; public PatternCreation(List<String> _selectedTasks, String _patternName, String _patternsPath, TMLMapping<?> tmap) { - this.selectedTasks = _selectedTasks; - this.patternName = _patternName; - this.patternsPath = _patternsPath; - this.tmap = tmap; - } + this.selectedTasks = _selectedTasks; + this.patternName = _patternName; + this.patternsPath = _patternsPath; + this.tmap = tmap; + } - public void startThread() { - Thread t = new Thread(this); - t.start(); - try { - t.join(); - } - catch (Exception e) { - TraceManager.addDev("Error in Pattern Creation Thread"); - } - return; - } + public void startThread() { + Thread t = new Thread(this); + t.start(); + try { + t.join(); + } + catch (Exception e) { + TraceManager.addDev("Error in Pattern Creation Thread"); + } + return; + } public void run() { - TraceManager.addDev("Creating Pattern"); + TraceManager.addDev("Creating Pattern"); if (tmap == null) { return; } @@ -135,7 +135,7 @@ public class PatternCreation implements Runnable { } } - } + } @SuppressWarnings("unchecked") public boolean generateTMLTxt(String _title) { diff --git a/src/main/java/tmltranslator/patternhandling/PatternIntegration.java b/src/main/java/tmltranslator/patternhandling/PatternIntegration.java index 5f710b0c3414983612c1dab564322584441e5285..58ab3ce81574422318423837d629477ce71b3db9 100644 --- a/src/main/java/tmltranslator/patternhandling/PatternIntegration.java +++ b/src/main/java/tmltranslator/patternhandling/PatternIntegration.java @@ -62,8 +62,8 @@ public class PatternIntegration implements Runnable { private String patternName; private PatternConfiguration patternConfiguration; private LinkedHashMap<String, TaskPattern> patternTasks; - private TMLMapping<?> tmapModel; - private TMLMapping<?> tmapPattern; + private TMLMapping<?> tmapModel; + private TMLMapping<?> tmapPattern; private HashMap<String, String> tasksClonedIntoModel = new HashMap<String, String>(); private HashMap<Entry<String, String>, String> channelsClonedIntoModel = new HashMap<Entry<String, String>, String>(); @@ -75,28 +75,28 @@ public class PatternIntegration implements Runnable { private HashMap<TMLTask, List<TMLActivityElement>> clonedTasksToRemElems = new HashMap<TMLTask, List<TMLActivityElement>>(); public PatternIntegration(String _appTab, String _patternPath, String _patternName, PatternConfiguration _patternConfiguration, LinkedHashMap<String, TaskPattern> _patternTasks, TMLMapping<?> _tmapModel) { - this.appTab = _appTab; - this.patternPath = _patternPath; - this.patternName = _patternName; - this.patternConfiguration = _patternConfiguration; - this.patternTasks = _patternTasks; - this.tmapModel = _tmapModel; - } + this.appTab = _appTab; + this.patternPath = _patternPath; + this.patternName = _patternName; + this.patternConfiguration = _patternConfiguration; + this.patternTasks = _patternTasks; + this.tmapModel = _tmapModel; + } - public TMLMapping<?> startThread() { - Thread t = new Thread(this); - t.start(); - try { - t.join(); - } - catch (Exception e) { - TraceManager.addDev("Error in Pattern Integration Thread"); - } - return tmapModel; - } + public TMLMapping<?> startThread() { + Thread t = new Thread(this); + t.start(); + try { + t.join(); + } + catch (Exception e) { + TraceManager.addDev("Error in Pattern Integration Thread"); + } + return tmapModel; + } public void run() { - TraceManager.addDev("Integrating Pattern"); + TraceManager.addDev("Integrating Pattern"); if (tmapModel == null) { return; } @@ -119,7 +119,7 @@ public class PatternIntegration implements Runnable { tmapModel = mapChannelsInArchAuto(tmapModel, tmapPattern, patternConfiguration.getTasksMapping(), patternConfiguration.getChannelsMapping(), patternConfiguration, patternTasks); tmapModel = generateSecurityForChannels(tmapModel, tmapPattern, patternConfiguration, patternTasks, appTab); tmapModel = putBackPrefixNames(tmapModel, appTab); - } + } public TMLMapping<?> addClonedTask(TMLMapping<?> _tmapModel, PatternConfiguration _patternConfiguration) { TMLModeling<?> _tmlmModel = _tmapModel.getTMLModeling(); diff --git a/src/main/java/tmltranslator/patternhandling/SecurityGenerationForTMAP.java b/src/main/java/tmltranslator/patternhandling/SecurityGenerationForTMAP.java index 05da50072671cc83fade4553583f820982d405c7..f8636bcef755b4fa96536aff5279c0cb2b4d7cd2 100644 --- a/src/main/java/tmltranslator/patternhandling/SecurityGenerationForTMAP.java +++ b/src/main/java/tmltranslator/patternhandling/SecurityGenerationForTMAP.java @@ -446,11 +446,11 @@ public class SecurityGenerationForTMAP implements Runnable { if (!toSecureRev.get(chan.getDestinationTask()).contains(chan.getOriginTask())) { toSecureRev.get(chan.getDestinationTask()).add(chan.getOriginTask()); } - /*} - else { - TMLChannel chantmp = oldmodel.getChannelByShortName("__"+chan.getName()); - System.out.println("Channel found "+ chantmp); - }*/ + /*} + else { + TMLChannel chantmp = oldmodel.getChannelByShortName("__"+chan.getName()); + System.out.println("Channel found "+ chantmp); + }*/ } if (hsmTasks.contains(chan.getOriginTask().getName().split("__")[1])) { @@ -505,11 +505,11 @@ public class SecurityGenerationForTMAP implements Runnable { for (TMLTask dest : chan.getDestinationTasks()) { if (chan.isEnsureConf() && nonConf) { toSecure.get(orig).add(dest); - /*if (chan.checkAuth && autoStrongAuth) { - if (!toSecureRev.get(dest).contains(orig)) { - toSecureRev.get(dest).add(orig); - } - }*/ + /*if (chan.checkAuth && autoStrongAuth) { + if (!toSecureRev.get(dest).contains(orig)) { + toSecureRev.get(dest).add(orig); + } + }*/ if (hsmTasks.contains(orig.getName().split("__")[1])) { SecurityPattern secPattern = new SecurityPattern("hsmSec_" + secName, SecurityPattern.SYMMETRIC_ENC_PATTERN, overhead, "", encComp, decComp, "", "", ""); secPattern.originTask = "HSM_" + taskHSMMap.get(orig.getName().replaceAll(title + "__", "")); @@ -519,10 +519,10 @@ public class SecurityGenerationForTMAP implements Runnable { hsmChannelMap.get(taskHSMMap.get(orig.getName().split("__")[1])).add(hsmchan); hsmSecOutChannels.get(orig).add(chanName); - /* if (chan.checkAuth && autoStrongAuth) { - nonceOutChannels.get(orig).add(chanName); - hsmchan.nonceName="nonce_" + dest.getName().split("__")[1] + "_" + orig.getName().split("__")[1]; - }*/ + /* if (chan.checkAuth && autoStrongAuth) { + nonceOutChannels.get(orig).add(chanName); + hsmchan.nonceName="nonce_" + dest.getName().split("__")[1] + "_" + orig.getName().split("__")[1]; + }*/ } } else { if (!secOutChannels.get(orig).contains(chanName)) { @@ -530,9 +530,9 @@ public class SecurityGenerationForTMAP implements Runnable { SecurityPattern secPattern = new SecurityPattern("autoEncrypt_" + secName, SecurityPattern.SYMMETRIC_ENC_PATTERN, overhead, "", encComp, decComp, "", "", ""); secPattern.originTask = orig.getName().replaceAll(title + "__", ""); channelSecMap.put(chanName, secPattern); - /* if (chan.checkAuth && autoStrongAuth) { - nonceOutChannels.get(orig).add(chanName); - }*/ + /* if (chan.checkAuth && autoStrongAuth) { + nonceOutChannels.get(orig).add(chanName); + }*/ } } @@ -541,34 +541,34 @@ public class SecurityGenerationForTMAP implements Runnable { HSMChannel hsmchan = new HSMChannel(chanName, dest.getName().split("__")[1], HSMChannel.DEC); hsmChannelMap.get(taskHSMMap.get(dest.getName().split("__")[1])).add(hsmchan); hsmSecInChannels.get(dest).add(chanName); - /* if (chan.checkAuth && autoStrongAuth) { - nonceInChannels.get(dest).add(chanName); - hsmchan.nonceName="nonce_" + dest.getName().split("__")[1] + "_" + orig.getName().split("__")[1]; - }*/ + /* if (chan.checkAuth && autoStrongAuth) { + nonceInChannels.get(dest).add(chanName); + hsmchan.nonceName="nonce_" + dest.getName().split("__")[1] + "_" + orig.getName().split("__")[1]; + }*/ } } else { if (!secInChannels.get(dest).contains(chanName)) { secInChannels.get(dest).add(chanName); - /*if (chan.checkAuth && autoStrongAuth) { - nonceInChannels.get(dest).add(chanName); - }*/ + /*if (chan.checkAuth && autoStrongAuth) { + nonceInChannels.get(dest).add(chanName); + }*/ } } } else if (chan.isEnsureWeakAuth() && nonAuth) { toSecure.get(orig).add(dest); - /* if (autoStrongAuth) { - /* if (chan.getOriginTask().getReferenceObject() instanceof TMLCPrimitiveComponent && chan.getDestinationTask().getReferenceObject() instanceof TMLCPrimitiveComponent) {*/ - /*if (!toSecureRev.get(dest).contains(orig)) { - toSecureRev.get(dest).add(orig); - }*/ - /*} - else { - TMLChannel chantmp = oldmodel.getChannelByShortName("__"+chan.getName()); - System.out.println("Channel found "+ chantmp); - } - - }*/ + /* if (autoStrongAuth) { + /* if (chan.getOriginTask().getReferenceObject() instanceof TMLCPrimitiveComponent && chan.getDestinationTask().getReferenceObject() instanceof TMLCPrimitiveComponent) {*/ + /*if (!toSecureRev.get(dest).contains(orig)) { + toSecureRev.get(dest).add(orig); + }*/ + /*} + else { + TMLChannel chantmp = oldmodel.getChannelByShortName("__"+chan.getName()); + System.out.println("Channel found "+ chantmp); + } + + }*/ if (hsmTasks.contains(orig.getName().split("__")[1])) { SecurityPattern secPattern = new SecurityPattern("hsmSec_" + secName, SecurityPattern.SYMMETRIC_ENC_PATTERN, overhead, "", encComp, decComp, "", "", ""); secPattern.originTask = "HSM_" + taskHSMMap.get(orig.getName().replaceAll(title + "__", "")); @@ -578,10 +578,10 @@ public class SecurityGenerationForTMAP implements Runnable { hsmChannelMap.get(taskHSMMap.get(orig.getName().split("__")[1])).add(hsmchan); hsmSecOutChannels.get(orig).add(chanName); - /*if (autoStrongAuth) { - nonceOutChannels.get(orig).add(chanName); - hsmchan.nonceName="nonce_" + dest.getName().split("__")[1] + "_" + orig.getName().split("__")[1]; - }*/ + /*if (autoStrongAuth) { + nonceOutChannels.get(orig).add(chanName); + hsmchan.nonceName="nonce_" + dest.getName().split("__")[1] + "_" + orig.getName().split("__")[1]; + }*/ } } else { if (!macInChannels.get(orig).contains(chanName)) { @@ -589,9 +589,9 @@ public class SecurityGenerationForTMAP implements Runnable { SecurityPattern secPattern = new SecurityPattern("autoEncrypt_" + secName, SecurityPattern.SYMMETRIC_ENC_PATTERN, overhead, "", encComp, decComp, "", "", ""); secPattern.originTask = orig.getName().replaceAll(title + "__", ""); channelSecMap.put(chanName, secPattern); - /* if (autoStrongAuth) { - nonceOutChannels.get(orig).add(chanName); - }*/ + /* if (autoStrongAuth) { + nonceOutChannels.get(orig).add(chanName); + }*/ } } @@ -601,17 +601,17 @@ public class SecurityGenerationForTMAP implements Runnable { HSMChannel hsmchan = new HSMChannel(chanName, dest.getName().split("__")[1], HSMChannel.DEC); hsmChannelMap.get(taskHSMMap.get(dest.getName().split("__")[1])).add(hsmchan); hsmSecInChannels.get(dest).add(chanName); - /*if (chan.checkAuth && autoStrongAuth) { - nonceInChannels.get(dest).add(chanName); - hsmchan.nonceName="nonce_" + dest.getName().split("__")[1] + "_" + orig.getName().split("__")[1]; - }*/ + /*if (chan.checkAuth && autoStrongAuth) { + nonceInChannels.get(dest).add(chanName); + hsmchan.nonceName="nonce_" + dest.getName().split("__")[1] + "_" + orig.getName().split("__")[1]; + }*/ } } else { if (!secInChannels.get(dest).contains(chanName)) { secInChannels.get(dest).add(chanName); - /*if (chan.checkAuth && autoStrongAuth) { - nonceInChannels.get(dest).add(chanName); - }*/ + /*if (chan.checkAuth && autoStrongAuth) { + nonceInChannels.get(dest).add(chanName); + }*/ } } } @@ -1057,7 +1057,7 @@ public class SecurityGenerationForTMAP implements Runnable { //Receive any nonces if ensuring authenticity TMLReadChannel rd = new TMLReadChannel("", taskAD.getReferenceObject()); //System.out.println("tmlc " + tmlc); - // System.out.println("Checking "+ tmlc.getDestinationTask() + " " + tmlc.getOriginTask()); + //System.out.println("Checking "+ tmlc.getDestinationTask() + " " + tmlc.getOriginTask()); List<TMLChannel> matches = tmlmodel.getChannels(tmlc.getDestinationTask(), tmlc.getOriginTask()); if (matches.size() > 0) { diff --git a/src/main/java/tmltranslator/patternhandling/TMRGeneration.java b/src/main/java/tmltranslator/patternhandling/TMRGeneration.java index 1bb60747a4773e1d14a98010d207cf63570c521d..0ef3a7c8c22c89ba6faaaab912204b1ce1a83d66 100644 --- a/src/main/java/tmltranslator/patternhandling/TMRGeneration.java +++ b/src/main/java/tmltranslator/patternhandling/TMRGeneration.java @@ -53,36 +53,36 @@ import tmltranslator.*; import java.util.*; public class TMRGeneration implements Runnable { - private Map<String, List<String>> selectedSensorsTasks; - private String selectedRecieverTask; + private Map<String, List<String>> selectedSensorsTasks; + private String selectedRecieverTask; private String interpretersCompTime; private String voterCompTime; private String voterTimeOut; - private TMLMapping<?> tmap; + private TMLMapping<?> tmap; public TMRGeneration(Map<String, List<String>> selectedSensorsTasks, String selectedRecieverTask, String interpretersCompTime, String voterCompTime, String voterTimeOut, TMLMapping<?> tmap) { - this.selectedSensorsTasks = selectedSensorsTasks; - this.selectedRecieverTask = selectedRecieverTask; - this.interpretersCompTime = interpretersCompTime; - this.voterCompTime = voterCompTime; - this.voterTimeOut = voterTimeOut; - this.tmap = tmap; - } + this.selectedSensorsTasks = selectedSensorsTasks; + this.selectedRecieverTask = selectedRecieverTask; + this.interpretersCompTime = interpretersCompTime; + this.voterCompTime = voterCompTime; + this.voterTimeOut = voterTimeOut; + this.tmap = tmap; + } - public TMLMapping<?> startThread() { - Thread t = new Thread(this); - t.start(); - try { - t.join(); - } - catch (Exception e) { - TraceManager.addDev("Error in TMR Generation Thread"); - } - return tmap; - } + public TMLMapping<?> startThread() { + Thread t = new Thread(this); + t.start(); + try { + t.join(); + } + catch (Exception e) { + TraceManager.addDev("Error in TMR Generation Thread"); + } + return tmap; + } public void run() { - TraceManager.addDev("Adding TMR"); + TraceManager.addDev("Adding TMR"); if (tmap == null) { return; } @@ -139,7 +139,7 @@ public class TMRGeneration implements Runnable { } tmap = tmrIntegration(tmap, channelsSensorReceiverList, parameters); } - } + } TMLMapping<?> duplicateSensor(TMLMapping<?> _tmap, List<TMLChannel> _channelsBetweenSensorAndReceiver, String newSensorName) { diff --git a/src/main/java/ui/window/JDialogPatternHandling.java b/src/main/java/ui/window/JDialogPatternHandling.java index fa39890726f2cb642be67e7f11be892fb99f8c7e..3170bda6c17875e2f4b01d233815cd65b8ca0645 100644 --- a/src/main/java/ui/window/JDialogPatternHandling.java +++ b/src/main/java/ui/window/JDialogPatternHandling.java @@ -371,13 +371,13 @@ public class JDialogPatternHandling extends JDialog implements ActionListener, L jp01.add(labelSelectPattern, c01); //addComponent(jp01, labelSelectPattern, 0, curY, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH); jListNoSelectedTasksAsPattern = new JList<String>(noSelectedTasksAsPattern); - jPanelPatternSelection = new JPanel(); - jPanelPatternSelection.setPreferredSize(new Dimension(250, 200)); - GridBagConstraints c02 = new GridBagConstraints(); - c02.gridwidth = 1; - c02.gridheight = 1; - c02.fill= GridBagConstraints.BOTH; - jListNoSelectedTasksAsPattern.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); + jPanelPatternSelection = new JPanel(); + jPanelPatternSelection.setPreferredSize(new Dimension(250, 200)); + GridBagConstraints c02 = new GridBagConstraints(); + c02.gridwidth = 1; + c02.gridheight = 1; + c02.fill= GridBagConstraints.BOTH; + jListNoSelectedTasksAsPattern.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); jListNoSelectedTasksAsPattern.addListSelectionListener(this); JScrollPane scrollPane1 = new JScrollPane(jListNoSelectedTasksAsPattern); @@ -394,14 +394,14 @@ public class JDialogPatternHandling extends JDialog implements ActionListener, L buttonAddAllTasksAsPattern.addActionListener(this); buttonAddAllTasksAsPattern.setActionCommand("allTasksSelectedAsPattern"); buttonPanel.add(buttonAddAllTasksAsPattern, c13); - //buttonAddAllTasksAsPattern.setEnabled(false); + //buttonAddAllTasksAsPattern.setEnabled(false); buttonAddSelectedTasksAsPattern = new JButton(IconManager.imgic48); buttonAddSelectedTasksAsPattern.setPreferredSize(new Dimension(50, 25)); buttonAddSelectedTasksAsPattern.addActionListener(this); buttonAddSelectedTasksAsPattern.setActionCommand("addTaskAsPattern"); buttonPanel.add(buttonAddSelectedTasksAsPattern, c13); - //buttonAddSelectedTasksAsPattern.setEnabled(false); + //buttonAddSelectedTasksAsPattern.setEnabled(false); buttonPanel.add(new JLabel(" "), c13); @@ -410,7 +410,7 @@ public class JDialogPatternHandling extends JDialog implements ActionListener, L buttonRemoveSelectedTasksAsPattern.setPreferredSize(new Dimension(50, 25)); buttonRemoveSelectedTasksAsPattern.setActionCommand("removeTaskAsPattern"); buttonPanel.add(buttonRemoveSelectedTasksAsPattern, c13); - //buttonRemoveSelectedTasksAsPattern.setEnabled(false); + //buttonRemoveSelectedTasksAsPattern.setEnabled(false); buttonRemoveAllTasksAsPattern = new JButton(IconManager.imgic44); buttonRemoveAllTasksAsPattern.addActionListener(this); @@ -419,8 +419,8 @@ public class JDialogPatternHandling extends JDialog implements ActionListener, L buttonPanel.add(buttonRemoveAllTasksAsPattern, c13); jPanelPatternSelection.add(buttonPanel, c02); buttonPanel.setPreferredSize(new Dimension(50, 200)); - //buttonRemoveAllTasksAsPattern.setEnabled(false); - + //buttonRemoveAllTasksAsPattern.setEnabled(false); + jListSelectedTasksAsPattern = new JList<String>(selectedTasksAsPattern); jListSelectedTasksAsPattern.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); @@ -563,7 +563,7 @@ public class JDialogPatternHandling extends JDialog implements ActionListener, L jListConnectedPorts = new JList<String>(connectedPorts); - JPanel jPanelPatternIntegration = new JPanel(); + JPanel jPanelPatternIntegration = new JPanel(); jPanelPatternIntegration.setLayout(new GridBagLayout()); GridBagConstraints cPatternIntegration = new GridBagConstraints(); cPatternIntegration.gridx = 0; @@ -572,7 +572,7 @@ public class JDialogPatternHandling extends JDialog implements ActionListener, L cPatternIntegration.fill = GridBagConstraints.HORIZONTAL; cPatternIntegration.anchor = GridBagConstraints.LINE_START; - //jPanelPatternIntegration.setPreferredSize(new Dimension(600, 130)); + //jPanelPatternIntegration.setPreferredSize(new Dimension(600, 130)); jListConnectedPorts.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); jListConnectedPorts.addListSelectionListener(this); @@ -678,10 +678,10 @@ public class JDialogPatternHandling extends JDialog implements ActionListener, L //cPortConfigurationMain.gridwidth = GridBagConstraints.REMAINDER; jListConfigPorts = new JList<String>(configuredPorts); - JPanel jPanelConfigPorts = new JPanel(new GridBagLayout()); + JPanel jPanelConfigPorts = new JPanel(new GridBagLayout()); jPanelConfigPorts.setLayout(new GridBagLayout()); GridBagConstraints cConfigPorts = new GridBagConstraints(); - //jPanelConfigPorts.setPreferredSize(new Dimension(200, 100)); + //jPanelConfigPorts.setPreferredSize(new Dimension(200, 100)); jListConfigPorts.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); jListConfigPorts.addListSelectionListener(this); @@ -967,7 +967,7 @@ public class JDialogPatternHandling extends JDialog implements ActionListener, L jListMappedTasks = new JList<String>(mappedTasks); - JPanel jPanelMappedTasks = new JPanel(); + JPanel jPanelMappedTasks = new JPanel(); jPanelMappedTasks.setLayout(new GridBagLayout()); GridBagConstraints cMappedTasks = new GridBagConstraints(); cMappedTasks.gridx = 0; @@ -1077,7 +1077,7 @@ public class JDialogPatternHandling extends JDialog implements ActionListener, L jListMappedChannels = new JList<String>(mappedChannels); - JPanel jPanelMappedChannels = new JPanel(); + JPanel jPanelMappedChannels = new JPanel(); jPanelMappedChannels.setLayout(new GridBagLayout()); GridBagConstraints cMappedChannels = new GridBagConstraints(); cMappedChannels.gridx = 0; @@ -1163,7 +1163,7 @@ public class JDialogPatternHandling extends JDialog implements ActionListener, L jpCloneTask.add(jFieldNewClonedTaskName, cCloneTask); jListClonedTasks = new JList<String>(clonedTasks); - JPanel jPanelClonedTasks = new JPanel(); + JPanel jPanelClonedTasks = new JPanel(); jPanelClonedTasks.setLayout(new GridBagLayout()); GridBagConstraints cClonedTasks = new GridBagConstraints(); cClonedTasks.gridx = 0; diff --git a/ttool/src/test/java/cli/CLIPatternHandlingTest.java b/ttool/src/test/java/cli/CLIPatternHandlingTest.java index 5ee0b0ad13cb3b62dab5ea7939ff6267e43221e1..3226e0238906a3e14bcdcd05cf4101d32151d0ed 100644 --- a/ttool/src/test/java/cli/CLIPatternHandlingTest.java +++ b/ttool/src/test/java/cli/CLIPatternHandlingTest.java @@ -94,14 +94,13 @@ public class CLIPatternHandlingTest extends AbstractTest implements InterpreterO private StringBuilder outputResult; private List<String> errorOutputs = new ArrayList<String>(); - - public CLIPatternHandlingTest() { - // + public CLIPatternHandlingTest() { + // } - + public void exit(int reason) { - TraceManager.addDev("Exit reason=" + reason); - assertTrue(reason == 0); + TraceManager.addDev("Exit reason=" + reason); + assertTrue(reason == 0); } public void printError(String error) { @@ -110,11 +109,11 @@ public class CLIPatternHandlingTest extends AbstractTest implements InterpreterO } public void print(String s) { - TraceManager.addDev("info from interpreter:" + s); - outputResult.append(s); + TraceManager.addDev("info from interpreter:" + s); + outputResult.append(s); } - - @Test + + @Test public void testIntegratingTMR() throws Exception { String filePathCreateTMR = getBaseResourcesDir() + PATH_PATTERNS[0] + PATH_CLI_TO_CREATE_PATTERNS[0]; String script;