Package org.eclipse.sapphire.ui

Examples of org.eclipse.sapphire.ui.SapphireEditorPagePart$PropertiesViewContributionChangedEvent


        return new FunctionResult( this, context )
        {
            @Override
            protected Object evaluate()
            {
                SapphireEditorPagePart page = null;
               
                if( context instanceof PartFunctionContext )
                {
                    page = ( (PartFunctionContext) context ).part().nearest( SapphireEditorPagePart.class );
                }
               
                if( page == null )
                {
                    throw new FunctionException( editorPageNotFound.text() );
                }
               
                return page.state();
            }
        };
    }
View Full Code Here


    }

    @Override
    protected void createFormContent( final IManagedForm managedForm )
    {
        final SapphireEditorPagePart part = getPart();
        final ScrolledForm form = managedForm.getForm();
       
        try
        {
            FormToolkit toolkit = managedForm.getToolkit();
            toolkit.decorateFormHeading(managedForm.getForm().getForm());
           
            this.mainSection = new RootSection();
            this.mainSection.createContent( managedForm );
           
            final ISapphireDocumentation doc = getDefinition().getDocumentation().content();
           
            if( doc != null )
            {
                ISapphireDocumentationDef docdef = null;
               
                if( doc instanceof ISapphireDocumentationDef )
                {
                    docdef = (ISapphireDocumentationDef) doc;
                }
                else
                {
                    docdef = ( (ISapphireDocumentationRef) doc ).resolve();
                }
               
                if( docdef != null )
                {
                    HelpSystem.setHelp( managedForm.getForm().getBody(), docdef );
                }
            }
           
            final SapphireActionGroup actions = part.getActions( CONTEXT_EDITOR_PAGE );
           
            final SapphireActionPresentationManager actionPresentationManager = new SapphireActionPresentationManager( this.presentation, actions );
           
            final SapphireToolBarManagerActionPresentation toolbarActionPresentation = new SapphireToolBarManagerActionPresentation( actionPresentationManager );
            final IToolBarManager toolbarManager = form.getToolBarManager();
            toolbarActionPresentation.setToolBarManager( toolbarManager );
            toolbarActionPresentation.render();
           
            final SapphireKeyboardActionPresentation keyboardActionPresentation = new SapphireKeyboardActionPresentation( actionPresentationManager );
            keyboardActionPresentation.attach( toolbarActionPresentation.getToolBar() );
            keyboardActionPresentation.render();
           
            part.attach
            (
                new FilteredListener<MasterDetailsEditorPagePart.DetailsFocusRequested>()
                {
                    @Override
                    protected void handleTypedEvent( final MasterDetailsEditorPagePart.DetailsFocusRequested event )
View Full Code Here

            this.filteredTree = createContentOutline( this.outerComposite, outline(), false );
            this.filteredTree.setLayoutData( gdfill() );
           
            this.treeViewer = this.filteredTree.getViewer();
           
            final SapphireEditorPagePart part = getPart();
           
            final SapphireActionGroup actions = part.getActions( CONTEXT_EDITOR_PAGE_OUTLINE_HEADER );
           
            this.actionPresentationManager = new SapphireActionPresentationManager( MasterDetailsEditorPage.this.presentation, actions );
           
            final SapphireToolBarManagerActionPresentation toolbarActionsPresentation = new SapphireToolBarManagerActionPresentation( this.actionPresentationManager );
           
View Full Code Here

            {
                this.actionPresentationManager.dispose();
                this.actionPresentationManager = null;
            }
           
            final SapphireEditorPagePart part = getPart();
            final SapphireActionGroup actions;
           
            if( selection.size() == 1 )
            {
                final MasterDetailsContentNodePart node = selection.get( 0 );
View Full Code Here

            this.marginWidth = 10;
            this.marginHeight = 10;
            setLayoutData( gdfill() );
            setLayout( glayout( 1, 0, 0 ) );
           
            final SapphireEditorPagePart part = getPart();
           
            final Listener pagePartListener = new FilteredListener<OutlineHeaderTextEvent>()
            {
                @Override
                protected void handleTypedEvent( final OutlineHeaderTextEvent event )
                {
                    refreshOutlineHeaderText();
                }
            };
           
            part.attach( pagePartListener );
           
            refreshOutlineHeaderText();
           
            final Composite client = toolkit.createComposite( this );
            client.setLayout( glayout( 1, 0, 0 ) );
           
            this.managedForm = managedForm;
           
            final MasterDetailsContentOutline contentTree = outline();
           
            final FilteredTree filteredTree = createContentOutline( client, contentTree, true );
            this.treeViewer = filteredTree.getViewer();
            this.tree = this.treeViewer.getTree();
           
            this.sectionPart = new org.eclipse.ui.forms.SectionPart( this );
            this.managedForm.addPart( this.sectionPart );
   
            contentTree.attach
            (
                new FilteredListener<MasterDetailsContentOutline.SelectionChangedEvent>()
                {
                    @Override
                    protected void handleTypedEvent( final MasterDetailsContentOutline.SelectionChangedEvent event )
                    {
                        handleSelectionChangedEvent( event.selection() );
                    }
                }
            );
           
            final ToolBar toolbar = new ToolBar( this, SWT.FLAT | SWT.HORIZONTAL );
            setTextClient( toolbar );
           
            final SapphireActionGroup actions = part.getActions( CONTEXT_EDITOR_PAGE_OUTLINE_HEADER );
           
            final SapphireActionPresentationManager actionPresentationManager
                = new SapphireActionPresentationManager( MasterDetailsEditorPage.this.presentation, actions );
           
            final SapphireToolBarActionPresentation toolbarActionsPresentation = new SapphireToolBarActionPresentation( actionPresentationManager );
           
            toolbarActionsPresentation.setToolBar( toolbar );
            toolbarActionsPresentation.render();
           
            final SapphireKeyboardActionPresentation keyboardActionsPresentation = new SapphireKeyboardActionPresentation( actionPresentationManager );
            keyboardActionsPresentation.attach( filteredTree.getFilterControl() );
            keyboardActionsPresentation.render();
           
            toolkit.paintBordersFor( this );
            setClient( client );
           
            this.tree.addDisposeListener
            (
                new DisposeListener()
                {
                    public void widgetDisposed( final DisposeEvent event )
                    {
                        part.detach( pagePartListener );
                    }
                }
            );
        }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.ui.SapphireEditorPagePart$PropertiesViewContributionChangedEvent

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.