Index: trunk/modelicaml/org.openmodelica.modelicaml.gen.modelica/src/org/openmodelica/modelicaml/gen/modelica/popupactions/ValidateEntireModelicaMLModelAction.java
===================================================================
--- trunk/modelicaml/org.openmodelica.modelicaml.gen.modelica/src/org/openmodelica/modelicaml/gen/modelica/popupactions/ValidateEntireModelicaMLModelAction.java	(revision 1622)
+++ trunk/modelicaml/org.openmodelica.modelicaml.gen.modelica/src/org/openmodelica/modelicaml/gen/modelica/popupactions/ValidateEntireModelicaMLModelAction.java	(revision 1624)
@@ -63,5 +63,6 @@
 import org.eclipse.papyrus.infra.core.resource.uml.UmlModel;
 import org.eclipse.papyrus.infra.core.resource.uml.UmlUtils;
-import org.eclipse.papyrus.infra.core.utils.EditorUtils;
+import org.openmodelica.modelicaml.common.constants.Constants;
+import org.openmodelica.modelicaml.common.services.EditorServices;
 
 import fr.obeo.acceleo.chain.File;
@@ -73,5 +74,4 @@
 import fr.obeo.acceleo.gen.template.eval.LaunchManager;
 
-// TODO: Auto-generated Javadoc
 /**
  * The Class ValidateEntireModelicaMLModelAction.
@@ -92,5 +92,5 @@
 	
 	/** The model name. */
-	private String modelName = null;
+//	private String modelName = null;
 
 	// NullProgressMonitor monitor = null;
@@ -108,6 +108,5 @@
 	 */
 	public Object execute(ExecutionEvent event) throws ExecutionException {
-		TransactionalEditingDomain editingDomain = EditorUtils
-				.getTransactionalEditingDomain();
+		TransactionalEditingDomain editingDomain = EditorServices.getPapyrusEditingDomain();
 		editingDomain.getCommandStack().execute(getCommand(editingDomain));
 		return null;
@@ -129,19 +128,11 @@
 
 			for (IMarker marker : markers) {
-				if (marker.getType().equals("org.openmodelica.modelicaml.modelicamlMarker.validation")) {
+				if (marker.getType().equals(Constants.MARKERTYPE_VALIDATION_PROBLEM)) {
 					marker.delete();
 				}
-//				Object qualifiedName = marker.getAttribute(IMarker.LOCATION);
-//				Object markerMessage = marker.getAttribute(IMarker.MESSAGE);
-//
-//				if (qualifiedName.equals( ((NamedElement)sourceElement).getQualifiedName())
-//						&& markerMessage.equals(message)) {
-//					marker.delete();
-//				}
 			}
 
 		} catch (CoreException e) {
-			// TODO Auto-generated catch block
-			//e.printStackTrace();
+			
 		}
 	}
@@ -155,4 +146,5 @@
 	 * @return the command
 	 */
