#----------Class ---------------------------------------------------------------------------
view.map.*.Class.isTopLevel() =
\
\  if( ( %diagram%->hasPropertyValue( "$shapeType", "ComponentDiagram" ) ||
\        %diagram%->hasPropertyValue( "$shapeType", "DeploymentDiagram" ) ||
\        hasViewProperty("showCircle") ) &&
\        hasProperty( "$interface" ),
\      setGraphicObject( "RectangleInvisible" );
\      shape = addCompartment( "Circle", "shape" );
\      if (!hasViewProperty("2DLook"), shape->setShadow( 3, RGB(0,0,128) ));
\      shape->setLayoutConstraints( minWidth(30), maxWidth(30), minHeight(30), maxHeight(30) )
\    ,
\      if( hasProperty("$ejbRole"),
\          setGraphicObject("BeanComponent");
\          icons = addCompartment("RectangleInvisible", "$icons");
\          icons->setLayout("Move");
\          ejbMark = icons->addCompartment("EJBMark", "ejbMark");
\          ejbMark->setLayoutConstraints( minWidth(6), maxWidth(6), minHeight(6), maxHeight(6),
\                                         verticalAlign("center"), horizontalAlign("center") )
\        ,
\          if( hasPropertyValue( "stereotype", "actor" ),
\              setGraphicObject( "RectangleInvisible" );
\              shape = addCompartment( "ActorBold", "shape" );
\              if (!hasViewProperty("2DLook"), shape->setShadow(2, RGB(0,0,128)));
\              shape->setLayoutConstraints( minWidth(30), minHeight(30), preferredWidth(52), preferredHeight(52) )
\            ,
\              setGraphicObject( "RectangleObject" )
\            )
\        )
\    );
\  if (!hasViewProperty("2DLook"), setShadow(3, RGB(0,0,128)));
\  names = addCompartment( "RectangleInvisible", "Names" );
\  names->setLayoutConstraints( minHeight(20), preferredWidth(50), fixedHeight(true) );
\  if(!hasViewProperty("hideAll"),
\    if(!hasViewProperty("hideAttributes"),
\      (
\      attributes = addCompartment("$ScrolledRectangle","Attributes");
\      attributes->setHorizontalMargin(5);
\      attributes->setLayoutConstraints(preferredWidth(50),preferredHeight(10))
\      )
\    );
\    if(!hasViewProperty("hideOperations"),
\      operations = addCompartment("$ScrolledRectangle","Operations");
\      operations->setHorizontalMargin(5);
\      operations->setLayoutConstraints(minHeight(16),preferredWidth(50))
\    );
\    if(!hasViewProperty("hideClasses"),
\      classes = addCompartment("$ScrolledRectangle","Classes");
\      classes->setLayoutConstraints(preferredWidth(50),preferredHeight(10));
\      classes->setHorizontalMargin(5);
\      classes->setVisible(false)
\    );
\    if(!hasViewProperty("hideProperties"),
\      beanProperties = addCompartment("$ScrolledRectangle","BeanProperties");
\      beanProperties->setLayoutConstraints(preferredWidth(50),preferredHeight(10));
\      beanProperties->setHorizontalMargin(5);
\      beanProperties->setVisible(false)
\    );
\    if(!hasViewProperty("hideEvents"),
\      beanEvents = addCompartment("$ScrolledRectangle","BeanEvents");
\      beanEvents->setLayoutConstraints(preferredWidth(50),preferredHeight(10));
\      beanEvents->setHorizontalMargin(5);
\      beanEvents->setVisible(false)
\    )
\  );
\  markersCompartment = addCompartment( "RectangleInvisible", "MarkersCompartment" );
\  markersCompartment->setLayoutConstraints( minHeight(10), fixedHeight(true));
\  markers = markersCompartment->addCompartment( "RectangleInvisible", "Markers" );
\  markers->setLayoutConstraints( widthAlign("parentDefined"), heightAlign("parentDefined"), toDecreaseWidth(true) );
\  markers->setLayout( "Move" );
\  if( hasProperty("$readOnly") && !hasProperty("$compiled"),
\      readonlyMark=markers->addCompartment( "LockMark", "lockMark" );
\      readonlyMark->setLayoutConstraints( minWidth(10), minHeight(10), horizontalAlign("right") )
\    );
\  if( hasViewProperty("$imported") && !hasProperty("$ejbRole") &&
\      ( !%diagram%->hasPropertyValue( "$shapeType", "ClassDiagram" ) || %diagram%->hasProperty( "$physicalPackage" ) ),
\      importedMark=markers->addCompartment( "ShortcutMark", "shortcutMark" );
\      importedMark->setLayoutConstraints( minWidth(12), minHeight(10), horizontalAlign("left") )
\    );
\  if( hasProperty("$compiled"),
\      exclamationMark=markers->addCompartment( "ExclamationMark", "exclamationMark" );
\      exclamationMark->setLayoutConstraints( minWidth(10), minHeight(10), horizontalAlign("right") )
\    );
\
\  if (hasOptionValue("option.referenced", "Show Name"),
\    forEachInDo(
\      baseClassProperty,
\      properties("$extends"),
\      (
\        ref = %diagram%->findReference(findElement(baseClassProperty->getSubproperty("$referencedElement")));
\        if ( ref == null || !ref->hasViewProperty("$visible"),
\          baseClassLabel = addToCompartment(label(baseClassProperty->getValue()), "Names");
\          baseClassLabel->setFont(%defaultFontName%, "Plain", 12);
\          baseClassLabel->setAlignment("Right");
\          baseClassLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true))
\        )
\      )
\    );
\    forEachInDo(
\      baseClassProperty,
\      properties("$implements"),
\      (
\        ref = %diagram%->findReference(findElement(baseClassProperty->getSubproperty("$referencedElement")));
\        if ( ref == null || !ref->hasViewProperty("$visible"),
\          baseClassLabel = addToCompartment(label(baseClassProperty->getValue()), "Names");
\          baseClassLabel->setFont(%defaultFontName%, "Italic", 12);
\          baseClassLabel->setAlignment("Right");
\          baseClassLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true))
\        )
\      )
\    )
\  );
\
\  if( hasProperty("stereotype") && !hasPropertyValue( "stereotype", "actor" ),
\      stereoLabel = addToCompartment(label("<<"+getProperty("stereotype")+">>"), "Names");
\      stereoLabel->setInplaceEditor({property:="stereotype"});
\      stereoLabel->setFont(%defaultFontName%, "Plain", 12);
\      stereoLabel->setAlignment("Center");
\      stereoLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true))
\    );
\  if( hasProperty("$interface") && !hasViewProperty("showCircle"),
\      interfaceLabel = addToCompartment(label("interface"), "Names");
\      interfaceLabel->setFont(%defaultFontName%, "Plain", 12);
\      interfaceLabel->setAlignment("Center");
\      interfaceLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true))
\    );
\  if( hasProperty("$valuetype"),
\      interfaceLabel = addToCompartment(label("valuetype"), "Names");
\      interfaceLabel->setFont(%defaultFontName%, "Plain", 12);
\      interfaceLabel->setAlignment("Center");
\      interfaceLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true))
\    );
\
\  name = getProperty("alias");
\  if(name == null,
\    if(hasPropertyValue("$language","java") && isInTheSamePackage(), name = getProperty("$name"), name = getProperty("$fullName"));
\    name = name->replace("_", " ")
\    );
\  nameLabel = addToCompartment(label(name),"Names");
\  nameLabel->setElementName("nameLabel");
\  if (!hasProperty("alias"),
\    nameLabel->setInplaceEditor({inProperty:="$name", outProperty:="$classInplaceEditing", default:=true}),
\    nameLabel->setInplaceEditor({property:="alias", default:=true})
\  );
\  nameLabel->setAlignment("Center");
\  nameLabel->setWholeWordsOnly();
\  if( hasProperty("$abstract"),
\      nameLabel->setFont(%defaultFontName%, "BoldItalic", 12),
\      nameLabel->setFont(%defaultFontName%, "Bold", 12)
\    );
\  if( hasProperty("$template"),
\      templateParam = addToCompartment(label( getProperty("$templateParamText") ), "Names");
\      templateParam->setFont(%defaultFontName%, "Plain", 12);
\      templateParam->setAlignment("Right");
\      templateParam->setLayoutConstraints(preferredHeight(16),fixedHeight(true))
\    );
\  if( hasProperty("$hyperLink") || hasProperty("url"), nameLabel->setForeground(RGB(0,0,255)));
\  maxWidth = getIntegerOption("initialwidth");
\  setLayoutConstraints(minWidth(16),minHeight(16),preferredWidth(50),maxWidth(maxWidth));
\  setHorizontalMargin(5);
\  setCanHaveLinks()
;\  if(hasPropertyValue("showas", "hidden"), hideGraphicElement())

#\  if( !isInTheSamePackage(), hideGraphicElement() );

