From be992af3e8a3acb13c91e0498ee038490ff8743d Mon Sep 17 00:00:00 2001
From: Adam Knapp <knappadam5@gmail.com>
Date: Wed, 23 Dec 2020 12:58:41 +0100
Subject: [PATCH] Correcting setCodeSection

Signed-off-by: Adam Knapp <knappadam5@gmail.com>
---
 .../designer/AST/TTCN3/statements/Break_Statement.java    | 7 +------
 .../designer/AST/TTCN3/statements/Continue_Statement.java | 7 +------
 .../AST/TTCN3/statements/Definition_Statement.java        | 8 +-------
 .../designer/AST/TTCN3/statements/Repeat_Statement.java   | 6 ++----
 4 files changed, 5 insertions(+), 23 deletions(-)

diff --git a/org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/statements/Break_Statement.java b/org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/statements/Break_Statement.java
index 8d126eae3f..de6e0d955c 100644
--- a/org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/statements/Break_Statement.java
+++ b/org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/statements/Break_Statement.java
@@ -56,12 +56,7 @@ public final class Break_Statement extends Statement {
 	@Override
 	/** {@inheritDoc} */
 	public void setCodeSection(final CodeSectionType codeSection) {
-		if (loop_stmt != null) {
-			loop_stmt.setCodeSection(codeSection);
-		}
-		if (altGuards != null) {
-			altGuards.setCodeSection(codeSection);
-		}
+		// Do nothing
 	}
 
 	@Override
diff --git a/org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/statements/Continue_Statement.java b/org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/statements/Continue_Statement.java
index 37d5a995c7..a87c6866da 100644
--- a/org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/statements/Continue_Statement.java
+++ b/org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/statements/Continue_Statement.java
@@ -57,12 +57,7 @@ public final class Continue_Statement extends Statement {
 	@Override
 	/** {@inheritDoc} */
 	public void setCodeSection(final CodeSectionType codeSection) {
-		if (loop_stmt != null) {
-			loop_stmt.setCodeSection(codeSection);
-		}
-		if (altGuards != null) {
-			altGuards.setCodeSection(codeSection);
-		}
+		// Do nothing
 	}
 
 	@Override
diff --git a/org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/statements/Definition_Statement.java b/org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/statements/Definition_Statement.java
index c70aea37aa..9b9a0f6237 100644
--- a/org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/statements/Definition_Statement.java
+++ b/org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/statements/Definition_Statement.java
@@ -100,13 +100,7 @@ public final class Definition_Statement extends Statement {
 	@Override
 	/** {@inheritDoc} */
 	public void setCodeSection(final CodeSectionType codeSection) {
-		// TODO setCodeSection for Definition is not available
-		if (definition != null) {
-			; //definition.setCodeSection(codeSection);
-		}
-		if (myDefinition != null) {
-			; //myDefinition.setCodeSection(codeSection);
-		}
+		// Do nothing
 	}
 
 	@Override
diff --git a/org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/statements/Repeat_Statement.java b/org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/statements/Repeat_Statement.java
index a25ffdfaa8..f09dff29b3 100644
--- a/org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/statements/Repeat_Statement.java
+++ b/org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/statements/Repeat_Statement.java
@@ -21,7 +21,7 @@ import org.eclipse.titan.designer.parsers.ttcn3parser.TTCN3ReparseUpdater;
  * */
 public final class Repeat_Statement extends Statement {
 	private static final String INCORRECTUSAGE = "Repeat statement cannot be used outside alt statements,"
-			+ " altsteps or resonse and exception handling part of call operations";
+			+ " altsteps or response and exception handling part of call operations";
 
 	private static final String STATEMENT_NAME = "repeat";
 
@@ -54,9 +54,7 @@ public final class Repeat_Statement extends Statement {
 	@Override
 	/** {@inheritDoc} */
 	public void setCodeSection(final CodeSectionType codeSection) {
-		if (myAltGuards != null) {
-			myAltGuards.setCodeSection(codeSection);
-		}
+		// Do nothing
 	}
 
 	@Override
-- 
GitLab