Package org.eclipse.sapphire.ui

Examples of org.eclipse.sapphire.ui.SourceEditorService


        {
          property0 = ((WithPart)part).property();
        }
        final Element element = part.getLocalModelElement();
       
        final SourceEditorService sourceEditorService = element.adapt( SourceEditorService.class );
       
        if( sourceEditorService == null )
        {
            return;
        }
       
        boolean contribute = false;
       
        if( property0 == null )
        {
          contribute = true;
        }
        else if( ! property0.definition().isDerived() )
        {
            contribute = ! property0.empty();
        }
       
        if( ! contribute )
        {
            return;
        }

        final Property property = property0;
        final PropertyEditorAssistContribution.Factory contribution = PropertyEditorAssistContribution.factory();
       
        contribution.text( "<p><a href=\"action\" nowrap=\"true\">" + escapeForXml( action.text() ) + "</a></p>" );
       
        contribution.link
        (
            "action",
            new Runnable()
            {
                public void run()
                {
                    sourceEditorService.show( element, property != null ? property.definition() : null);
                }
            }
        );
       
        final PropertyEditorAssistSection section = context.getSection( SECTION_ID_ACTIONS );
View Full Code Here


{
    @Override
    protected boolean evaluate()
    {
        final Element element = getPart().getModelElement();
        final SourceEditorService service = element.adapt( SourceEditorService.class );
       
        if( service != null )
        {
            try
            {
                return service.find( element, null );
            }
            catch( Exception e )
            {
                Sapphire.service( LoggingService.class ).log( e );
            }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.ui.SourceEditorService

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.