view.map.*.Class.!isTopLevel() =
\
\  hideClass = !isInTheSamePackage() && %parent%->hasGraphicProperty( "hideContainingShortcuts" );
\  hideStereotype = %parent%->hasGraphicProperty( "hideChildsStereotype" );
\
\  prefix = if( !( hasPropertyValue("$language","cpp") || hasPropertyValue("$language","idl") ),
\               if( hasProperty("$public"), "+",
\               if( hasProperty("$private"), "-",
\               if( hasProperty("$protected"), "#", " " )))
\               , " "
\             );
\  name = getProperty("alias");
\  if(name == null,
\    if(hasPropertyValue("$language","java") && isInTheSamePackage() || hasPropertyValue("$language","cpp") || hasPropertyValue("$language","idl"), name = getProperty("$name"), name = getProperty("$fullName"));
\    name = name->replace("_", " ")
\    );
\
\  label = label( prefix + name );
\  if( hasProperty("$static"), label->setUnderlined() );
\  setGraphicObject( label );
\
\  if (hasProperty("$abstract") || hasViewProperty("$imported"),
\    setFont(%defaultFontName%, "Italic", 12),
\    setFont(%defaultFontName%, "Plain", 12));
\  if(!hasProperty("alias"),
\    setInplaceEditor({inProperty:="$name", outProperty:="$classInplaceEditing", default:=true}),
\    setInplaceEditor({property:="alias", default:=true})
\  );
\  if (setCompartment("Classes") == null, hideGraphicElement());
\  setLayoutConstraints(preferredHeight(16),fixedHeight(true));
\  if (hasProperty("$hyperLink") || hasProperty("url"),
\    setForeground(RGB(0,0,255))
\  );
\
\  if( hasProperty("stereotype") && !hideStereotype && !hideClass,
\      stereoLabel = insertBefore( label( "<<"+getProperty("stereotype")+">>" ) );
\      stereoLabel->setFont(%defaultFontName%, "Plain", 12);
\      stereoLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true))
\    );
\
\  if( hideClass, hideGraphicElement() )

view.map.*.*.isNode() && !isOnTopLevelDiagram() && !hasPropertyValue( "$shapeType", "Class" ) =
\  if( !%parent%->hasGraphicProperty( "hideContainingDesignNodes" ),
\    name = getProperty("$name");
\    name = name->replace("_", " ");
\    setGraphicObject(label(name));
\    setInplaceEditor({outProperty:="$defaultInplaceEditing", default:=true});
\    if(setCompartment("Classes") == null, hideGraphicElement());
\    setLayoutConstraints(preferredHeight(16),fixedHeight(true));
\    if (hasProperty("$hyperLink") || hasProperty("url"),
\      setForeground(RGB(0,0,255))
\    ),
\
\    hideGraphicElement()
\  )


view.map.*.BeanProperty.true =
\  %parent%->setGraphicObject("BeanComponent");
\  setGraphicObject(label(getProperty("$name")));
\  setInplaceEditor({outProperty:="$propertyInplaceEditing", default:=true});
\  if(setCompartment("BeanProperties") == null, hideGraphicElement());
\  setLayoutConstraints(preferredHeight(16),fixedHeight(true));
\  if(!hasOption("option.beans.showAccessors"),
\    hideElement(findElement(getProperty("$getterUniqueName")));
\    hideElement(findElement(getProperty("$setterUniqueName")));
\    hideElement(findElement(getProperty("$indexedGetterUniqueName")));
\    hideElement(findElement(getProperty("$indexedSetterUniqueName")));
\    hideElement(findElement(getProperty("$beanPropertyAttributeUniqueName")))
\    );
\  detail = getStringOption("detail"); if (detail == null, workspace = getWorkspace(); detail = if (workspace == "Business Modeler", "Analysis", if (workspace == "Designer", "Design", "Implementation")));
\  if(detail != "Analysis" && !hasOptionValue("option.formatting", "Java"),
\    append(":"+getProperty("$type"))
\    );
\  if(detail != "Analysis" && hasOptionValue("option.formatting", "Java"),
\    prepend(getProperty("$type") + " ")
\    );
\  if(detail != "Analysis",
\    prepend(" ")
\    )


view.map.*.BeanEventSet.true =
\  %parent%->setGraphicObject("BeanComponent");
\  setGraphicObject(label(getProperty("$name")));
\  detail = getStringOption("detail"); if (detail == null, workspace = getWorkspace(); detail = if (workspace == "Business Modeler", "Analysis", if (workspace == "Designer", "Design", "Implementation")));
\  if(detail != "Analysis", prepend(" "));
\  setInplaceEditor({inProperty:="$name", outProperty:="$name", default:=true});
\  if(setCompartment("BeanEvents") == null, hideGraphicElement());
\  setLayoutConstraints(preferredHeight(16),fixedHeight(true));
\  if(!hasOption("option.beans.showAccessors"),
\    hideElement(findElement(getProperty("$adder")));
\    hideElement(findElement(getProperty("$remover")))
\    )

#----------Object ---------------------------------------------------------------------------
view.map.*.Object.( isOnTopLevelDiagram() && ( !isTopLevel() || !%diagram%->hasPropertyValue( "$shapeType", "SequenceDiagram" ) || %diagram%->hasPropertyValue( "$viewType", "collaborationView" ) ) ) =
\    if( hasPropertyValue( "stereotype", "actor" ),
\        setGraphicObject( "RectangleInvisible" ),
\        if( hasProperty( "active" ),
\            setGraphicObject( "RectangleObjectBordered" ),
\            setGraphicObject( "RectangleObject" )
\          )
\      );
\    if (!hasViewProperty("2DLook"), setShadow(3, RGB(0,0,128)));
\    setLayoutConstraints( minWidth(40), minHeight(40), preferredWidth(50), preferredHeight(60), canShiftX(true), canShiftY(true) );
\    setHorizontalMargin(5);
\    setCanHaveLinks();
\    setCanContainChilds();
#\    setLayout( "Vertical" );
\  setLayout("Move");
\    names = addCompartment( "RectangleInvisible", "Names" );
\    names->setLayoutConstraints( horizontalAlign("left"), verticalAlign("top"), widthAlign("parentDefined"), heightAlign("parentDefined") );
\    if( hasPropertyValue( "stereotype", "actor" ),
\        shape = names->addCompartment( "ActorBold", "shape" );
\        shape->setLayoutConstraints( minWidth(30), minHeight(30), preferredWidth(52), preferredHeight(52) );
\        if (!hasViewProperty("2DLook"), shape->setShadow(2, RGB(0,0,128)))
\      );
\    if( hasProperty("stereotype") && !hasPropertyValue( "stereotype", "actor" ),
\        stereoLabel = addToCompartment(label("<<"+getProperty("stereotype")+">>"), "Names");
\        stereoLabel->setInplaceEditor({property:="stereotype"});
\        stereoLabel->setFont(%defaultFontName%, "Plain", 12);
\        stereoLabel->setAlignment("Center");
\        stereoLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true))
\      );
\    objectLabelString = getProperty( "$name" ) +
\                       if( hasProperty( "$instantiatedClass" ),
\                           ":" + getProperty( findElement( getProperty( "$instantiatedClass" ) ), "$name" ),
\                           "" );
\    nameLabel = addToCompartment( label( objectLabelString ), "Names" );
\    nameLabel->setFont(%defaultFontName%, "Bold", 12);
\    nameLabel->setAlignment("Center");
\    nameLabel->setWholeWordsOnly();
\    nameLabel->setUnderlined();
\    nameLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true));
\    nameLabel->setInplaceEditor( {property:="$objectInplaceEditing", default:=true } );
\    if( hasProperty("$hyperLink") || hasProperty("url"), nameLabel->setForeground(RGB(0,0,255)));
\    if( hasProperty( "state" ),
\        stateLabel = addToCompartment( label( "["+getProperty( "state" )+"]" ), "Names" );
\        stateLabel->setFont(%defaultFontName%, "Plain", 12);
\        stateLabel->setAlignment( "Center" );
\        stateLabel->setLayoutConstraints( preferredHeight(16), fixedHeight(true) )
\      );
\    if( hasProperty( "persistence" ),
\        persistanceLabelString = "{" + getProperty( "persistence" ) + "}";
\        persistanceLabel = addToCompartment( label( persistanceLabelString ), "Names" );
\        persistanceLabel->setFont(%defaultFontName%, "Plain", 12);
\        persistanceLabel->setAlignment( "Right" );
\        persistanceLabel->setLayoutConstraints( preferredHeight(16), fixedHeight(true) )
\      );
\    if( hasViewProperty("$imported"),
\  	 markersCompartment = addCompartment( "RectangleInvisible", "MarkersCompartment" );
\	 markersCompartment->setLayoutConstraints( minHeight(10), fixedHeight(true));
\  	 markers = markersCompartment->addCompartment( "RectangleInvisible", "Markers" );
\  	 markers->setLayoutConstraints( widthAlign("parentDefined"), heightAlign("parentDefined"), toDecreaseWidth(true) );
\	 markers->setLayout( "Move" );
\        importedMark=markers->addCompartment( "ShortcutMark", "shortcutMark" );
\        importedMark->setLayoutConstraints( minWidth(12), minHeight(10), horizontalAlign("left"), verticalAlign("bottom") )
\      )


#----------Class stereotype colors------------------------------------------------------------

;view.map.*.Class.hasPropertyValue("stereotype","catalog entry") = setBackground(RGB(170,200,150))
view.map.*.Class.hasPropertyValue("stereotype","container") = setBackground(RGB(180,230,180))
view.map.*.Class.hasPropertyValue("stereotype","description") = setBackground(RGB(180,200,210))
view.map.*.Class.hasPropertyValue("stereotype","mi-detail") = setBackground(RGB(250,190,190))
view.map.*.Class.hasPropertyValue("stereotype","moment-interval") = setBackground(RGB(250,190,190))
view.map.*.Class.hasPropertyValue("stereotype","party") = setBackground(RGB(180,230,180))
view.map.*.Class.hasPropertyValue("stereotype","place") = setBackground(RGB(180,230,180))
view.map.*.Class.hasPropertyValue("stereotype","role") = setBackground(RGB(250,240,180))
view.map.*.Class.hasPropertyValue("stereotype","thing") = setBackground(RGB(180,230,180))
;view.map.*.Class.hasPropertyValue("stereotype","time box") = setBackground(RGB(252,218,228))



#----------Object stereotype colors-----------------------------------------------------------

