Index: /trunk/org.modelica.uml.sysml.diagram2/src/org/modelica/uml/sysml/diagram2/part/SysmlInheritanceDiagramAction.java
===================================================================
--- /trunk/org.modelica.uml.sysml.diagram2/src/org/modelica/uml/sysml/diagram2/part/SysmlInheritanceDiagramAction.java	(revision 505)
+++ /trunk/org.modelica.uml.sysml.diagram2/src/org/modelica/uml/sysml/diagram2/part/SysmlInheritanceDiagramAction.java	(revision 506)
@@ -73,5 +73,6 @@
 import org.modelica.uml.sysml.diagram2.edit.parts.ModelicaProperty3EditPart;
 
-import org.modelica.uml.sysml.diagram2.util.SetPropertiesUtil;
+import org.modelica.uml.sysml.diagram2.util.ModelicaElementsUtil;
+
 
 import org.modelica.uml.sysml.impl.ModelicaClassImpl;
@@ -198,61 +199,5 @@
 			if(createdEditPart != null){
 				
-				SetPropertiesUtil.setClassName(createdEditPart,classes[i]);
-				TransactionalEditingDomain editingDomain = createdEditPart.getEditingDomain();
-				
-				ModelicaPropertyEditPart parameterEDP = SetPropertiesUtil.addParameter(createdEditPart, 0, "");
-				ModelicaProperty3EditPart variableEDP = SetPropertiesUtil.addVariable(createdEditPart);
-				ModelicaEquationPropertyEditPart equationEDP = 
-					SetPropertiesUtil.addEquation(createdEditPart);
-				SetPropertiesUtil.setEquationProperty(editingDomain, equationEDP, "er=5");
-				
-				InnerClass classContent = null;
-				
-				try{
-				classContent = new InnerClass(null,classes[i],IModelicaClass.Restriction.parse(classType),null);
-				}
-				catch(Exception e){
-					
-				}
-				
-				if(classContent != null){
-					
-					try{
-					classContent.getChildren();
-					classContent.getImports();
-					
-					}
-					catch(Exception e){
-						
-					}
-					
-				}
-				
-				LinkedList<ElementInfo> classInfo = null;
-				
-				try{
-				classInfo= (LinkedList<ElementInfo>)CompilerProxy.getElements(classes[i]);
-				}
-				catch(Exception e){
-					
-				}
-				
-				
-				
-				SetPropertiesUtil.setModelProperties(editingDomain, 
-						parameterEDP,
-						SetPropertiesUtil.ProtectedAcces,
-						5,
-						"-345",
-						"out",
-						true,
-						"test",
-						"",
-						(Object)0,
-						"constant");
-				
-				
-				
-			//	SetPropertiesUtil.setAccessFeatureValue(parameterEDP, SetPropertiesUtil.ProtectedAcces);
+				ModelicaElementsUtil.handleclass(createdEditPart, classes[i]);
 				
 				createdNode = new CustomNode(classType.trim(),classes[i],createdEditPart);
Index: /trunk/org.modelica.uml.sysml.diagram2/src/org/modelica/uml/sysml/diagram2/util/ModelicaElementsUtil.java
===================================================================
--- /trunk/org.modelica.uml.sysml.diagram2/src/org/modelica/uml/sysml/diagram2/util/ModelicaElementsUtil.java	(revision 505)
+++ /trunk/org.modelica.uml.sysml.diagram2/src/org/modelica/uml/sysml/diagram2/util/ModelicaElementsUtil.java	(revision 506)
@@ -2,4 +2,7 @@
 
 import java.util.LinkedList;
+import java.util.Iterator;
+
+import org.eclipse.gef.EditPart;
 
 import org.eclipse.emf.transaction.TransactionalEditingDomain;
@@ -8,4 +11,6 @@
 import org.modelica.mdt.core.CompilerProxy;
 import org.modelica.mdt.core.compiler.ElementInfo;
+
+import org.modelica.uml.sysml.diagram2.util.SetPropertiesUtil;
 
 public class ModelicaElementsUtil {
@@ -26,4 +31,6 @@
 		}
 		
+		SetPropertiesUtil.setClassName(classEDP,className);
+		
 		handleClassInfo(classEDP,classInfo);
 		
@@ -33,8 +40,69 @@
 			LinkedList<ElementInfo> classInfo){
 		
-		TransactionalEditingDomain editingDomain;
-		editingDomain = classEDP.getEditingDomain();
+		Iterator iter = classInfo.iterator();
+		while(iter.hasNext()){
+			handleElement(classEDP, (ElementInfo)iter.next());
+		}
+		
+		
+	}
+	
+	protected static void handleElement(ModelicaClassEditPart classEDP ,ElementInfo element){
+		
+		if(element.getElementType().equals("component")){
+			
+			TransactionalEditingDomain editingDomain;
+			editingDomain = classEDP.getEditingDomain();
+
+			EditPart componentEDP;
+			componentEDP = createComponent(classEDP , element); 
+
+			int arrayDimension = 0;
+			String direction = "none"; 
+			if(element.getDirection().equals("input"))
+				direction = "in";
+			else if (element.getDirection().equals("output"))
+				direction = "out";
+
+			if(componentEDP != null){
+				SetPropertiesUtil.setModelProperties(editingDomain,
+						componentEDP, 
+						element.getElementVisibility(), 
+						arrayDimension, 
+						"", 
+						direction, 
+						false, 
+						element.getNames(),  
+						element.getTypeName(), 
+						element.getKind());
+			}
+		}
 		
 	}
 
