Package org.eclipse.sapphire

Examples of org.eclipse.sapphire.Element


    @Override
    @SuppressWarnings( "unchecked" )
    protected Object run( final Presentation context )
    {
        final MasterDetailsContentNodePart node = (MasterDetailsContentNodePart) getPart();
        final Element element = node.getModelElement();
        final ElementList<Element> list = (ElementList<Element>) element.parent();
       
        list.moveUp( element );
       
        return null;
    }
View Full Code Here


        return state;
    }

    private void updateCurrentPage( final boolean force )
    {
        final Element child = ( (ElementHandle<?>) this.property ).content();
       
        if( force == true || this.elementForChildParts != child )
        {
            this.elementForChildParts = child;
            changePage( this.elementForChildParts );
View Full Code Here

    {
        boolean enabled = super.computeEnabledState();
       
        if( enabled )
        {
            final Element element = getModelElement();
            final ElementList<?> list = (ElementList<?>) element.parent();
            enabled = ( list.indexOf( element ) > 0 );
        }
       
        return enabled;
    }
View Full Code Here

        return new Children()
        {
            @Override
            protected void init( final ListFactory<SplitFormSectionPart> childPartsListFactory )
            {
                final Element element = getLocalModelElement();
               
                for( final PartDef childPartDef : definition().getSections() )
                {
                    childPartsListFactory.add( (SplitFormSectionPart) createWithoutInit( SplitFormPart.this, element, childPartDef, SplitFormPart.this.params ) );
                }
View Full Code Here

    }
   
    @Override
    protected Status compute()
    {
        final Element element = context( Element.class );
       
        if( element.property( context( ValueProperty.class ) ).text() != null )
        {
            final IProject project = element.adapt( IProject.class );
           
            if( project == null )
            {
                return Status.createErrorStatus( message.text() );
            }
View Full Code Here

   
    @Override
    public void contribute( final PropertyEditorAssistContext context )
    {
      SapphirePart part = context.getPart();
        final Element element = part.getLocalModelElement();
        Property property = null;
        if (part instanceof PropertyEditorPart)
        {
          property = ((PropertyEditorPart)part).property();
        }
        else if (part instanceof WithPart)
        {
          property = ((WithPart)part).property();
        }
       
        boolean contribute = false;
       
        if( property == null )
        {
          contribute = ! element.validation().ok();
        }
        else if( ! property.validation().ok() )
        {
            contribute = true;
        }
        else
        {
            contribute = ! property.empty();
        }
       
        if( contribute )
        {
          final Set<String> facts;
         
          if( property != null )
          {
            facts = property.service( FactsAggregationService.class ).facts();
          }
          else
          {
            FactsAggregationService service = element.service( FactsAggregationService.class );
            facts = service != null ? service.facts() : new TreeSet<String>();       
          }
         
            for( String fact : facts )
            {
View Full Code Here

    }

    @Override
    protected final String readListString()
    {
        final Element parent = property().element();
        final XmlElement parentXmlElement = ( (XmlResource) parent.resource() ).getXmlElement();
       
        if( parentXmlElement == null )
        {
            return null;
        }
View Full Code Here

    }

    @Override
    protected final void writeListString( String str )
    {
        final Element parent = property().element();
        final XmlElement parentXmlElement = ( (XmlResource) parent.resource() ).getXmlElement( true );
        final XmlNode listXmlNode = parentXmlElement.getChildNode( this.path, false );
       
        if( str == null )
        {
            if( listXmlNode != null )
View Full Code Here

        }
        else if (part instanceof WithPart)
        {
          property0 = ((WithPart)part).property();
        }
        final Element element = part.getLocalModelElement();
       
        final SourceEditorService sourceEditorService = element.adapt( SourceEditorService.class );
       
        if( sourceEditorService == null )
        {
            return;
        }
View Full Code Here

        }
       
        if( this.lastDomNode != node )
        {
            final XmlResourceStore store = adapt( RootXmlResource.class ).store();
            final Element modelElement = element();
           
            if( this.lastDomNode != null )
            {
                store.unregisterModelElement( this.lastDomNode, modelElement );
            }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.Element

Copyright © 2018 www.massapicom. 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.