view.map.*.Object.hasPropertyValue(findElement(getProperty("$instantiatedClass")), "stereotype", "catalog entry") = setBackground(RGB(170,200,150))
view.map.*.Object.hasPropertyValue(findElement(getProperty("$instantiatedClass")), "stereotype","container") = setBackground(RGB(180,230,180))
view.map.*.Object.hasPropertyValue(findElement(getProperty("$instantiatedClass")), "stereotype","description") = setBackground(RGB(180,200,210))
view.map.*.Object.hasPropertyValue(findElement(getProperty("$instantiatedClass")), "stereotype","mi-detail") = setBackground(RGB(250,190,190))
view.map.*.Object.hasPropertyValue(findElement(getProperty("$instantiatedClass")), "stereotype","moment-interval") = setBackground(RGB(250,190,190))
view.map.*.Object.hasPropertyValue(findElement(getProperty("$instantiatedClass")), "stereotype","party") = setBackground(RGB(180,230,180))
view.map.*.Object.hasPropertyValue(findElement(getProperty("$instantiatedClass")), "stereotype","place") = setBackground(RGB(180,230,180))
view.map.*.Object.hasPropertyValue(findElement(getProperty("$instantiatedClass")), "stereotype","role") = setBackground(RGB(250,240,180))
view.map.*.Object.hasPropertyValue(findElement(getProperty("$instantiatedClass")), "stereotype","thing") = setBackground(RGB(180,230,180))
;view.map.*.Object.hasPropertyValue(findElement(getProperty("$instantiatedClass")), "stereotype","time box") = setBackground(RGB(252,218,228))

#----------All diagrams ---------------------------------------------------------------------------

view.map.*.*.isDiagram() && isTopLevel() =
\  if(hasProperty("$Component"),
\    (
\    setGraphicObject("Component")
\    ),
\    (
\    setGraphicObject("Folder"));
\    if(!hasProperty("$physicalPackage"),
\      (
\      icons = addCompartment("RectangleInvisible", "$icons");
\      icons->setLayout("Move");
\      icon = addToCompartment(label("",getIcon()), "$icons");
\      icon->setFont(%defaultFontName%, "Plain", 12);
\      icon->setAlignment("Center");
\      icon->setLayoutConstraints(preferredHeight(16),fixedHeight(true),verticalAlign("center"),horizontalAlign("center"))
\      )
\    )
\  );
\  if (!hasViewProperty("2DLook"), setShadow(3, RGB(0,0,128)));
\  maxWidth = getIntegerOption("initialwidth");
\  setLayoutConstraints(minWidth(16),minHeight(16),preferredWidth(50),maxWidth(maxWidth));
\  setCanHaveLinks();
\  names = addCompartment("RectangleInvisible","Names");
\  names->setLayoutConstraints(minHeight(20),preferredWidth(50),fixedHeight(true));
\  subpackages = addCompartment("$ScrolledRectangle","Subpackages");
\  subpackages->setLayoutConstraints(preferredWidth(50),preferredHeight(10));
\  subpackages->setHorizontalMargin(5);
\  subpackages->setVisible(false);
\  classes = addCompartment("$ScrolledRectangle","Classes");
\  classes->setHorizontalMargin(5);
\  classes->setLayoutConstraints(preferredWidth(50),preferredHeight(10));
\
\  markersCompartment = addCompartment( "RectangleInvisible", "MarkersCompartment" );
\  markersCompartment->setLayoutConstraints( minHeight(10), fixedHeight(true) );
\  markers = markersCompartment->addCompartment( "RectangleInvisible", "Markers" );
\  markers->setLayoutConstraints( widthAlign("parentDefined"), heightAlign("parentDefined"), toDecreaseWidth(true) );
\  markers->setLayout( "Move" );
\  if( hasProperty("$readOnly"),
\      readonlyMark=markers->addCompartment( "LockMark", "lockMark" );
\      readonlyMark->setLayoutConstraints( minWidth(10), minHeight(10), horizontalAlign("right") )
\    );
\  if( hasViewProperty("$imported") &&
\      ( !%diagram%->hasPropertyValue( "$shapeType", "ClassDiagram" ) || %diagram%->hasProperty( "$physicalPackage" ) ),
\      importedMark=markers->addCompartment( "ShortcutMark", "shortcutMark" );
\      importedMark->setLayoutConstraints( minWidth(12), minHeight(10), horizontalAlign("left") )
\    );
\
\  if(hasProperty("stereotype"),
\    (
\    stereoLabel = addToCompartment(label("<<"+getProperty("stereotype")+">>"), "Names");
\    stereoLabel->setInplaceEditor({property:="stereotype"});
\    stereoLabel->setFont(%defaultFontName%, "Plain", 12);
\    stereoLabel->setAlignment("Center");
\    stereoLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true))
\    )
\  );
\  name = getProperty("alias");
\  if(name == null,
\    if(isInTheSamePackage(), name = getProperty("$name"), name = getProperty("$fullName"))
\    );
\  nameLabel = addToCompartment(label(name),"Names");
\  if (!hasProperty("alias"),
\    if(!hasProperty("$physicalPackage"),
\       nameLabel->setInplaceEditor({inProperty:="$name", outProperty:="$defaultInplaceEditing", default:=true}),
\       nameLabel->setInplaceEditor({inProperty:="$name", outProperty:="$packageInplaceEditing", default:=true})
\      ),
\    nameLabel->setInplaceEditor({inProperty:="alias", outProperty:="alias", default:=true})
\  );
\  nameLabel->setFont(%defaultFontName%, "Bold", 12);
\  nameLabel->setAlignment("Center");
\  nameLabel->setWholeWordsOnly();
\  nameLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true));
\
\  if( hasPropertyValue( "$shapeType", "ClassDiagram" ),
\      setGraphicProperty( "hideChildsStereotype", "yes" );
\      setGraphicProperty( "hideContainingDesignNodes", "yes"  );
\      if( hasProperty("$physicalPackage") && !hasOption( "option.showPackageContents.showShortcuts" ),
\          setGraphicProperty( "hideContainingShortcuts", "yes" ) )
\    );
\
\  if(hasProperty("$hyperLink") || hasProperty("url"), nameLabel->setForeground(RGB(0,0,255)))



view.map.*.*.isDiagram() && !isTopLevel() =
\  name = getProperty("alias");
\  if(name == null,
\    if(isInTheSamePackage(), name = getProperty("$name"), name = getProperty("$fullName"))
\    );
\  setGraphicObject(label(name));
\  setFont(%defaultFontName%, "Bold", 12);
\  if (!hasProperty("alias"),
\    setInplaceEditor({inProperty:="$name", outProperty:="$defaultInplaceEditing", default:=true}),
\    setInplaceEditor({inProperty:="alias", outProperty:="alias", default:=true})
\  );
\  setCompartment("Subpackages")

#----------Attribute -----------------------------------------------------------------------
view.map.*.Attribute.true =
\  if(hasProperty("stereotype"),
\    (
\    stereoLabel = %parent%->addToCompartment(label("<<"+getProperty("stereotype")+">>"), "Attributes");
\    stereoLabel->setInplaceEditor({ property:="stereotype", element:=%element% });
\    stereoLabel->setFont(%defaultFontName%, "Plain", 12);
\    stereoLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true))
\    )
\  );
\  if( hasProperty( "alias" ),
\      label = label( getProperty( "alias" ) ),
\      label = label( getProperty( "$name" ) )
\    );
\  if(hasProperty("$static"), label->setUnderlined());
\  setGraphicObject(label);
\  setInplaceEditor({outProperty:="$attributeInplaceEditing", default:=true});
\  if(setCompartment("Attributes") == null, hideGraphicElement());
\  setLayoutConstraints(preferredHeight(16),fixedHeight(true));
\  if(hasProperty("$hyperLink") || hasProperty("url"), setForeground(RGB(0,0,255)));
\  detail = getStringOption("detail"); if (detail == null, workspace = getWorkspace(); detail = if (workspace == "Business Modeler", "Analysis", if (workspace == "Designer", "Design", "Implementation")));
\  if(detail != "Analysis" && !hasOptionValue("option.formatting", "Java"),
\    append(":"+getProperty("$type"))
\  );
\  if(detail != "Analysis" && hasOptionValue("option.formatting", "Java"),
\    prepend(getProperty("$type") + " ")
\  );
\  if(detail == "Implementation" && hasProperty("$initialValue"),
\    append("=" + getProperty("$initialValue"))
\  );
\  if(detail != "Analysis",
\    if(hasProperty("$public"),prepend("+"));
\    if(hasProperty("$private"),prepend("-"));
\    if(hasProperty("$protected"),prepend("#"));
\    if(hasProperty("$package"),prepend(" "))
\  );
\  if(hasOptionValue("option.associationLinks.showAttribute", "Automatic") &&
\     hasProperty("$linkPrefix"),
\        hideGraphicElement()
\  )
;\  if(hasPropertyValue("showas", "hidden"), hideGraphicElement())


#----------Operation -----------------------------------------------------------------------
view.map.*.Operation.true =
\  if(hasProperty("stereotype"),
\    stereoLabel = %parent%->addToCompartment(label("<<"+getProperty("stereotype")+">>"), "Operations");
\    stereoLabel->setInplaceEditor({ property:="stereotype", element:=%element% });
\    stereoLabel->setFont(%defaultFontName%, "Plain", 12);
\    stereoLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true))
\  );
\  if( hasProperty( "alias" ),
\      label = label( getProperty( "alias" ) ),
\      label = label( getProperty( "$name" ) )
\    );
\  if(hasProperty("$static"), label->setUnderlined());
\  setGraphicObject(label);
\  if(hasProperty("$abstract"),
\    setFont(%defaultFontName%, "Italic", 12),
\    setFont(%defaultFontName%, "Plain", 12)
\  );
\  setInplaceEditor({outProperty:="$operationInplaceEditing", default:=true});
\  if(setCompartment("Operations") == null, hideGraphicElement());
\  setLayoutConstraints(preferredHeight(16),fixedHeight(true));
\  if(hasProperty("$hyperLink") || hasProperty("url"), setForeground(RGB(0,0,255)));
\  detail = getStringOption("detail"); if (detail == null, workspace = getWorkspace(); detail = if (workspace == "Business Modeler", "Analysis", if (workspace == "Designer", "Design", "Implementation")));
\  if(detail != "Analysis" && hasOptionValue("option.formatting", "Java"),
\    prepend(getProperty("$returnType") + " ")
\  );
\  if(detail == "Implementation",
\    if(hasOptionValue("option.formatting", "Java"),
\       append("(" + getProperty("$parametersText") + ")"),
\       append("(" + getProperty("$umlParametersText") + ")")
\    )
\  );
\  if(detail != "Analysis" && hasOptionValue("option.formatting", "UML"),
\    if(hasProperty("$returnType"), append(":" + getProperty("$returnType")))
\  );
\  if(detail != "Analysis",
\    if(hasProperty("$public"),prepend("+"));
\    if(hasProperty("$private"),prepend("-"));
\    if(hasProperty("$protected"),prepend("#"));
\    if(hasProperty("$package"),prepend(" "))
\  )
;\  if(hasPropertyValue("showas", "hidden"), hideGraphicElement())