+	@SuppressWarnings("unchecked")
 	protected Command getCommand(TransactionalEditingDomain editingDomain) {
 
@@ -160,5 +152,5 @@
 		modelFileURI = umlModel.getResourceURI().toPlatformString(true);
 		
-		modelName = umlModel.getResourceURI().lastSegment();
+//		modelName = umlModel.getResourceURI().lastSegment();
 		//project = umlModel.getResourceURI().path().replace(modelName, "").replace("/resource/", "");
 		project = umlModel.getResource().getURI().segment(1);
Index: trunk/modelicaml/org.openmodelica.modelicaml.gen.modelica/src/org/openmodelica/modelicaml/gen/modelica/services/MoldelicaMLValidator.java
===================================================================
--- trunk/modelicaml/org.openmodelica.modelicaml.gen.modelica/src/org/openmodelica/modelicaml/gen/modelica/services/MoldelicaMLValidator.java	(revision 1622)
+++ trunk/modelicaml/org.openmodelica.modelicaml.gen.modelica/src/org/openmodelica/modelicaml/gen/modelica/services/MoldelicaMLValidator.java	(revision 1624)
@@ -44,9 +44,9 @@
 import org.eclipse.uml2.uml.Element;
 import org.eclipse.uml2.uml.NamedElement;
+import org.openmodelica.modelicaml.common.constants.Constants;
 
 import fr.obeo.acceleo.gen.AcceleoEcoreGenPlugin;
 
 
-// TODO: Auto-generated Javadoc
 /**
  * The Class MoldelicaMLValidator.
@@ -93,28 +93,5 @@
 		modelicaMLValidationAlert(elt, criticality, msg);
 	}
-	
-	/**
-	 * Message dialog.
-	 * 
-	 * @param elt
-	 *            the elt
-	 * @param title
-	 *            the title
-	 * @param msg
-	 *            the msg
-	 */
-	public static void messageDialog(Element elt, String title, String msg){
-		
-//		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-//		if (window != null) {
-//			MessageDialog.openError(window.getShell(), title, msg); //$NON-NLS-1$
-//		} else {
-//			//AcceleoUIActivator.getDefault().getLog().log(e.getStatus());
-//		}
-		
-		//Shell shell = new Shell();
-		//AcceleoEcoreGenPlugin.getDefault().getBundle().
-		//MessageDialog.openInformation(null, title, msg);
-	}
+
 	
 	/**
@@ -139,5 +116,5 @@
 		try {
 		//	IMarker marker = r.createMarker(EValidator.MARKER);
-			IMarker marker = r.createMarker("org.openmodelica.modelicaml.modelicamlMarker.validation");
+			IMarker marker = r.createMarker(Constants.MARKERTYPE_VALIDATION_PROBLEM);
 			
 			marker.setAttribute(IMarker.MESSAGE, msg);
@@ -185,5 +162,5 @@
 		try {
 		//	IMarker marker = r.createMarker(EValidator.MARKER);
-			IMarker marker = r.createMarker("org.openmodelica.modelicaml.modelicamlMarker.validation");
+			IMarker marker = r.createMarker(Constants.MARKERTYPE_VALIDATION_PROBLEM);
 			
 			marker.setAttribute(IMarker.MESSAGE, msg);
Index: trunk/modelicaml/org.openmodelica.modelicaml.gen.modelica/src/org/openmodelica/modelicaml/gen/modelica/services/validation/ValidateAssigmentsInAlgorithmSections.java
===================================================================
--- trunk/modelicaml/org.openmodelica.modelicaml.gen.modelica/src/org/openmodelica/modelicaml/gen/modelica/services/validation/ValidateAssigmentsInAlgorithmSections.java	(revision 1622)
+++ trunk/modelicaml/org.openmodelica.modelicaml.gen.modelica/src/org/openmodelica/modelicaml/gen/modelica/services/validation/ValidateAssigmentsInAlgorithmSections.java	(revision 1624)
@@ -115,10 +115,12 @@
 			result = "Single Assignment Rule Violation";
 			for (Object object : duplicates) {
-				msg = "NOT VALID(sar01): Variable " + "'" + object.toString()+ "' " +
-						"is set in multiple algorithm sections that are generated from ModelicaMLStateMachine, " +
-						"Algorithm(Code) or ConditionalAlgorithm(Diagram) elements. " +
-						"This violates the Modelica singe assigment rule. " +
-						"Note that redeclarations are not taken into account in this analysis.";
-				MoldelicaMLValidator.modelicaMLValidationAlert(classifier, "error", msg);
+				if (!object.toString().isEmpty()) {
+					msg = "NOT VALID(sar01): Variable " + "'" + object.toString()+ "' " +
+							"is set in multiple algorithm sections that are generated from ModelicaMLStateMachine, " +
+							"Algorithm(Code) or ConditionalAlgorithm(Diagram) elements. " +
+							"This violates the Modelica singe assigment rule. " +
+							"Note that redeclarations are not taken into account in this analysis.";
+					MoldelicaMLValidator.modelicaMLValidationAlert(classifier, "error", msg);
+				}
 			}
 		}
Index: trunk/modelicaml/org.openmodelica.modelicaml.gen.modelica/src/org/openmodelica/modelicaml/gen/modelica/validation/actions/LocateActionDelegate.java
===================================================================
--- trunk/modelicaml/org.openmodelica.modelicaml.gen.modelica/src/org/openmodelica/modelicaml/gen/modelica/validation/actions/LocateActionDelegate.java	(revision 1622)
+++ 	(revision )
@@ -1,150 +1,0 @@
-/*
- * This file is part of OpenModelica.
- *
- * Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC),
- * c/o Linköpings universitet, Department of Computer and Information Science,
- * SE-58183 Linköping, Sweden.
- *
- * All rights reserved.
- *
- * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR 
- * THIS OSMC PUBLIC LICENSE (OSMC-PL). 
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
- * OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, ACCORDING TO RECIPIENTS CHOICE. 
- *
- * The OpenModelica software and the Open Source Modelica
- * Consortium (OSMC) Public License (OSMC-PL) are obtained
- * from OSMC, either from the above address,
- * from the URLs: http://www.ida.liu.se/projects/OpenModelica or  
- * http://www.openmodelica.org, and in the OpenModelica distribution. 
- * GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html.
- *
- * This program is distributed WITHOUT ANY WARRANTY; without
- * even the implied warranty of  MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH
- * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL.
- *
- * See the full OSMC Public License conditions for more details.
- *
- * Main author: Wladimir Schamai, EADS Innovation Works / Linköping University, 2009-now
- *
- * Contributors: 
- *   Uwe Pohlmann, University of Paderborn 2009-2010, contribution to the Modelica code generation for state machine behavior, contribution to Papyrus GUI adoptations
- *   Parham Vasaiely, EADS Innovation Works / Hamburg University of Applied Sciences 2009-2011, implementation of simulation plugins
- */
-
-package org.openmodelica.modelicaml.gen.modelica.validation.actions;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IEditorActionDelegate;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.views.markers.MarkerItem;
-import org.eclipse.uml2.uml.Element;
-
-// TODO: Auto-generated Javadoc
-//import com.cea.papyrus.core.PapyrusPlugin;
-//import com.cea.papyrus.core.editor.MultiDiagramEditor;
-//import com.cea.papyrus.core.treeeditpart.CommonTreeEditPart;
-//import com.cea.papyrus.core.treeeditpart.TreeOutlinePage;
-
-
-/**
- * Implementation of the Locate contextual action PopUp action is defined in
- * plug-in extensions PopUp action accept a single IUMLObjectEditPart.
- */
-public class LocateActionDelegate implements IEditorActionDelegate {
-
-	/**
-	 * Instantiates a new locate action delegate.
-	 */
-	public LocateActionDelegate() {
-		super();
-		// TODO Auto-generated constructor stub
-	}
-
-	/** The selected object. */
-	protected Element selectedObject;
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
-	 * org.eclipse.jface.viewers.ISelection)
-	 */
-	public void selectionChanged(IAction action, ISelection selection) {
-		selectedObject = null;
-		// Retrieve selected elements
-		IStructuredSelection s = (IStructuredSelection) selection;
-		MarkerItem marker = (MarkerItem)s.getFirstElement();
-		String qualifiedName = marker.getAttributeValue(IMarker.LOCATION, null);
-
-//		MultiDiagramEditor editor = PapyrusPlugin.getPapyrusEditor();
-//		
-//		TreeOutlinePage outline = (TreeOutlinePage) editor.getAdapter(IContentOutlinePage.class);
-//		if(outline != null && outline.getModel() != null && outline.getModel().getModelTreeEditPart()!=null)
-//		{
-//			Model model = (Model)outline.getModel().getModelTreeEditPart().getModel();
-//			EList<Element> elementList = model.getOwnedElements();
-//			Iterator<Element> it = elementList.iterator();
-//			while (it.hasNext()) {
-//				Element element = it.next();
-//				if(element instanceof NamedElement)
-//				{
-//					NamedElement namedElement = (NamedElement)element;
-//					if(qualifiedName.equals(namedElement.getQualifiedName()))
-//					{
-//						selectedObject = namedElement;
-//						break;
-//					}	
-//					else if(qualifiedName.contains(namedElement.getQualifiedName()))
-//						{
-//							elementList = namedElement.getOwnedElements();
-//							it = elementList.iterator();
-//							selectedObject = namedElement;
-//						}
-//				}
-//			}
-//		}
-		
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.edona.eastadl2.validation.ui.actions.Action#setActiveEditor(org.eclipse.jface.action.
-	 * IAction, org.eclipse.ui.IEditorPart)
-	 */
-	public void setActiveEditor(IAction action, IEditorPart targetEditor) {
-		// no-op
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
-	 */
-	public void run(IAction action) {
-
-//		MultiDiagramEditor editor = PapyrusPlugin.getPapyrusEditor();
-//		TreeOutlinePage outline = (TreeOutlinePage) editor.getAdapter(IContentOutlinePage.class);
-//		//TODO see ExtendedMarkersView openMarkerInEditor() ..
-//
-//		// Find element in Outline
-//		if(selectedObject!=null)
-//		{
-//			CommonTreeEditPart ctep = outline.expandToElement(selectedObject);
-//			if (ctep != null) {
-//				// Set selection on the TreeEditPart that matches the selection
-//				ctep.getViewer().select(ctep);
-//			}
-//		}
-//		else {
-//			Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
-//			MessageDialog.openInformation(shell, "Information:", "Open the project in papyrus editor");
-//		}
-	}
-}
Index: trunk/modelicaml/org.openmodelica.modelicaml.gen.modelica/src/org/openmodelica/modelicaml/gen/modelica/validation/actions/OBSOLETE_LocateActionDelegate.java
===================================================================
--- trunk/modelicaml/org.openmodelica.modelicaml.gen.modelica/src/org/openmodelica/modelicaml/gen/modelica/validation/actions/OBSOLETE_LocateActionDelegate.java	(revision 1624)
+++ trunk/modelicaml/org.openmodelica.modelicaml.gen.modelica/src/org/openmodelica/modelicaml/gen/modelica/validation/actions/OBSOLETE_LocateActionDelegate.java	(revision 1624)
@@ -0,0 +1,150 @@
+/*
+ * This file is part of OpenModelica.
+ *
+ * Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC),
+ * c/o Linköpings universitet, Department of Computer and Information Science,
+ * SE-58183 Linköping, Sweden.
+ *
+ * All rights reserved.
+ *
+ * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR 
+ * THIS OSMC PUBLIC LICENSE (OSMC-PL). 
+ * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+ * OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, ACCORDING TO RECIPIENTS CHOICE. 
+ *
+ * The OpenModelica software and the Open Source Modelica
+ * Consortium (OSMC) Public License (OSMC-PL) are obtained
+ * from OSMC, either from the above address,
+ * from the URLs: http://www.ida.liu.se/projects/OpenModelica or  
+ * http://www.openmodelica.org, and in the OpenModelica distribution. 
+ * GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html.
+ *
+ * This program is distributed WITHOUT ANY WARRANTY; without
+ * even the implied warranty of  MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH
+ * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL.
+ *
+ * See the full OSMC Public License conditions for more details.
+ *
+ * Main author: Wladimir Schamai, EADS Innovation Works / Linköping University, 2009-now
+ *
+ * Contributors: 
+ *   Uwe Pohlmann, University of Paderborn 2009-2010, contribution to the Modelica code generation for state machine behavior, contribution to Papyrus GUI adoptations
+ *   Parham Vasaiely, EADS Innovation Works / Hamburg University of Applied Sciences 2009-2011, implementation of simulation plugins
+ */
+
+package org.openmodelica.modelicaml.gen.modelica.validation.actions;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IEditorActionDelegate;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.views.markers.MarkerItem;
+import org.eclipse.uml2.uml.Element;
+
+// TODO: Auto-generated Javadoc
+//import com.cea.papyrus.core.PapyrusPlugin;
+//import com.cea.papyrus.core.editor.MultiDiagramEditor;
+//import com.cea.papyrus.core.treeeditpart.CommonTreeEditPart;
+//import com.cea.papyrus.core.treeeditpart.TreeOutlinePage;
+
+
+/**
+ * Implementation of the Locate contextual action PopUp action is defined in
+ * plug-in extensions PopUp action accept a single IUMLObjectEditPart.
+ */
+public class OBSOLETE_LocateActionDelegate implements IEditorActionDelegate {
+
+	/**
+	 * Instantiates a new locate action delegate.
+	 */
+	public OBSOLETE_LocateActionDelegate() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	/** The selected object. */
+	protected Element selectedObject;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
+	 * org.eclipse.jface.viewers.ISelection)
+	 */
+	public void selectionChanged(IAction action, ISelection selection) {
+		selectedObject = null;
+		// Retrieve selected elements
+		IStructuredSelection s = (IStructuredSelection) selection;
+		MarkerItem marker = (MarkerItem)s.getFirstElement();
+		String qualifiedName = marker.getAttributeValue(IMarker.LOCATION, null);
+
+//		MultiDiagramEditor editor = PapyrusPlugin.getPapyrusEditor();
+//		
+//		TreeOutlinePage outline = (TreeOutlinePage) editor.getAdapter(IContentOutlinePage.class);
+//		if(outline != null && outline.getModel() != null && outline.getModel().getModelTreeEditPart()!=null)
+//		{
+//			Model model = (Model)outline.getModel().getModelTreeEditPart().getModel();
+//			EList<Element> elementList = model.getOwnedElements();
+//			Iterator<Element> it = elementList.iterator();
+//			while (it.hasNext()) {
+//				Element element = it.next();
+//				if(element instanceof NamedElement)
+//				{
+//					NamedElement namedElement = (NamedElement)element;
+//					if(qualifiedName.equals(namedElement.getQualifiedName()))
+//					{
+//						selectedObject = namedElement;
+//						break;
+//					}	
+//					else if(qualifiedName.contains(namedElement.getQualifiedName()))
+//						{
+//							elementList = namedElement.getOwnedElements();
+//							it = elementList.iterator();
+//							selectedObject = namedElement;
+//						}
+//				}
+//			}
+//		}
+		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.edona.eastadl2.validation.ui.actions.Action#setActiveEditor(org.eclipse.jface.action.
+	 * IAction, org.eclipse.ui.IEditorPart)
+	 */
+	public void setActiveEditor(IAction action, IEditorPart targetEditor) {
+		// no-op
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+	 */
+	public void run(IAction action) {
+
+//		MultiDiagramEditor editor = PapyrusPlugin.getPapyrusEditor();
+//		TreeOutlinePage outline = (TreeOutlinePage) editor.getAdapter(IContentOutlinePage.class);
+//		//TODO see ExtendedMarkersView openMarkerInEditor() ..
+//
+//		// Find element in Outline
+//		if(selectedObject!=null)
+//		{
+//			CommonTreeEditPart ctep = outline.expandToElement(selectedObject);
+//			if (ctep != null) {
+//				// Set selection on the TreeEditPart that matches the selection
+//				ctep.getViewer().select(ctep);
+//			}
+//		}
+//		else {
+//			Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+//			MessageDialog.openInformation(shell, "Information:", "Open the project in papyrus editor");
+//		}
+	}
+}
