Package org.eclipse.sapphire

Examples of org.eclipse.sapphire.Element.parent()


    private Element findTableRowElement( final Element element )
    {
        final ElementList<?> list = list();
        Element result = element;
       
        for( Property parent = element.parent(); parent != list; parent = result.parent() )
        {
            result = parent.element();
        }
       
        return result;
View Full Code Here


        }
       
        for( MasterDetailsContentNodePart node : nodesToDelete )
        {
            final Element element = node.getModelElement();
            final Property elementParent = element.parent();
           
            if( elementParent.definition() instanceof ListProperty )
            {
                ( (ElementList<?>) elementParent ).remove( element );
            }
View Full Code Here

           
            @Override
            protected Object evaluate()
            {
                final Element element = operand( 0, Element.class, false );
                final Property parent = element.parent();
               
                if( parent instanceof ElementList )
                {
                    final ElementList<?> list = (ElementList<?>) parent;
                   
View Full Code Here

            if (connTemplate.getConnectionType() == DiagramConnectionTemplate.ConnectionType.OneToMany)
            {
                Element connParentElement = connTemplate.getConnectionParentElement(nodeModel);
                if (connParentElement != null)
                {
                    ElementList<?> connParentList = (ElementList<?>) connParentElement.parent();
                    connParentList.remove(connParentElement);
                }
            }
        }
       
View Full Code Here

        else
        {           
            for (StandardDiagramConnectionPart connPart : this.diagramConnections)
            {
                Element connModel = connPart.getLocalModelElement();
                if (connModel.parent().element() == connListParent)
                {
                    connList.add(connPart);
                }
            }           
        }
View Full Code Here

    }
   
    private void deleteShapePart(ShapePart shapePart)
    {
      Element shapeModel = shapePart.getLocalModelElement();
      ElementList<?> list = (ElementList<?>) shapeModel.parent();
      if (!list.disposed())
      {
        list.remove(shapeModel);
      }
    }
View Full Code Here

    }
   
    public void remove()
    {
        final Element element = getLocalModelElement();
        final ElementList<?> list = (ElementList<?>) element.parent();
        list.remove(element)
        pruneListParentIfNecessary(list);
    }
   
    private void pruneListParentIfNecessary(ElementList<?> list)
View Full Code Here

      }
      if (newTargetNode.getLocalModelElement() != getEndpoint2())
      {
        newConnPart.resetEndpoint2(newTargetNode);
      }
          final ElementList<?> list = (ElementList<?>) oldConnElement.parent();
          list.remove(oldConnElement);
          pruneListParentIfNecessary(list);
         
          return newConnPart;
      }
View Full Code Here

   
    public void deleteNode(DiagramNodePart nodePart)
    {
        notifyNodeAboutToBeDeleted(nodePart);
    Element nodeModel = nodePart.getLocalModelElement();   
        ElementList<?> list = (ElementList<?>) nodeModel.parent();
        list.remove(nodeModel);                 
    }
       
    public PropertyDef getModelProperty()
    {
View Full Code Here

                else
                {
                    element = cast( operand( 0 ), Element.class );
                }
               
                final Property parent = element.parent();
               
                return ( parent == null ? null : parent.element() );
            }
        };
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.