#----------Note -----------------------------------------------------------------------
view.map.*.Note.isOnTopLevelDiagram() =
\  if(hasProperty("textOnly"),
\     setGraphicObject("RectangleInvisible"),
\     setGraphicObject("$Note"));
\  setLayoutConstraints( minWidth(32), minHeight(25), preferredWidth(50), preferredHeight(40),
\                        canShiftX(true), canShiftY(true) );
\  setCanHaveLinks();
\  setLayout("Vertical");
\  if (!hasViewProperty("2DLook"), setShadow(3, RGB(0,0,128)));
\  names = addCompartment("RectangleInvisible","Names");
\  names->setLayout("Vertical");
\  names->setLayoutConstraints(horizontalAlign("left"),verticalAlign("top"),
\                       widthAlign("parentDefined"),heightAlign("parentDefined"));
\  nameLabel = addToCompartment(textArea(getProperty("text")),"Names");
\  nameLabel->setLayoutConstraints(horizontalAlign("left"),verticalAlign("top"),
\                       widthAlign("parentDefined"),heightAlign("parentDefined"));
\  nameLabel->setInplaceEditor({property:="text", default:=true, editor:="MultiLineStringField"});
\
\  if( hasViewProperty("$imported"),
\      importedMark=addCompartment( "ShortcutMark", "shortcutMark" );
\      importedMark->setLayoutConstraints( minWidth(12), minHeight(10), horizontalAlign("left"), verticalAlign("bottom") )
\    )

#----------UseCase diagram ----------------------------------------------------
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
view.map.*.UseCase.isOnTopLevelDiagram() =
\  setGraphicObject("Oval");
\  setLayoutConstraints( minWidth(30), minHeight(30), preferredWidth(115), preferredHeight( 35 ),
\                        canShiftX(true), canShiftY(true) );
\  setCanHaveLinks();
\  setCanContainChilds();
\  setLayout("Vertical");
\  if (!hasViewProperty("2DLook"), setShadow(3, RGB(0,0,128)));
\
\  if( hasViewProperty("$imported"),
\    compartments = addCompartment( "RectangleInvisibleMarked", "Compartments" );
\    compartments->setLayoutConstraints( minHeight(25), horizontalAlign("left"), verticalAlign("center"),
\                                 widthAlign("parentDefined"))
\    ,
\    compartments = addCompartment( "RectangleInvisible", "Compartments" );
\    compartments->setLayoutConstraints( horizontalAlign("left"), verticalAlign("center"),
\                               widthAlign("parentDefined"))
\  );
\
\  names = compartments->addCompartment( "RectangleInvisible", "Names" );
\
\  if(hasProperty("stereotype"),
\    (
\    stereoLabel = addToCompartment(label("<<"+getProperty("stereotype")+">>"), "Names");
\    stereoLabel->setInplaceEditor({property:="stereotype"});
\    stereoLabel->setFont(%defaultFontName%, "Plain", 12);
\    stereoLabel->setAlignment("Center");
\    stereoLabel->setLayoutConstraints( preferredHeight(16), fixedHeight(true) )
\    )
\  );
\  nameLabel = addToCompartment(label(getProperty("$name")),"Names");
\  nameLabel->setInplaceEditor({inProperty:="$name", outProperty:="$defaultInplaceEditing", default:=true});
\  nameLabel->setLayoutConstraints( preferredHeight(16), fixedHeight(true) );
\  nameLabel->setAlignment("Center");
\  if(hasProperty("$hyperLink") || hasProperty("url"), nameLabel->setForeground(RGB(0,0,255)));
\  if (hasProperty("abstract"),
\    nameLabel->setFont(%defaultFontName%, "Italic", 12),
\    nameLabel->setFont(%defaultFontName%, "Plain", 12)
\  );
\
\  if( hasProperty( "explanation" ),
\    textArea = addToCompartment( textArea( getProperty( "explanation" ) ), "Names" );
\    textArea->setLayoutConstraints( preferredHeight(16) );
\    textArea->setAlignment( "Center" );
\    textArea->setInplaceEditor( {property:="explanation", editor:="MultiLineStringField"} )
\  );
\
\  extensionPoints = compartments->addCompartment( "$ScrolledRectangle", "ExtensionPoints" );
\  extensionPointsLabel = addToCompartment( label("Extension points"), "ExtensionPoints" );
\  extensionPointsLabel->setAlignment("Center");
\  extensionPointsLabel->setFont( %defaultFontName%, "Bold", 12 );
\  extensionPoints->setVisible(false)

#----------UseCase Extension Point------------------------------------------------------
view.map.*.ExtensionPoint.true =
\  setGraphicObject( label( if(hasProperty("$name"), getProperty("$name"), "") ) );
\  setInplaceEditor({property:="$name", default:=true});
\  setCompartment("ExtensionPoints");
\  setLayoutConstraints(preferredHeight(16),fixedHeight(true));
\  setAlignment("Center");
\  if(hasProperty("$hyperLink") || hasProperty("url"), setForeground(RGB(0,0,255)))


#----------Actor -----------------------------------------------------------------------
view.map.*.Actor.isOnTopLevelDiagram() =
\  setGraphicObject( "RectangleInvisible" );
\  setCanHaveLinks();
\  inset = addCompartment( "RectangleInvisible", "inset" );
\  inset->setLayoutConstraints( minHeight(5), fixedHeight(true) );
\  shapeCompartment = addCompartment( "RectangleInvisible", "shapeCompartment" );
\  shapeCompartment->setLayoutConstraints( minWidth(30), minHeight(30), preferredWidth(52), preferredHeight(52) );
\  shape = shapeCompartment->addCompartment( "ActorBold", "shape" );
\  shape->setLayoutConstraints( widthAlign("parentDefined"), heightAlign("parentDefined") );
\  if (!hasViewProperty("2DLook"), shape->setShadow(2, RGB(0,0,128)));
\
\  if( hasViewProperty("$imported"),
\      markersCompartment = addCompartment( "RectangleInvisibleMarked", "MarkersCompartment" );
\      markersCompartment->setLayoutConstraints( minHeight(10), fixedHeight(true))
\    );
\
\  names = addCompartment( "RectangleInvisible", "Names" );
\  names->setLayoutConstraints( minHeight(20), preferredWidth(30), fixedHeight(true) );
\  if( hasProperty("stereotype"),
\    stereoLabel = addToCompartment( label("<<"+getProperty("stereotype")+">>"), "Names" );
\    stereoLabel->setInplaceEditor( {property:="stereotype"} );
\    stereoLabel->setFont( %defaultFontName%, "Plain", 12 );
\    stereoLabel->setAlignment( "Center" );
\    stereoLabel->setLayoutConstraints( preferredHeight(16), fixedHeight(true) )
\  );
\  nameLabel = addToCompartment( label( getProperty( "$name" ) ), "Names" );
\  nameLabel->setInplaceEditor( { outProperty:="$defaultInplaceEditing", default:=true } );
\  nameLabel->setLayoutConstraints( preferredHeight(16), fixedHeight(true) );
\  nameLabel->setAlignment("Center");
\  if(hasProperty("$hyperLink") || hasProperty("url"), nameLabel->setForeground(RGB(0,0,255)));
\
\  if( hasProperty( "explanation" ),
\    textArea = addToCompartment( textArea( getProperty( "explanation" ) ), "Names" );
\    textArea->setLayoutConstraints( preferredHeight(16) );
\    textArea->setAlignment( "Center" );
\    textArea->setInplaceEditor( {property:="explanation", editor:="MultiLineStringField"} )
\  )



view.map.*.SystemBoundary.isOnTopLevelDiagram() =
\  setGraphicObject("RectangleObject");
\  setLayoutConstraints( minWidth(16), minHeight(16), preferredWidth(190), preferredHeight(380) );
\  setBackground( RGB(200,200,200) );
\  setLayout( "Move" );
\  setCanHaveLinks();
\  setCanContainChilds();
\  names = addCompartment( "RectangleInvisible", "Names" );
\  names->setLayoutConstraints( horizontalAlign( "center" ), verticalAlign( "top" ),
\                               widthAlign( "parentDefined" ), fixedHeight(true) );
\  nameLabel = addToCompartment( label( getProperty( "$name" ) ), "Names" );
\  nameLabel->setInplaceEditor({inProperty:="$name", outProperty:="$defaultInplaceEditing", default:=true});
\  nameLabel->setLayoutConstraints( preferredHeight(16), fixedHeight(true) );
\  nameLabel->setAlignment( "Center" );
\  if(hasProperty("$hyperLink") || hasProperty("url"), nameLabel->setForeground(RGB(0,0,255)));
\
\  if( hasViewProperty("$imported"),
\      importedMark=addCompartment( "ShortcutMark", "shortcutMark" );
\      importedMark->setLayoutConstraints( minWidth(12), minHeight(10), horizontalAlign("left"), verticalAlign("bottom") )
\    )

