Package org.eclipse.sapphire

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


    protected Object run( final Presentation context )
    {
        final MasterDetailsContentNodePart node = (MasterDetailsContentNodePart) getPart();
        final Element element = node.getLocalModelElement();
       
        element.adapt( SourceEditorService.class ).show( element, null );
       
        return null;
    }
  
}
View Full Code Here


    {
        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

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

        {
            final Element element = getLocalModelElement();
           
            if( element != null )
            {
                result = element.adapt( adapterType );
            }
        }
   
        if( result == null && this.parent != null )
        {
View Full Code Here

    @Override
    public ImageData convert( final String string )
    {
        final Element element = context( Element.class );
        final Context ctxt = element.adapt( Context.class );
       
        InputStream stream = null;
       
        if( string != null && ! string.contains( "/" ) )
        {
View Full Code Here

    @Override
    protected void initReferenceService()
    {
        final Element element = context( Element.class );
       
        this.context = element.adapt( Context.class );
       
        if( this.context == null )
        {
            this.context = Context.adapt( element.type().getModelElementClass().getClassLoader() );
        }
View Full Code Here

    protected boolean evaluate()
    {
        final MasterDetailsContentNodePart node = (MasterDetailsContentNodePart) getPart();
        final Element element = node.getLocalModelElement();
       
        if( element.adapt( SourceEditorService.class ) != null )
        {
            final MasterDetailsContentNodePart parent = node.getParentNode();
           
            if( parent == null || parent.getLocalModelElement() != node.getLocalModelElement() )
            {
View Full Code Here

{
    @Override
    protected boolean evaluate()
    {
        final Element element = getPart().getModelElement();
        final SourceEditorService service = element.adapt( SourceEditorService.class );
       
        if( service != null )
        {
            try
            {
View Full Code Here

    @Override
    protected Object run(Presentation context)
    {
        ISapphirePart part = context.part();
        Element element = part.getModelElement();
        element.adapt( SourceEditorService.class ).show( element, null );
        return null;
    }

}
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.