+	protected static EditPart createComponent(ModelicaClassEditPart classEDP ,ElementInfo element){
+		
+		EditPart componentEDP = null;
+		
+		//String kind = element.getKind();
+		
+		String kind = "parameter";
+		
+		if(kind.equals("parameter")){
+			componentEDP = SetPropertiesUtil.addParameter(classEDP);
+		}
+		else if (kind.equals("unspecified")){
+			componentEDP = SetPropertiesUtil.addVariable(classEDP);
+		}
+		
+		return componentEDP;
+		
+	}
+	
+	protected static void setComponentProperties(TransactionalEditingDomain editingDomain,
+			EditPart componentEDP,
+			ElementInfo element){
+		
+	}
+	
 }
Index: /trunk/org.modelica.uml.sysml.diagram2/src/org/modelica/uml/sysml/diagram2/util/SetPropertiesUtil.java
===================================================================
--- /trunk/org.modelica.uml.sysml.diagram2/src/org/modelica/uml/sysml/diagram2/util/SetPropertiesUtil.java	(revision 505)
+++ /trunk/org.modelica.uml.sysml.diagram2/src/org/modelica/uml/sysml/diagram2/util/SetPropertiesUtil.java	(revision 506)
@@ -58,8 +58,4 @@
 public class SetPropertiesUtil {
 
-	public final static int ProtectedAcces = 0;
-
-	public final static int PublicAcces = 1;
-
 	private SetPropertiesUtil(){
 
@@ -68,5 +64,5 @@
 	public static void setModelProperties(TransactionalEditingDomain editingDomain,
 			EditPart parameterEDP,
-			int access,
+			String access,
 			int arrayDimension,
 			String defaultValue,
@@ -74,5 +70,4 @@
 			boolean isFlow,
 			String name,
-			String propertyKind,
 			Object type,
 			String variability){
@@ -84,10 +79,9 @@
 		setIsFlowProperty(editingDomain, parameterEDP, isFlow);
 		setNameProperty(editingDomain, parameterEDP, name);
-		setPropertyKindProperty(editingDomain, parameterEDP, propertyKind);
 		setVariabilityKindProperty(editingDomain, parameterEDP, variability);
 		
 	}
 
-	public static void setAccessFeatureValue(TransactionalEditingDomain editingDomain, EditPart container, int value){
+	public static void setAccessFeatureValue(TransactionalEditingDomain editingDomain, EditPart container, String value){
 
 		AccessKind newValue = null;
@@ -95,14 +89,5 @@
 		if(container.getModel() instanceof NodeImpl){
 			
-			switch(value){
-
-			case ProtectedAcces : newValue =  AccessKind.PROTECTED_LITERAL;
-									break;
-
-			case PublicAcces : newValue =  AccessKind.PUBLIC_LITERAL;
-			
-			default:
-			}
-
+			newValue = AccessKind.get(value);
 
 			EObject elementToEdit = ((NodeImpl)container.getModel()).getElement();
@@ -179,5 +164,5 @@
 	}
 
-	public static ModelicaPropertyEditPart addParameter(ModelicaClassEditPart parent, int type, String name){
+	public static ModelicaPropertyEditPart addParameter(ModelicaClassEditPart parent){
 
 		if(parent.getModel() instanceof NodeImpl){
@@ -396,5 +381,5 @@
 			EStructuralFeature propertyFeature = SysmlPackage.Literals.MODELICA_PROPERTY__DIRECTION;
 	
-			FlowDirection newDirection = FlowDirection.OUT_LITERAL;
+			FlowDirection newDirection = FlowDirection.get(newValue);
 			
 			IPropertySource propertySource = 
@@ -487,5 +472,7 @@
 	}
 
-	public static void setPropertyKindProperty(TransactionalEditingDomain editingDomain, EditPart parameterEDP, String newValue){
+	//not necessary. The property is set when the parameter, variable or equqtion
+	//is created
+	/*public static void setPropertyKindProperty(TransactionalEditingDomain editingDomain, EditPart parameterEDP, String newValue){
 
 		if(parameterEDP.getModel() instanceof NodeImpl){
@@ -517,5 +504,5 @@
 
 
-	}
+	}*/
 
 	public static void setVariabilityKindProperty(TransactionalEditingDomain editingDomain, EditPart parameterEDP, String newValue){
@@ -551,4 +538,37 @@
 	}
 	
+	public static void setTypeProperty(TransactionalEditingDomain editingDomain, EditPart parameterEDP, String newValue){
+
+		if(parameterEDP.getModel() instanceof NodeImpl){
+
+			EObject elementToEdit = ((NodeImpl)parameterEDP.getModel()).getElement();
+			EStructuralFeature propertyFeature = SysmlPackage.Literals.MODELICA_PROPERTY__DATA_TYPE;
+
+			 
+			
+			SetRequest setPropertyFeatureRequest = new SetRequest(elementToEdit, propertyFeature , newValue);
+			SetValueCommand setPropertyFeatureCommand = new SetValueCommand(setPropertyFeatureRequest);
+			
+			IPropertySource propertySource = 
+				new PropertiesServiceAdapterFactory().getPropertySource(parameterEDP);
+			
+			
+			SetModelPropertyValueCommand setAccessProp = new SetModelPropertyValueCommand( editingDomain, 
+					"Set Property command", parameterEDP,  propertySource, 
+					propertyFeature, newValue);
+
+	
+			try{
+				setAccessProp.execute(new NullProgressMonitor(), null);
+			}
+			catch(Exception e){
+
+			}
+		}
+
+
+	}
+
+	
 	public static void setEquationProperty(TransactionalEditingDomain editingDomain, EditPart parameterEDP, String newValue){
 		