#----------Activity diagram ----------------------------------------------------
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------

view.map.*.State.isOnTopLevelDiagram() =
\  setGraphicObject("$RoundRectangle");
\  if (!hasViewProperty("2DLook"), setShadow(3, RGB(0,0,128)));
\  setCanHaveLinks();
\  setCanContainChilds();
\  setLayoutConstraints(minWidth(16),minHeight(16),
\                       preferredWidth(50),preferredHeight(40),
\                       canShiftX(true),canShiftY(true));
\  setLayout("Move");
\  compartments = addCompartment("RectangleInvisible","Compartments");
\  compartments->setLayoutConstraints(horizontalAlign("left"),verticalAlign("top"),
\                                     widthAlign("parentDefined"),heightAlign("parentDefined"));
\  names = addCompartment(compartments, "RectangleInvisible","Names");
\  names->setLayoutConstraints(minHeight(20),maxHeight(40),fixedHeight(true));
\
\  if( hasProperty( "explanation" ),
\    textAreaCompartment = compartments->addCompartment( "RectangleInvisible", "textArea" );
\    textAreaCompartment->setLayoutConstraints( fixedHeight( true ) );
\    textArea = addToCompartment( textArea( getProperty( "explanation" ) ), "textArea" );
\    textArea->setLayoutConstraints( preferredHeight(16) );
\    textArea->setAlignment( "Center" );
\    textArea->setInplaceEditor( {property:="explanation", editor:="MultiLineStringField"} )
\  );
\
\  internalTransitions  = addCompartment(compartments,"$ScrolledRectangle","InternalTransitions");
\  internalTransitions->setLayoutConstraints(minHeight(20));
\  internalTransitions->setHorizontalMargin(10);
\  if(hasProperty("stereotype"),
\    (
\    stereoLabel = addToCompartment(label("<<"+getProperty("stereotype")+">>"), "Names");
\    stereoLabel->setInplaceEditor({property:="stereotype"});
\    stereoLabel->setFont(%defaultFontName%, "Plain", 12);
\    stereoLabel->setAlignment("Center");
\    stereoLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true))
\    )
\  );
\  nameLabel = addToCompartment(label(getProperty("$name")),"Names");
\  nameLabel->setInplaceEditor({inProperty:="$name", outProperty:="$defaultInplaceEditing", default:=true});
\  nameLabel->setAlignment("Center");
\  nameLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true));
\  if(hasProperty("$hyperLink") || hasProperty("url"), nameLabel->setForeground(RGB(0,0,255)));
\
\  if( hasViewProperty("$imported"),
\      importedMark=addCompartment( "ShortcutMark", "shortcutMark" );
\      importedMark->setLayoutConstraints( minWidth(12), minHeight(10), horizontalAlign("left"), verticalAlign("bottom") )
\    )


view.map.*.StartState.isOnTopLevelDiagram() =
\  setGraphicObject( "RectangleInvisible" );
\  setLayoutConstraints( canShiftX(true), canShiftY(true) );
\  setCanHaveLinks();
\  setResizable( false );
\  setBackground( black );
\  shape = addCompartment( "Circle", "shape" );
\  shape->setLayoutConstraints( minWidth(12), maxWidth(12), minHeight(12), maxHeight(12) );
\
\  if( hasViewProperty("$imported"),
\      importedMark = addCompartment( "RectangleInvisibleMarked", "shortcutMark" );
\      importedMark->setLayoutConstraints( minHeight(10), fixedHeight(true) )
\    )


view.map.*.EndState.isOnTopLevelDiagram() =
\  setGraphicObject( "RectangleInvisible" );
\  setLayoutConstraints( canShiftX(true), canShiftY(true) );
\  setCanHaveLinks();
\  setResizable( false );
\  setBackground( black );
\  shape = addCompartment( "CircleDouble", "shape" );
\  shape->setLayoutConstraints( minWidth(15), maxWidth(15), minHeight(15), maxHeight(15) );
\
\  if( hasViewProperty("$imported"),
\      importedMark = addCompartment( "RectangleInvisibleMarked", "shortcutMark" );
\      importedMark->setLayoutConstraints( minHeight(10), fixedHeight(true) )
\    )

view.map.*.History.isOnTopLevelDiagram() =
\  if( hasProperty( "deep" ),
\      setGraphicObject( "DeepHistory" ),
\      setGraphicObject( "History" )
\    );
\  setLayoutConstraints( minWidth(15), minHeight(15), preferredWidth(15), preferredHeight(15),
\                        canShiftX(true), canShiftY(true) );
\  setCanHaveLinks();
\  setBackground( black )


view.map.*.SyncBar.isOnTopLevelDiagram() =
\  setGraphicObject("RectangleObject");
\  setBackground(black);
\  setLayout("Move");
\  setCanHaveLinks();
\  if( hasProperty( "vertical" ),
\    setLayoutConstraints( minWidth(6), minHeight(6),
\                          preferredWidth(6), preferredHeight(60),
\                          fixedThickness(6),
\                          canShiftX(true), canShiftY(true) ),
\
\    setLayoutConstraints( minWidth(6), minHeight(6),
\                          preferredWidth(60), preferredHeight(6),
\                          fixedThickness(6),
\                          canShiftX(true), canShiftY(true) )
\  )

view.map.*.Activity.isOnTopLevelDiagram() =
\  setGraphicObject("ArcRectangle");
\  setLayoutConstraints(minWidth(16),minHeight(20),preferredWidth(80),
\                       canShiftX(true),canShiftY(true));
\  setCanHaveLinks();
\  if (!hasViewProperty("2DLook"), setShadow(3, RGB(0,0,128)));
\  setLayout( "Vertical" );
\  compartments = addCompartment("RectangleInvisible","Compartments");
\  compartments->setLayoutConstraints( horizontalAlign("left"),verticalAlign("top"),
\                                      widthAlign("parentDefined"),heightAlign("parentDefined"));
\  names = addCompartment(compartments, "RectangleInvisible","Names");
\  names->setLayoutConstraints( minHeight(20), maxHeight(20),fixedHeight(true),widthAlign("parentDefined"));
\  internalTransitions  = addCompartment(compartments, "RectangleInvisible","InternalTransitions");
\  internalTransitions->setLayoutConstraints( widthAlign("parentDefined") );
\  nameLabel = addToCompartment(label(getProperty("$name")),"Names");
\  nameLabel->setInplaceEditor({ property:="$name", default:=true });
\  nameLabel->setLayoutConstraints( preferredHeight(16), fixedHeight(true) );
\  nameLabel->setAlignment("Center");
\  if(hasProperty("$hyperLink") || hasProperty("url"), nameLabel->setForeground(RGB(0,0,255)));
\  if( hasViewProperty("$imported"),
\      importedMark = compartments->addCompartment( "RectangleInvisibleMarked", "shortcutMark" );
\      importedMark->setLayoutConstraints( minHeight(10), fixedHeight(true) )
\    )

view.map.*.Decision.isOnTopLevelDiagram() =
\  setGraphicObject("Rhomb");
\  setLayoutConstraints( minWidth(15), minHeight(10), preferredWidth(30), preferredHeight(20),
\                        canShiftX(true), canShiftY(true) );
\  setCanHaveLinks();
\  if (!hasViewProperty("2DLook"), setShadow(3, RGB(0,0,128)));
\  if( hasViewProperty("$imported"),
\      importedMark = addCompartment( "RectangleInvisibleMarked", "shortcutMark" );
\      importedMark->setLayoutConstraints( minHeight(10) )
\    )


view.map.*.SignalReceipt.isOnTopLevelDiagram() =
\  setGraphicObject("ConcavePentagon");
\  setLayoutConstraints( minWidth(30), minHeight(30), preferredWidth(60),
\                        canShiftX(true), canShiftY(true) );
\  setCanHaveLinks();
\  if (!hasViewProperty("2DLook"), setShadow(3, RGB(0,0,128)));
\  names = addCompartment( "RectangleInvisible", "Names" );
\  names->setLayoutConstraints( minHeight(20), maxHeight(20), fixedHeight(true), widthAlign("parentDefined") );
\  nameLabel = addToCompartment( label( getProperty("$name") ), "Names" );
\  nameLabel->setInplaceEditor({ property:="$name", default:=true });
\  nameLabel->setLayoutConstraints( preferredHeight(16), fixedHeight(true) );
\  nameLabel->setAlignment("Center");
\  if(hasProperty("$hyperLink") || hasProperty("url"), nameLabel->setForeground(RGB(0,0,255)));
\  if( hasViewProperty("$imported"),
\      importedMark = addCompartment( "RectangleInvisibleMarked", "shortcutMark" );
\      importedMark->setLayoutConstraints( minHeight(10), fixedHeight(true) )
\    )

view.map.*.SignalSending.isOnTopLevelDiagram() =
\  setGraphicObject("ConvexPentagon");
\  setLayoutConstraints( minWidth(30), minHeight(30), preferredWidth(60),
\                        canShiftX(true), canShiftY(true) );
\  setCanHaveLinks();
\  if (!hasViewProperty("2DLook"), setShadow(3, RGB(0,0,128)));
\  names = addCompartment( "RectangleInvisible", "Names" );
\  names->setLayoutConstraints( minHeight(20), maxHeight(20), fixedHeight(true), widthAlign("parentDefined") );
\  nameLabel = addToCompartment( label( getProperty("$name") ), "Names" );
\  nameLabel->setInplaceEditor({ property:="$name", default:=true });
\  nameLabel->setLayoutConstraints( preferredHeight(16), fixedHeight(true) );
\  nameLabel->setAlignment("Center");
\  if(hasProperty("$hyperLink") || hasProperty("url"), nameLabel->setForeground(RGB(0,0,255)));
\  if( hasViewProperty("$imported"),
\      importedMark = addCompartment( "RectangleInvisibleMarked", "shortcutMark" );
\      importedMark->setLayoutConstraints( minHeight(10), fixedHeight(true) )
\    )

