Index: trunk/modelicaml/org.openmodelica.modelicaml.view.valuebindings/src/org/openmodelica/modelicaml/view/valuebindings/sections/PropertySection_ClientOperationEditor.java
===================================================================
--- trunk/modelicaml/org.openmodelica.modelicaml.view.valuebindings/src/org/openmodelica/modelicaml/view/valuebindings/sections/PropertySection_ClientOperationEditor.java	(revision 856)
+++ trunk/modelicaml/org.openmodelica.modelicaml.view.valuebindings/src/org/openmodelica/modelicaml/view/valuebindings/sections/PropertySection_ClientOperationEditor.java	(revision 871)
@@ -204,5 +204,6 @@
 	@Override
 	public void refresh() {
-		if (isNewSelection && isValidElement() ) { // Only react if a different (new) element was selected
+//		if (isNewSelection && isValidElement() ) { // Only react if a different (new) element was selected
+		if (isValidElement() ) { // Only react if a different (new) element was selected
 			
 			//############## Adjust here: start
Index: trunk/modelicaml/org.openmodelica.modelicaml.view.valuebindings/src/org/openmodelica/modelicaml/view/valuebindings/sections/PropertySection_MediatorOperationEditor.java
===================================================================
--- trunk/modelicaml/org.openmodelica.modelicaml.view.valuebindings/src/org/openmodelica/modelicaml/view/valuebindings/sections/PropertySection_MediatorOperationEditor.java	(revision 856)
+++ trunk/modelicaml/org.openmodelica.modelicaml.view.valuebindings/src/org/openmodelica/modelicaml/view/valuebindings/sections/PropertySection_MediatorOperationEditor.java	(revision 871)
@@ -189,5 +189,6 @@
 	@Override
 	public void refresh() {
-		if (isNewSelection && isValidElement() ) { // Only react if a different (new) element was selected
+//		if (isNewSelection && isValidElement() ) { // Only react if a different (new) element was selected
+		if (isValidElement() ) { // Only react if a different (new) element was selected
 			
 //			valueClient = null; // reset the element. important when another element of the same meta-type is selected.
Index: trunk/modelicaml/org.openmodelica.modelicaml.view.valuebindings/src/org/openmodelica/modelicaml/view/valuebindings/sections/PropertySection_Operation.java
===================================================================
--- trunk/modelicaml/org.openmodelica.modelicaml.view.valuebindings/src/org/openmodelica/modelicaml/view/valuebindings/sections/PropertySection_Operation.java	(revision 856)
+++ 	(revision )
@@ -1,137 +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.view.valuebindings.sections;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Stereotype;
-import org.openmodelica.modelicaml.common.constants.Constants;
-import org.openmodelica.modelicaml.common.utls.SWTResourceManager;
-import org.openmodelica.modelicaml.view.valuebindings.model.TreeObject;
-
-public class PropertySection_Operation extends AbstractPropertySection {
-	private Link textOperation;
-	private TreeObject item = null;
-
-	
-	@Override
-	public void setInput(IWorkbenchPart part, ISelection selection) {
-        super.setInput(part, selection);
-        Assert.isTrue(selection instanceof IStructuredSelection);
-        Object input = ((IStructuredSelection) selection).getFirstElement();
-        Assert.isTrue(input instanceof TreeObject);
-        this.item = (TreeObject) input;
-	}
-
-	@Override
-	public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
-
-		super.createControls(parent, aTabbedPropertySheetPage);
-		
-		parent.setLayout(new GridLayout(1, false));
-		Composite composite = new Composite(parent, SWT.NONE);
-		composite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
-		composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
-
-		textOperation = new Link(composite, SWT.NONE);
-		textOperation.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
-		textOperation.setBounds(10, 10, 700, 200);
-	}
-
-	@Override
-	public void refresh() {
-		super.refresh();
-
-		// set text.
-		textOperation.setText(getOperationString());
-	}
-	
-	
-//	private void locate(Object object){
-//		if (object instanceof EObject) {
-//			
-//			IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView("org.eclipse.papyrus.modelexplorer.modelexplorer");
-//
-//			ModelExplorerPageBookView modelExplorerPageBookView = null;
-//			if (view instanceof ModelExplorerPageBookView) {
-//				modelExplorerPageBookView = (ModelExplorerPageBookView)view;
-//			}
-//			CommonViewer modelExplorerView = ((ModelExplorerView) modelExplorerPageBookView.getAdapter(ModelExplorerView.class)).getCommonViewer();
-//			List<Object> items = new ArrayList<Object>();
-//			items.add(modelExplorerPageBookView.findElementForEObject( modelExplorerView, (EObject)object));
-//			modelExplorerView.setSelection(new StructuredSelection(items), true);
-//      	}
-//	}
-	
-	
-	
-	private String getOperationString(){
-	  Stereotype stereotype = getStereotype();
-	  if (stereotype != null) {
-		  Element element = item.getUmlElement();
-		  Object object = element.getValue(stereotype, Constants.propertyName_operation);
-		  if (object instanceof String) {
-			return (String)object;
-		}
-	  }
-	  return "";
-	}
-	
-	private Stereotype getStereotype(){
-		Stereotype stereotype = null;
-		Element element = item.getUmlElement();
-		if (element != null) {
-			stereotype = element.getAppliedStereotype(Constants.stereotypeQName_ValueClient);
-			if (stereotype != null) { return stereotype;}
-
-			stereotype = element.getAppliedStereotype(Constants.stereotypeQName_ValueProvider);
-			if (stereotype != null) { return stereotype;}
-
-			stereotype = element.getAppliedStereotype(Constants.stereotypeQName_ValueMediator);
-			if (stereotype != null) { return stereotype;}
-		}
-		return stereotype;
-	}
-}
Index: trunk/modelicaml/org.openmodelica.modelicaml.view.valuebindings/src/org/openmodelica/modelicaml/view/valuebindings/sections/PropertySection_ProviderOperationEditor.java
===================================================================
--- trunk/modelicaml/org.openmodelica.modelicaml.view.valuebindings/src/org/openmodelica/modelicaml/view/valuebindings/sections/PropertySection_ProviderOperationEditor.java	(revision 856)
+++ trunk/modelicaml/org.openmodelica.modelicaml.view.valuebindings/src/org/openmodelica/modelicaml/view/valuebindings/sections/PropertySection_ProviderOperationEditor.java	(revision 871)
@@ -203,5 +203,6 @@
 	@Override
 	public void refresh() {
-		if (isNewSelection && isValidElement() ) { // Only react if a different (new) element was selected
+//		if (isNewSelection && isValidElement() ) { // Only react if a different (new) element was selected
+		if (isValidElement() ) { // Only react if a different (new) element was selected
 			
 			//############## Adjust here: start
Index: trunk/modelicaml/org.openmodelica.modelicaml.view.valuebindings/src/org/openmodelica/modelicaml/view/valuebindings/sections/Utils.java
===================================================================
--- trunk/modelicaml/org.openmodelica.modelicaml.view.valuebindings/src/org/openmodelica/modelicaml/view/valuebindings/sections/Utils.java	(revision 871)
+++ trunk/modelicaml/org.openmodelica.modelicaml.view.valuebindings/src/org/openmodelica/modelicaml/view/valuebindings/sections/Utils.java	(revision 871)
@@ -0,0 +1,107 @@
+/*
+ * 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.view.valuebindings.sections;
+
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.eclipse.papyrus.core.utils.BusinessModelResolver;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.uml2.uml.Activity;
+import org.eclipse.uml2.uml.ActivityEdge;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.OpaqueAction;
+import org.eclipse.uml2.uml.OpaqueBehavior;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Region;
+import org.eclipse.uml2.uml.State;
+import org.eclipse.uml2.uml.StateMachine;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.Transition;
+
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Utils.
+ */
+public class Utils {
+	
+	public static EObject adaptSelectedElement( Object selection) {
+		EObject eObject = null;
+		if(selection != null) {
+			if(selection instanceof IAdaptable) {
+				selection = ((IAdaptable)selection).getAdapter(EObject.class);
+			}
+			Object businessObject = BusinessModelResolver.getInstance().getBusinessModel(selection);
+			if(businessObject instanceof EObject) {
+				eObject = (EObject)businessObject;
+			}
+		}
+		return eObject;
+	}
+	
+	
+	public static EditingDomain getEditingDomain(IWorkbenchPart part) {
+		if(part.getAdapter(EditingDomain.class) != null) {
+			return (EditingDomain)part.getAdapter(EditingDomain.class);
+		}
+
+		if(part instanceof IEditingDomainProvider) {
+			return ((IEditingDomainProvider)part).getEditingDomain();
+		}
+
+		if(part.getAdapter(IEditingDomainProvider.class) != null) {
+			return ((IEditingDomainProvider)part.getAdapter(IEditingDomainProvider.class)).getEditingDomain();
+		}
+
+//		if(part instanceof PageBookView) {
+//			IPage page = ((PageBookView)part).getCurrentPage();
+//			if(page instanceof IEditingDomainProvider) {
+//				return ((IEditingDomainProvider)page).getEditingDomain();
+//			}
+//		}
+
+		return null;
+	}
+
+}
