Bug 570888 - [Designer, Codegen] code cleanup should exclude some files

- Adapt to changes in Designer (removal of ILangCodegen2)

Change-Id: Ia60d1d75ccd4972426704af8b7f83159b2b4f097
Signed-off-by: Ansgar Radermacher <ansgar.radermacher@cea.fr>
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.cdteditor/src/org/eclipse/papyrus/robotics/ros2/cdteditor/sync/SyncRoboticsCDTtoModel.java b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.cdteditor/src/org/eclipse/papyrus/robotics/ros2/cdteditor/sync/SyncRoboticsCDTtoModel.java
index 12c4c26..553558c 100644
--- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.cdteditor/src/org/eclipse/papyrus/robotics/ros2/cdteditor/sync/SyncRoboticsCDTtoModel.java
+++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.cdteditor/src/org/eclipse/papyrus/robotics/ros2/cdteditor/sync/SyncRoboticsCDTtoModel.java
@@ -46,7 +46,6 @@
 import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.common.util.URI;
 import org.eclipse.papyrus.designer.languages.common.extensionpoints.ILangCodegen;
-import org.eclipse.papyrus.designer.languages.common.extensionpoints.ILangCodegen2;
 import org.eclipse.papyrus.designer.languages.common.extensionpoints.SyncInformation;
 import org.eclipse.papyrus.designer.languages.cpp.cdt.texteditor.Utils;
 import org.eclipse.papyrus.designer.languages.cpp.cdt.texteditor.listener.ModelListener;
@@ -158,10 +157,7 @@
 					IASTFunctionDeclarator declarator = definition.getDeclarator();
 					String unfilteredBody = getBody(itu, definition);
 					// get additional information about method synchronization from generator
-					SyncInformation syncInfo = null;
-					if (m_codegen instanceof ILangCodegen2) {
-						syncInfo = ((ILangCodegen2) m_codegen).getSyncInformation(name, unfilteredBody);
-					}
+					SyncInformation syncInfo = m_codegen.getSyncInformation(name, unfilteredBody);
 					String body = Utils.removeGenerated(unfilteredBody);
 					if (syncInfo == null || !syncInfo.isGenerated) {
 						// only update method, if it is not generated
diff --git a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.cdteditor/src/org/eclipse/papyrus/robotics/ros2/cdteditor/sync/SyncRoboticsModelToCDT.java b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.cdteditor/src/org/eclipse/papyrus/robotics/ros2/cdteditor/sync/SyncRoboticsModelToCDT.java
index a2ce774..0459358 100644
--- a/plugins/ros2/org.eclipse.papyrus.robotics.ros2.cdteditor/src/org/eclipse/papyrus/robotics/ros2/cdteditor/sync/SyncRoboticsModelToCDT.java
+++ b/plugins/ros2/org.eclipse.papyrus.robotics.ros2.cdteditor/src/org/eclipse/papyrus/robotics/ros2/cdteditor/sync/SyncRoboticsModelToCDT.java
@@ -27,7 +27,6 @@
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.papyrus.designer.languages.common.extensionpoints.ILangCodegen;
 import org.eclipse.papyrus.designer.languages.common.extensionpoints.ILangCodegen.FILE_KIND;
-import org.eclipse.papyrus.designer.languages.common.extensionpoints.ILangCodegen2;
 import org.eclipse.papyrus.designer.languages.common.extensionpoints.LanguageCodegen;
 import org.eclipse.papyrus.designer.languages.cpp.codegen.Constants;
 import org.eclipse.papyrus.designer.transformation.base.utils.ProjectManagement;
@@ -49,7 +48,6 @@
  */
 public class SyncRoboticsModelToCDT {
 
-	private static final String CPP_SUFFIX = "cpp"; //$NON-NLS-1$
 	/**
 	 * set to true, if a synchronization from an CDT editor to the model is active
 	 */
@@ -84,7 +82,7 @@
 		IFile cppFile = null;
 		try {
 
-			String suffix = (codegen instanceof ILangCodegen2) ? suffix = ((ILangCodegen2) codegen).getSuffix(FILE_KIND.BODY) : CPP_SUFFIX;
+			String suffix = codegen.getSuffix(FILE_KIND.BODY);
 
 			cppFile = targetProject.getFile(new Path(codegen.getFileName(targetProject, classifier) + Constants.DOT + suffix));