view.map.*.SwimLane.isOnTopLevelDiagram() =
\  setGraphicObject("RectangleObject");
\  setLayoutConstraints( minWidth(16), minHeight(16), preferredWidth(190), preferredHeight(380) );
\  setBackground( RGB(200,200,200) );
\  setLayout( "Move" );
\  setCanHaveLinks();
\  setCanContainChilds();
\  names = addCompartment( "RectangleInvisible", "Names" );
\  names->setLayoutConstraints( horizontalAlign( "center" ), verticalAlign( "top" ),
\                               widthAlign( "parentDefined" ), fixedHeight(true) );
\  nameLabel = addToCompartment( label( getProperty( "$name" ) ), "Names" );
\  nameLabel->setInplaceEditor({inProperty:="$name", outProperty:="$defaultInplaceEditing", default:=true});
\  nameLabel->setLayoutConstraints( preferredHeight(16), fixedHeight(true) );
\  nameLabel->setAlignment( "Center" );
\  if(hasProperty("$hyperLink") || hasProperty("url"), nameLabel->setForeground(RGB(0,0,255)));
\
\  if( hasViewProperty("$imported"),
\      importedMark=addCompartment( "ShortcutMark", "shortcutMark" );
\      importedMark->setLayoutConstraints( minWidth(12), minHeight(10), horizontalAlign("left"), verticalAlign("bottom") )
\    )


view.map.*.InternalTransition.true =
\  labelStr = if(hasProperty("$name"), getProperty("$name"), "") +
\             if(hasProperty("eventArguments"),"(" + getProperty("eventArguments") + ")", "") +
\             if(hasProperty("condition"),"[" + getProperty("condition") + "]", "") +
\             if(hasProperty("$action"),"/" + getProperty("$action"), "/") +
\             if(hasProperty("sendClause"),"^" + getProperty("sendClause"), "");
\  setGraphicObject( label( labelStr ) );
\  setInplaceEditor({outProperty:="$internalTransitionInplaceEditing", default:=true});
\  setCompartment("InternalTransitions");
\  setLayoutConstraints(preferredHeight(16),fixedHeight(true));
\  if(hasProperty("$hyperLink") || hasProperty("url"), setForeground(RGB(0,0,255)))


view.map.*.DeferredEvent.true =
\  labelStr = if(hasProperty("$name"), getProperty("$name"), "") +
\                  if(hasProperty("eventArguments"),"(" + getProperty("eventArguments") + ")", "") +
\                  if(hasProperty("condition"),"[" + getProperty("condition") + "]", "") +
\                  "/defer";
\  setGraphicObject( label( labelStr ) );
\  setInplaceEditor( {property:="$deferredEventInplaceEditing", default:=true} );
\  setCompartment( "InternalTransitions" );
\  setLayoutConstraints( preferredHeight(16), fixedHeight(true) );
\  if(hasProperty("$hyperLink") || hasProperty("url"), setForeground(RGB(0,0,255)))

#----------Deployment diagram ----------------------------------------------------
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#\  compartments->setLayoutConstraints( horizontalAlign("left"), verticalAlign("top"),
#\                                      widthAlign("parentDefined"),heightAlign("parentDefined"));
#\  names = addCompartment(compartments, "RectangleInvisible","Names");
#\  names->setLayoutConstraints( minHeight(20), maxHeight(40), fixedHeight(true) );

view.map.*.Node.isOnTopLevelDiagram() =
\  setGraphicObject("Cube");
\  setLayoutConstraints(minWidth(50),minHeight(50),
\                       preferredWidth(100),preferredHeight(100),
\                       canShiftX(true),canShiftY(true));
\  setCanContainChilds();
\  setCanHaveLinks();
\  setLayout("Move");
\  if (!hasViewProperty("2DLook"), setShadow(3, RGB(0,0,128)));
\  names = addCompartment("RectangleInvisible","Names");
\  names->setLayoutConstraints( widthAlign("parentDefined"), heightAlign("parentDefined") );
\  if(hasProperty("stereotype"),
\    (
\    stereoLabel = addToCompartment(label("<<"+getProperty("stereotype")+">>"), "Names");
\    stereoLabel->setInplaceEditor({property:="stereotype"});
\    stereoLabel->setFont(%defaultFontName%, "Plain", 12);
\    stereoLabel->setAlignment("Center");
\    stereoLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true))
\    )
\  );
\  nameLabelStr = getProperty("$name") +
\                   if( hasProperty( "node_type" ), ":" + getProperty( "node_type" ), "" );
\  nameLabel = addToCompartment(label( nameLabelStr ),"Names");
\  nameLabel->setInplaceEditor({outProperty:="$nodeInplaceEditing", default:=true});
\  nameLabel->setAlignment("Center");
\  nameLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true));
\  nameLabel->setUnderlined();
\  if(hasProperty("$hyperLink") || hasProperty("url"), nameLabel->setForeground(RGB(0,0,255)));
\
\  if( hasProperty( "explanation" ),
\    textAreaCompartment = names->addCompartment( "RectangleInvisible", "textArea" );
\    textAreaCompartment->setLayoutConstraints( fixedHeight( true ) );
\    textArea = addToCompartment( textArea( getProperty( "explanation" ) ), "textArea" );
\    textArea->setLayoutConstraints( preferredHeight(16) );
\    textArea->setAlignment( "Center" );
\    textArea->setInplaceEditor( {property:="explanation", editor:="MultiLineStringField"} )
\  );
\
\  if( hasViewProperty("$imported"),
\      importedMark=addCompartment( "ShortcutMark", "shortcutMark" );
\      importedMark->setLayoutConstraints( minWidth(12), minHeight(10), horizontalAlign("left"), verticalAlign("bottom") )
\    )

#----------Component diagram ---------------------------------------------------
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
view.map.*.Subsystem.isOnTopLevelDiagram() =
\  setGraphicObject("Folder");
\  setLayoutConstraints(minWidth(80),minHeight(50),preferredWidth(100),preferredHeight(100),
\                       canShiftX(true),canShiftY(true));
\  setCanContainChilds();
\  setCanHaveLinks();
\  setLayout( "Move" );
\  if (!hasViewProperty("2DLook"), setShadow(3, RGB(0,0,128)));
\  names = addCompartment("RectangleInvisible","Names");
\  names->setLayoutConstraints( widthAlign("parentDefined"), heightAlign("parentDefined") );
\  if(hasProperty("stereotype"),
\    (
\    stereoLabel = addToCompartment(label("<<"+getProperty("stereotype")+">>"), "Names");
\    stereoLabel->setInplaceEditor({property:="stereotype"});
\    stereoLabel->setFont(%defaultFontName%, "Plain", 12);
\    stereoLabel->setAlignment("Center");
\    stereoLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true))
\    )
\  );
\  nameLabel = addToCompartment( label( getProperty("$name") ), "Names" );
\  nameLabel->setInplaceEditor({inProperty:="$name", outProperty:="$defaultInplaceEditing", default:=true});
\  nameLabel->setLayoutConstraints( preferredHeight(16), fixedHeight(true) );
\  nameLabel->setAlignment( "Center" );
\  if(hasProperty("$hyperLink") || hasProperty("url"), nameLabel->setForeground(RGB(0,0,255)))


view.map.*.Component.isOnTopLevelDiagram() =
\  setGraphicObject("Component");
\  setLayoutConstraints(minWidth(80),minHeight(50),preferredWidth(100),preferredHeight(60),
\                       canShiftX(true),canShiftY(true));
\  setCanContainChilds();
\  setCanHaveLinks();
\  setLayout( "Move" );
\  if (!hasViewProperty("2DLook"), setShadow(3, RGB(0,0,128)));
\  names = addCompartment("RectangleInvisible","Names");
\  names->setLayoutConstraints( widthAlign("parentDefined"), heightAlign("parentDefined") );
\  if(hasProperty("stereotype"),
\    (
\    stereoLabel = addToCompartment(label("<<"+getProperty("stereotype")+">>"), "Names");
\    stereoLabel->setInplaceEditor({property:="stereotype"});
\    stereoLabel->setFont(%defaultFontName%, "Plain", 12);
\    stereoLabel->setAlignment("Center");
\    stereoLabel->setLayoutConstraints(preferredHeight(16),fixedHeight(true))
\    )
\  );
\  if( hasProperty( "instanceForm" ),
\      nameLabelStr = getProperty("$name") +
\                  if( hasProperty( "component_type" ), ":" + getProperty( "component_type" ), "" ),
\      nameLabelStr = getProperty( "$name" )
\  );
\  nameLabel = addToCompartment( label( nameLabelStr ), "Names" );
\  nameLabel->setInplaceEditor({outProperty:="$componentInplaceEditing", default:=true});
\  nameLabel->setLayoutConstraints( preferredHeight(16), fixedHeight(true) );
\  nameLabel->setAlignment( "Center" );
\  if( hasProperty( "instanceForm" ),
\      nameLabel->setUnderlined()
\  );
\  if(hasProperty("$hyperLink") || hasProperty("url"), nameLabel->setForeground(RGB(0,0,255)));
\
\  if( hasProperty( "explanation" ),
\    textAreaCompartment = names->addCompartment( "RectangleInvisible", "textArea" );
\    textAreaCompartment->setLayoutConstraints( fixedHeight( true ) );
\    textArea = addToCompartment( textArea( getProperty( "explanation" ) ), "textArea" );
\    textArea->setLayoutConstraints( preferredHeight(16) );
\    textArea->setAlignment( "Center" );
\    textArea->setInplaceEditor( {property:="explanation", editor:="MultiLineStringField"} )
\  );
\
\  if( hasViewProperty("$imported"),
\      markersCompartment = addCompartment( "RectangleInvisibleMarked", "MarkersCompartment" );
\      markersCompartment->setLayoutConstraints( minHeight(10), fixedHeight(true),
\                                                horizontalAlign("left"), verticalAlign("bottom"), widthAlign("parentDefined"))
\    )

view.map.*.Interface.isOnTopLevelDiagram() =
\  setGraphicObject( "RectangleInvisible" );
\  setLayoutConstraints( canShiftX(true), canShiftY(true) );
\  setCanHaveLinks();
\  setResizable( false );
\  shape = addCompartment( "Circle", "shape" );
\  if (!hasViewProperty("2DLook"), shape->setShadow( 3, RGB(0,0,128) ));
\  shape->setLayoutConstraints( minWidth(30), maxWidth(30), minHeight(30), maxHeight(30) );
\
\  if( hasViewProperty("$imported"),
\      markersCompartment = addCompartment( "RectangleInvisibleMarked", "MarkersCompartment" );
\      markersCompartment->setLayoutConstraints( minHeight(10), fixedHeight(true))
\    );
\
\  names = addCompartment( "RectangleInvisible", "Names" );
\  if( hasProperty("stereotype"),
\      stereoLabel = addToCompartment( label("<<"+getProperty("stereotype")+">>"), "Names" );
\      stereoLabel->setInplaceEditor( {property:="stereotype"} );
\      stereoLabel->setFont( %defaultFontName%, "Plain", 12 );
\      stereoLabel->setAlignment( "Center" )
\  );
\  if( hasProperty( "$name" ) && getProperty( "$name" ) != "",
\      nameLabel = addToCompartment( label( getProperty( "$name" ) ), "Names" );
\      nameLabel->setInplaceEditor( { outProperty:="$defaultInplaceEditing", default:=true } );
\      nameLabel->setAlignment("Center")
\  );
\  if(hasProperty("$hyperLink") || hasProperty("url"), nameLabel->setForeground(RGB(0,0,255)))



#----------Business Process diagram --------------------------------------------
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------

#-------- Business Worker-------------------------------------------------------
view.map.*.BusinessWorker.isOnTopLevelDiagram() =
\  setGraphicObject( "RectangleInvisible" );
\  setLayoutConstraints( canShiftX(true), canShiftY(true) );
\  setCanHaveLinks();
\  setResizable( false );
\  shape = addCompartment( "BusinessWorker", "shape" );
\  if (!hasViewProperty("2DLook"), shape->setShadow( 3, RGB(0,0,128) ));
\  shape->setLayoutConstraints( minWidth(33), maxWidth(33), minHeight(33), maxHeight(33) );
\
\  if( hasViewProperty("$imported"),
\      markersCompartment = addCompartment( "RectangleInvisibleMarked", "MarkersCompartment" );
\      markersCompartment->setLayoutConstraints( minHeight(10), fixedHeight(true))
\    );
\
\  names = addCompartment( "RectangleInvisible", "Names" );
\  if( hasProperty("stereotype"),
\      stereoLabel = addToCompartment( label("<<"+getProperty("stereotype")+">>"), "Names" );
\      stereoLabel->setInplaceEditor( {property:="stereotype"} );
\      stereoLabel->setFont( %defaultFontName%, "Plain", 12 );
\      stereoLabel->setAlignment( "Center" )
\  );
\  if( hasProperty( "$name" ) && getProperty( "$name" ) != "",
\      nameLabel = addToCompartment( label( getProperty( "$name" ) ), "Names" );
\      nameLabel->setInplaceEditor( { outProperty:="$defaultInplaceEditing", default:=true } );
\      nameLabel->setAlignment("Center")
\  );
\  if(hasProperty("$hyperLink") || hasProperty("url"), nameLabel->setForeground(RGB(0,0,255)))


#-------- Business Entity-------------------------------------------------------
view.map.*.BusinessEntity.isOnTopLevelDiagram() =
\  setGraphicObject( "RectangleInvisible" );
\  setLayoutConstraints( canShiftX(true), canShiftY(true) );
\  setCanHaveLinks();
\  setResizable( false );
\  shape = addCompartment( "BusinessEntity", "shape" );
\  if (!hasViewProperty("2DLook"), shape->setShadow( 3, RGB(0,0,128) ));
\  shape->setLayoutConstraints( minWidth(33), maxWidth(33), minHeight(33), maxHeight(33) );
\
\  if( hasViewProperty("$imported"),
\      markersCompartment = addCompartment( "RectangleInvisibleMarked", "MarkersCompartment" );
\      markersCompartment->setLayoutConstraints( minHeight(10), fixedHeight(true))
\    );
\
\  names = addCompartment( "RectangleInvisible", "Names" );
\  if( hasProperty("stereotype"),
\      stereoLabel = addToCompartment( label("<<"+getProperty("stereotype")+">>"), "Names" );
\      stereoLabel->setInplaceEditor( {property:="stereotype"} );
\      stereoLabel->setFont( %defaultFontName%, "Plain", 12 );
\      stereoLabel->setAlignment( "Center" )
\  );
\  if( hasProperty( "$name" ) && getProperty( "$name" ) != "",
\      nameLabel = addToCompartment( label( getProperty( "$name" ) ), "Names" );
\      nameLabel->setInplaceEditor( { outProperty:="$defaultInplaceEditing", default:=true } );
\      nameLabel->setAlignment("Center")
\  );
\  if(hasProperty("$hyperLink") || hasProperty("url"), nameLabel->setForeground(RGB(0,0,255)))


#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------

#-------- Hyperlink ------------------------------------------------------


#view.map.*.Hyperlink.true =
#\  nameLabel = findElementByName(%src%, "NameLabel");
#\  nameLabel->setForeground(RGB(0,0,255))


#-------- AssociationLink ------------------------------------------------------

view.map.*.AssociationLink.true =
\   if(hasProperty("$aggregation"),
\     (
\     setForeground(RGB(0,0,130));
\     icon = addIcon("Rhomb","OnSource");
\     if(hasProperty("$byValue"),icon->setBackground(RGB(0,0,130)))
\     ),
\     (
\     setForeground(RGB(0,0,255))
\     )
\   );
\
\   drawDirected = false;
\   if (hasProperty("directed"),
\       drawDirected = true,
\       if (hasProperty("undirected"),
\           drawDirected = false,
\           if (hasOptionValue("option.associationLinks.directed", "All"),
\               drawDirected = true,
\               if (hasOptionValue("option.associationLinks.directed", "No"),
\                   drawDirected = false,
\                   drawDirected = !hasProperty("$linkPrefix")
\               )
\           )
\       )
\   );
\   if (drawDirected, addIcon("OpenTriangle","OnDestination"));
\
\   icon = addLabelIcon(getProperty("clientCardinality"),"AboveLeftSource");
\   icon->setInplaceEditor({property:="clientCardinality"});
\   icon = addLabelIcon(getProperty("supplierCardinality"),"AboveLeftDestination");
\   icon->setInplaceEditor({property:="supplierCardinality"});
\   icon = addLabelIcon(getProperty("clientRole"),"UnderRightSource");
\   icon->setInplaceEditor({property:="clientRole"});
\   icon = addLabelIcon(getProperty("supplierRole"),"UnderRightDestination");
\   icon->setInplaceEditor({property:="supplierRole"});
\   icon = addLabelIcon(getProperty("clientQualifier"),"UnderRightSource");
\   icon->setInplaceEditor({property:="clientQualifier"});
\   icon = addLabelIcon(getProperty("supplierQualifier"),"UnderRightDestination");
\   icon->setInplaceEditor({property:="supplierQualifier"});
\   icon = addLabelIcon(getProperty("label"),"AsideCenter");
\   icon->setInplaceEditor({property:="label"});
\   icon = addLabelBoxIcon(getProperty("associationAsClass"),"AsideCenter");
\   icon->setInplaceEditor({property:="associationAsClass"});
\   if(hasOptionValue("option.associationLinks.showAttribute", "No"),
\     hideElement(findElement(getProperty("$linkMember")))
\     );
\   if(hasOption("option.dependencyLinks.showBetweenClasses"),
\     hideElement(findAutodependencyLink())
\     )

#\   if(hasOptionValue("option.associationLinks.showAttribute", "Automatic") &&
#\      hasProperty("$linkPrefix"),
#\        hideElement(findElement(getProperty("$linkMember")))
#\     )

#-------- DependencyLink -------------------------------------------------------
view.map.*.DependencyLink.true =
\   if(hasProperty("automatic"),
\     (
\     setForeground(RGB(0,0,130))
\     ),
\     (
\     setForeground(black);
\     if(hasOption("option.dependencyLinks.showBetweenClasses"),
\       hideElement(findAutodependencyLink()))
\     )
\   );
\   setLineStyle("dashed");
\   if(hasProperty("reverse"),
\      addIcon("OpenTriangle","OnSource"),
\      addIcon("OpenTriangle","OnDestination")
\      );
\   icon = addLabelIcon(getProperty("clientRole"),"UnderRightSource");
\   icon->setInplaceEditor({property:="clientRole"});
\   icon = addLabelIcon(getProperty("supplierRole"),"UnderRightDestination");
\   icon->setInplaceEditor({property:="supplierRole"});
\   icon = addLabelIcon(getProperty("label"),"AsideCenter");
\   icon->setInplaceEditor({property:="label", default:=true });
\   if( hasProperty( "stereotype" ),
\      icon = addLabelIcon( "<<"+getProperty( "stereotype" )+">>", "AboveLeftCenter" );
\      icon->setInplaceEditor( { property := "stereotype" } )
\      )

#-------- PatternLink -------------------------------------------------------

view.map.*.PatternLink.true =
\   setForeground(RGB(0,64,0));
\   setLineStyle("dashed");
\   addIcon("OpenTriangle","OnDestination");
\   icon = addLabelIcon(getProperty("clientRole"),"UnderRightSource");
\   icon->setInplaceEditor({property:="clientRole"});
\   icon = addLabelIcon(getProperty("supplierRole"),"UnderRightDestination");
\   icon->setInplaceEditor({property:="supplierRole"})

#-------- ExtendsLink ----------------------------------------------------------

view.map.*.ExtendsLink.true =
\   setForeground(RGB(0,64,64));
\   setLineStyle("dashed");
\   addIcon("OpenTriangle","OnDestination");
\   addLabelIcon("<<extend>>","AboveLeftCenter");
\   nameIcon = addLabelIcon(getProperty("label"),"UnderRightCenter");
\   nameIcon->setInplaceEditor({property:="label", default:=true});
\   if( hasProperty("condition"),
\       conditionIcon = addLabelIcon("["+getProperty("condition")+"]","AboveLeftCenter");
\       conditionIcon->setInplaceEditor({property:="condition", default:=true})
\     )


#-------- UsesLink -------------------------------------------------------------

view.map.*.UsesLink.true =
\   setForeground(RGB(0,128,128));
\   addIcon("WideFilledTriangle","OnDestination");
\   addLabelIcon("<<use>>","AboveLeftCenter");
\   icon = addLabelIcon(getProperty("label"),"AsideCenter");
\   icon->setInplaceEditor({property:="label"})

#-------- GeneralizationLink ---------------------------------------------------

view.map.*.GeneralizationLink.true =
\   setForeground(RGB(0,64,64));
\   setBackground(RGB(255,255,255));
\   setLayoutDirection("direct");
\   setMerged();
\   addIcon("FilledTriangle","OnDestination");
\   if(hasOption("option.dependencyLinks.showBetweenClasses"),
\     hideElement(findAutodependencyLink())
\     )


#-------- ImplementationLink ---------------------------------------------------

view.map.*.ImplementationLink.true =
\   setForeground(RGB(0,128,128));
\   setBackground(RGB(255,255,255));
\   setLineStyle("dashed");
\   setLayoutDirection("direct");
\   setMerged();
\   addIcon("FilledTriangle","OnDestination");
\   if(hasOption("option.dependencyLinks.showBetweenClasses"),
\     hideElement(findAutodependencyLink())
\     )

#-------- InstantiationLink ----------------------------------------------------

view.map.*.InstantiationLink.true =
\   setForeground(RGB(130,25,0));
\   addIcon("OpenTriangle","OnDestination");
\   icon = addLabelIcon(getProperty("label"),"AsideCenter");
\   icon->setInplaceEditor({property:="label"})

#-------- NoteLink -------------------------------------------------------------

view.map.*.NoteLink.true =
\   setForeground(RGB(128,0,128));
\   setLineStyle("dashed")

#-------- TransitionLink -------------------------------------------------------

view.map.*.TransitionLink.true =
\   setForeground(black);
\   addIcon("OpenTriangle","OnDestination");
\   setLayoutDirection("reverse");
\   labelString =
\     if(hasProperty("event"), getProperty("event"), "") +
\     if(hasProperty("eventArguments"),"(" + getProperty("eventArguments") + ")", "") +
\     if(hasProperty("condition"),"[" + getProperty("condition") + "]", "") +
\     if(hasProperty("$action"),"/" + getProperty("$action"), "") +
\     if(hasProperty("sendClause"),"^" + getProperty("sendClause"), "");
\
\   if( !hasProperty("event") && labelString != "",
\       labelString = "" + labelString );
\   icon = addLabelIcon( labelString, "AsideCenter");
\   icon->setInplaceEditor( { outProperty:="$transitionInplaceEditing", default:=true } );
\   if( hasProperty( "sendTime" ),
\       icon = addLabelIcon( getProperty( "sendTime" ), "UnderRightSource" );
\       icon->setInplaceEditor( { property:="sendTime" } )
\     );
\   if( hasProperty( "receiveTime" ),
\       icon = addLabelIcon( getProperty( "receiveTime" ), "UnderRightDestination" );
\       icon->setInplaceEditor( { property:="receiveTime" } )
\     );
\   if( hasProperty( "constraint" ),
\       icon = addLabelIcon( "{" + getProperty( "constraint" ) + "}", "UnderRightCenter" );
\       icon->setInplaceEditor( { property:="constraint" } )
\      )

#TODO - inplace editor!

#-------- ObjectFlowLink -------------------------------------------------------

view.map.*.ObjectFlowLink.true =
\   setForeground(black);
\   setLineStyle("dashed");
\   addIcon("OpenTriangle","OnDestination");
\   setLayoutDirection("reverse");
\   icon = addLabelIcon( getProperty("label"),"AsideCenter");
\   icon->setInplaceEditor({property:="label", default:=true })

#-------- UsageLink ------------------------------------------------------------

view.map.*.UsageLink.true =
\   setForeground(black);
\   addIcon("OpenTriangle","OnDestination");
\   icon = addLabelIcon(getProperty("clientRole"),"UnderRightSource");
\   icon->setInplaceEditor({property:="clientRole"});
\   icon = addLabelIcon(getProperty("supplierRole"),"UnderRightDestination");
\   icon->setInplaceEditor({property:="supplierRole"});
\   icon = addLabelIcon(getProperty("label"),"AsideCenter");
\   icon->setInplaceEditor({property:="label", default:=true })

#-------- SupportsLink ------------------------------------------------------------

view.map.*.SupportsLink.true =
\   setForeground(RGB(0,64,64));
\   icon = addLabelIcon(getProperty("label"),"AsideCenter");
\   icon->setInplaceEditor({property:="label", default:=true })

#-------- AssociatesLink -----------------------------------------------------------

view.map.*.AssociatesLink.true =
\   setForeground( blue );
\   if( hasProperty( "directed" ),
\       addIcon( "OpenTriangle", "OnDestination" ) );
\   if( hasProperty( "aggregation" ),
\       icon = addIcon("Rhomb","OnSource");
\       setForeground(RGB(0,0,130))
\     );
\   if( hasProperty( "composition" ),
\       icon = addIcon("Rhomb","OnSource");
\       icon->setBackground( RGB( 0,0,130 ) );
\       setForeground(RGB(0,0,130))
\     );
\   icon = addLabelIcon(getProperty("clientRole"),"UnderRightSource");
\   icon->setInplaceEditor({property:="clientRole"});
\   icon = addLabelIcon(getProperty("supplierRole"),"UnderRightDestination");
\   icon->setInplaceEditor({property:="supplierRole"});
\   icon = addLabelIcon(getProperty("clientCardinality"),"AboveLeftSource");
\   icon->setInplaceEditor({property:="clientCardinality"});
\   icon = addLabelIcon(getProperty("supplierCardinality"),"AboveLeftDestination");
\   icon->setInplaceEditor({property:="supplierCardinality"});
\   icon = addLabelIcon(getProperty("label"),"AsideCenter");
\   icon->setInplaceEditor({property:="label", default:=true})


#-------- Business Process AggregatesLink ------------------------------------------

view.map.*.AggregatesLink.true =
\   setForeground(RGB(0,0,130));
\   if( hasProperty( "directed" ),
\       addIcon( "OpenTriangle", "OnDestination" ) );
\   icon = addIcon("Rhomb","OnSource");
\   if( hasProperty( "composition" ),
\       icon->setBackground( RGB( 0,0,130 ) ) );
\   icon = addLabelIcon(getProperty("supplierCardinality"),"AboveLeftDestination");
\   icon->setInplaceEditor({property:="supplierCardinality"});
\   icon = addLabelIcon(getProperty("label"),"AsideCenter");
\   icon->setInplaceEditor({property:="label", default:=true})

#-------- Business Process IncludesLink --------------------------------------------

view.map.*.IncludesLink.true =
\   setForeground(RGB(0,64,64));
\   setLineStyle("dashed");
\   addIcon("OpenTriangle","OnDestination");
\   addLabelIcon("<<include>>","AboveLeftCenter");
\   icon = addLabelIcon(getProperty("label"),"AsideCenter");
\   icon->setInplaceEditor({property:="label", default:=true})

#-------- Business Process CommunicatesLink ----------------------------------------

view.map.*.CommunicatesLink.true =
\   setForeground(RGB(0,64,64));
\   if( hasProperty( "directed" ),
\       addIcon( "OpenTriangle", "OnDestination" ) );
\   icon = addLabelIcon(getProperty("clientRole"),"UnderRightSource");
\   icon->setInplaceEditor({property:="clientRole"});
\   icon = addLabelIcon(getProperty("supplierRole"),"UnderRightDestination");
\   icon->setInplaceEditor({property:="supplierRole"});
\   icon = addLabelIcon(getProperty("clientCardinality"),"AboveLeftSource");
\   icon->setInplaceEditor({property:="clientCardinality"});
\   icon = addLabelIcon(getProperty("supplierCardinality"),"AboveLeftDestination");
\   icon->setInplaceEditor({property:="supplierCardinality"});
\   icon = addLabelIcon(getProperty("label"),"AsideCenter");
\   icon->setInplaceEditor({property:="label", default:=true})

#-------- Business Process SubscribesLink ------------------------------------------

view.map.*.SubscribesLink.true =
\   setForeground( blue );
\   addIcon("OpenTriangle","OnDestination");
\   addLabelIcon("<<subscribes>>","AboveLeftCenter");
\   icon = addLabelIcon(getProperty("condition"),"UnderRightCenter");
\   icon->setInplaceEditor({property:="condition"});
\   icon = addLabelIcon(getProperty("label"),"AsideCenter");
\   icon->setInplaceEditor({property:="label", default:=true})

#-------- All elements----------------------------------------------------------------------

view.map.*.*.true.background =
\ backgroundColor = RGB(getViewProperty("backgroundColor"));
\ if(backgroundColor != null, setBackground(backgroundColor))

view.map.*.*.true.foreground =
\ foregroundColor = RGB(getViewProperty("foregroundColor"));
\ if(foregroundColor != null, setForeground(foregroundColor))

