类org.eclipse.ui.views.contentoutline.ContentOutlinePage源码实例Demo

下面列出了怎么用org.eclipse.ui.views.contentoutline.ContentOutlinePage的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: birt   文件: MultiPageReportEditor.java

public void outlineSwitch( )
{
	if ( !getActivePageInstance( ).getId( ).equals( XMLSourcePage_ID )
			|| outlinePage == null )
	{
		return;
	}

	if ( outlinePage.getCurrentPage( ) instanceof DesignerOutlinePage )
	{
		outlinePage.setActivePage( (IPageBookViewPage) getActivePageInstance( ).getAdapter( ContentOutlinePage.class ) );
	}
	else
	{
		outlinePage.setActivePage( (IPageBookViewPage) getActivePageInstance( ).getAdapter( IContentOutlinePage.class ) );
	}
	outlinePage.getSite( ).getActionBars( ).updateActionBars( );
}
 
源代码2 项目: birt   文件: MultiPageReportEditor.java

public boolean reloadOutlinePage( )
{
	if ( !getActivePageInstance( ).getId( ).equals( XMLSourcePage_ID )
			|| outlinePage == null
			|| !getCurrentPageInstance( ).getId( )
					.equals( XMLSourcePage_ID ) )
	{
		return false;
	}

	if ( outlinePage.getCurrentPage( ) instanceof DesignerOutlinePage
			|| outlinePage.getCurrentPage( ) == null
			|| outlinePage.getCurrentPage( ) instanceof EmptyPage )
	{
		outlinePage.setActivePage( (IPageBookViewPage) getActivePageInstance( ).getAdapter( IContentOutlinePage.class ) );
	}
	else
	{
		outlinePage.setActivePage( (IPageBookViewPage) getActivePageInstance( ).getAdapter( ContentOutlinePage.class ) );
	}
	if ( outlinePage.getSite( ) != null )
	{
		outlinePage.getSite( ).getActionBars( ).updateActionBars( );
	}
	return true;
}
 
源代码3 项目: neoscada   文件: ProtocolEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage ()
{
    if ( contentOutlinePage == null )
    {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage
        {
            @Override
            public void createControl ( Composite parent )
            {
                super.createControl ( parent );
                contentOutlineViewer = getTreeViewer ();
                contentOutlineViewer.addSelectionChangedListener ( this );

                // Set up the tree viewer.
                //
                contentOutlineViewer.setContentProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
                contentOutlineViewer.setLabelProvider ( new AdapterFactoryLabelProvider ( adapterFactory ) );
                contentOutlineViewer.setInput ( editingDomain.getResourceSet () );

                // Make sure our popups work.
                //
                createContextMenuFor ( contentOutlineViewer );

                if ( !editingDomain.getResourceSet ().getResources ().isEmpty () )
                {
                    // Select the root object in the view.
                    //
                    contentOutlineViewer.setSelection ( new StructuredSelection ( editingDomain.getResourceSet ().getResources ().get ( 0 ) ), true );
                }
            }

            @Override
            public void makeContributions ( IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager )
            {
                super.makeContributions ( menuManager, toolBarManager, statusLineManager );
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars ( IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                getActionBarContributor ().shareGlobalActions ( this, actionBars );
            }
        }

        contentOutlinePage = new MyContentOutlinePage ();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener
                ( new ISelectionChangedListener ()
                {
                    // This ensures that we handle selections correctly.
                    //
                    public void selectionChanged ( SelectionChangedEvent event )
                    {
                        handleContentOutlineSelection ( event.getSelection () );
                    }
                } );
    }

    return contentOutlinePage;
}
 
源代码4 项目: neoscada   文件: ChartEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated
 */
public IContentOutlinePage getContentOutlinePage ()
{
    if ( this.contentOutlinePage == null )
    {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage
        {
            @Override
            public void createControl ( final Composite parent )
            {
                super.createControl ( parent );
                ChartEditor.this.contentOutlineViewer = getTreeViewer ();
                ChartEditor.this.contentOutlineViewer.addSelectionChangedListener ( this );

                // Set up the tree viewer.
                //
                ChartEditor.this.contentOutlineViewer
                        .setContentProvider ( new AdapterFactoryContentProvider (
                                ChartEditor.this.adapterFactory ) );
                ChartEditor.this.contentOutlineViewer
                        .setLabelProvider ( new AdapterFactoryLabelProvider (
                                ChartEditor.this.adapterFactory ) );
                ChartEditor.this.contentOutlineViewer.setInput ( ChartEditor.this.editingDomain
                        .getResourceSet () );

                // Make sure our popups work.
                //
                createContextMenuFor ( ChartEditor.this.contentOutlineViewer );

                if ( !ChartEditor.this.editingDomain.getResourceSet ().getResources ()
                        .isEmpty () )
                {
                    // Select the root object in the view.
                    //
                    ChartEditor.this.contentOutlineViewer
                            .setSelection ( new StructuredSelection (
                                    ChartEditor.this.editingDomain.getResourceSet ()
                                            .getResources ().get ( 0 ) ), true );
                }
            }

            @Override
            public void makeContributions ( final IMenuManager menuManager,
                    final IToolBarManager toolBarManager,
                    final IStatusLineManager statusLineManager )
            {
                super.makeContributions ( menuManager, toolBarManager,
                        statusLineManager );
                ChartEditor.this.contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars ( final IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                getActionBarContributor ().shareGlobalActions ( this,
                        actionBars );
            }
        }

        this.contentOutlinePage = new MyContentOutlinePage ();

        // Listen to selection so that we can handle it is a special way.
        //
        this.contentOutlinePage
                .addSelectionChangedListener ( new ISelectionChangedListener () {
                    // This ensures that we handle selections correctly.
                    //
                    @Override
                    public void selectionChanged ( final SelectionChangedEvent event )
                    {
                        handleContentOutlineSelection ( event.getSelection () );
                    }
                } );
    }

    return this.contentOutlinePage;
}
 
源代码5 项目: neoscada   文件: DetailViewEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage ()
{
    if ( contentOutlinePage == null )
    {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage
        {
            @Override
            public void createControl ( Composite parent )
            {
                super.createControl ( parent );
                contentOutlineViewer = getTreeViewer ();
                contentOutlineViewer.addSelectionChangedListener ( this );

                // Set up the tree viewer.
                //
                contentOutlineViewer.setContentProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
                contentOutlineViewer.setLabelProvider ( new AdapterFactoryLabelProvider ( adapterFactory ) );
                contentOutlineViewer.setInput ( editingDomain.getResourceSet () );

                // Make sure our popups work.
                //
                createContextMenuFor ( contentOutlineViewer );

                if ( !editingDomain.getResourceSet ().getResources ().isEmpty () )
                {
                    // Select the root object in the view.
                    //
                    contentOutlineViewer.setSelection ( new StructuredSelection ( editingDomain.getResourceSet ().getResources ().get ( 0 ) ), true );
                }
            }

            @Override
            public void makeContributions ( IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager )
            {
                super.makeContributions ( menuManager, toolBarManager, statusLineManager );
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars ( IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                getActionBarContributor ().shareGlobalActions ( this, actionBars );
            }
        }

        contentOutlinePage = new MyContentOutlinePage ();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener
                ( new ISelectionChangedListener ()
                {
                    // This ensures that we handle selections correctly.
                    //
                    public void selectionChanged ( SelectionChangedEvent event )
                    {
                        handleContentOutlineSelection ( event.getSelection () );
                    }
                } );
    }

    return contentOutlinePage;
}
 
源代码6 项目: neoscada   文件: VisualInterfaceEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage ()
{
    if ( contentOutlinePage == null )
    {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage
        {
            @Override
            public void createControl ( Composite parent )
            {
                super.createControl ( parent );
                contentOutlineViewer = getTreeViewer ();
                contentOutlineViewer.addSelectionChangedListener ( this );

                // Set up the tree viewer.
                //
                contentOutlineViewer.setUseHashlookup ( true );
                contentOutlineViewer.setContentProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
                contentOutlineViewer.setLabelProvider ( new AdapterFactoryLabelProvider ( adapterFactory ) );
                contentOutlineViewer.setInput ( editingDomain.getResourceSet () );

                // Make sure our popups work.
                //
                createContextMenuFor ( contentOutlineViewer );

                if ( !editingDomain.getResourceSet ().getResources ().isEmpty () )
                {
                    // Select the root object in the view.
                    //
                    contentOutlineViewer.setSelection ( new StructuredSelection ( editingDomain.getResourceSet ().getResources ().get ( 0 ) ), true );
                }
            }

            @Override
            public void makeContributions ( IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager )
            {
                super.makeContributions ( menuManager, toolBarManager, statusLineManager );
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars ( IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                getActionBarContributor ().shareGlobalActions ( this, actionBars );
            }
        }

        contentOutlinePage = new MyContentOutlinePage ();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener ( new ISelectionChangedListener () {
            // This ensures that we handle selections correctly.
            //
            public void selectionChanged ( SelectionChangedEvent event )
            {
                handleContentOutlineSelection ( event.getSelection () );
            }
        } );
    }

    return contentOutlinePage;
}
 
源代码7 项目: neoscada   文件: DeploymentEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage ()
{
    if ( contentOutlinePage == null )
    {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage
        {
            @Override
            public void createControl ( Composite parent )
            {
                super.createControl ( parent );
                contentOutlineViewer = getTreeViewer ();
                contentOutlineViewer.addSelectionChangedListener ( this );

                // Set up the tree viewer.
                //
                contentOutlineViewer.setContentProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
                contentOutlineViewer.setLabelProvider ( new DelegatingStyledCellLabelProvider ( new DecoratingColumLabelProvider.StyledLabelProvider ( new AdapterFactoryLabelProvider.StyledLabelProvider ( adapterFactory, contentOutlineViewer ), new DiagnosticDecorator.Styled ( editingDomain.getResourceSet (), contentOutlineViewer ) ) ) );
                contentOutlineViewer.setInput ( editingDomain.getResourceSet () );

                new ColumnViewerInformationControlToolTipSupport ( contentOutlineViewer, new DiagnosticDecorator.Styled.EditingDomainLocationListener ( editingDomain, contentOutlineViewer ) );

                // Make sure our popups work.
                //
                createContextMenuFor ( contentOutlineViewer );

                if ( !editingDomain.getResourceSet ().getResources ().isEmpty () )
                {
                    // Select the root object in the view.
                    //
                    contentOutlineViewer.setSelection ( new StructuredSelection ( editingDomain.getResourceSet ().getResources ().get ( 0 ) ), true );
                }
            }

            @Override
            public void makeContributions ( IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager )
            {
                super.makeContributions ( menuManager, toolBarManager, statusLineManager );
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars ( IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                getActionBarContributor ().shareGlobalActions ( this, actionBars );
            }
        }

        contentOutlinePage = new MyContentOutlinePage ();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener ( new ISelectionChangedListener () {
            // This ensures that we handle selections correctly.
            //
            public void selectionChanged ( SelectionChangedEvent event )
            {
                handleContentOutlineSelection ( event.getSelection () );
            }
        } );
    }

    return contentOutlinePage;
}
 
源代码8 项目: neoscada   文件: SetupEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage ()
{
    if ( contentOutlinePage == null )
    {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage
        {
            @Override
            public void createControl ( Composite parent )
            {
                super.createControl ( parent );
                contentOutlineViewer = getTreeViewer ();
                contentOutlineViewer.addSelectionChangedListener ( this );

                // Set up the tree viewer.
                //
                contentOutlineViewer.setContentProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
                contentOutlineViewer.setLabelProvider ( new DelegatingStyledCellLabelProvider ( new DecoratingColumLabelProvider.StyledLabelProvider ( new AdapterFactoryLabelProvider.StyledLabelProvider ( adapterFactory, contentOutlineViewer ), new DiagnosticDecorator.Styled ( editingDomain.getResourceSet (), contentOutlineViewer ) ) ) );
                contentOutlineViewer.setInput ( editingDomain.getResourceSet () );

                new ColumnViewerInformationControlToolTipSupport ( contentOutlineViewer, new DiagnosticDecorator.Styled.EditingDomainLocationListener ( editingDomain, contentOutlineViewer ) );

                // Make sure our popups work.
                //
                createContextMenuFor ( contentOutlineViewer );

                if ( !editingDomain.getResourceSet ().getResources ().isEmpty () )
                {
                    // Select the root object in the view.
                    //
                    contentOutlineViewer.setSelection ( new StructuredSelection ( editingDomain.getResourceSet ().getResources ().get ( 0 ) ), true );
                }
            }

            @Override
            public void makeContributions ( IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager )
            {
                super.makeContributions ( menuManager, toolBarManager, statusLineManager );
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars ( IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                getActionBarContributor ().shareGlobalActions ( this, actionBars );
            }
        }

        contentOutlinePage = new MyContentOutlinePage ();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener ( new ISelectionChangedListener () {
            // This ensures that we handle selections correctly.
            //
            public void selectionChanged ( SelectionChangedEvent event )
            {
                handleContentOutlineSelection ( event.getSelection () );
            }
        } );
    }

    return contentOutlinePage;
}
 
源代码9 项目: neoscada   文件: ProfileEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage ()
{
    if ( contentOutlinePage == null )
    {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage
        {
            @Override
            public void createControl ( Composite parent )
            {
                super.createControl ( parent );
                contentOutlineViewer = getTreeViewer ();
                contentOutlineViewer.addSelectionChangedListener ( this );

                // Set up the tree viewer.
                //
                contentOutlineViewer.setContentProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
                contentOutlineViewer.setLabelProvider ( new DelegatingStyledCellLabelProvider ( new DecoratingColumLabelProvider.StyledLabelProvider ( new AdapterFactoryLabelProvider.StyledLabelProvider ( adapterFactory, contentOutlineViewer ), new DiagnosticDecorator.Styled ( editingDomain.getResourceSet (), contentOutlineViewer ) ) ) );
                contentOutlineViewer.setInput ( editingDomain.getResourceSet () );

                new ColumnViewerInformationControlToolTipSupport ( contentOutlineViewer, new DiagnosticDecorator.Styled.EditingDomainLocationListener ( editingDomain, contentOutlineViewer ) );

                // Make sure our popups work.
                //
                createContextMenuFor ( contentOutlineViewer );

                if ( !editingDomain.getResourceSet ().getResources ().isEmpty () )
                {
                    // Select the root object in the view.
                    //
                    contentOutlineViewer.setSelection ( new StructuredSelection ( editingDomain.getResourceSet ().getResources ().get ( 0 ) ), true );
                }
            }

            @Override
            public void makeContributions ( IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager )
            {
                super.makeContributions ( menuManager, toolBarManager, statusLineManager );
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars ( IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                getActionBarContributor ().shareGlobalActions ( this, actionBars );
            }
        }

        contentOutlinePage = new MyContentOutlinePage ();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener ( new ISelectionChangedListener () {
            // This ensures that we handle selections correctly.
            //
            public void selectionChanged ( SelectionChangedEvent event )
            {
                handleContentOutlineSelection ( event.getSelection () );
            }
        } );
    }

    return contentOutlinePage;
}
 
源代码10 项目: neoscada   文件: OsgiEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage ()
{
    if ( contentOutlinePage == null )
    {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage
        {
            @Override
            public void createControl ( Composite parent )
            {
                super.createControl ( parent );
                contentOutlineViewer = getTreeViewer ();
                contentOutlineViewer.addSelectionChangedListener ( this );

                // Set up the tree viewer.
                //
                contentOutlineViewer.setContentProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
                contentOutlineViewer.setLabelProvider ( new DelegatingStyledCellLabelProvider ( new DecoratingColumLabelProvider.StyledLabelProvider ( new AdapterFactoryLabelProvider.StyledLabelProvider ( adapterFactory, contentOutlineViewer ), new DiagnosticDecorator.Styled ( editingDomain.getResourceSet (), contentOutlineViewer ) ) ) );
                contentOutlineViewer.setInput ( editingDomain.getResourceSet () );

                new ColumnViewerInformationControlToolTipSupport ( contentOutlineViewer, new DiagnosticDecorator.Styled.EditingDomainLocationListener ( editingDomain, contentOutlineViewer ) );

                // Make sure our popups work.
                //
                createContextMenuFor ( contentOutlineViewer );

                if ( !editingDomain.getResourceSet ().getResources ().isEmpty () )
                {
                    // Select the root object in the view.
                    //
                    contentOutlineViewer.setSelection ( new StructuredSelection ( editingDomain.getResourceSet ().getResources ().get ( 0 ) ), true );
                }
            }

            @Override
            public void makeContributions ( IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager )
            {
                super.makeContributions ( menuManager, toolBarManager, statusLineManager );
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars ( IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                getActionBarContributor ().shareGlobalActions ( this, actionBars );
            }
        }

        contentOutlinePage = new MyContentOutlinePage ();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener ( new ISelectionChangedListener () {
            // This ensures that we handle selections correctly.
            //
            public void selectionChanged ( SelectionChangedEvent event )
            {
                handleContentOutlineSelection ( event.getSelection () );
            }
        } );
    }

    return contentOutlinePage;
}
 
源代码11 项目: neoscada   文件: WorldEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage ()
{
    if ( contentOutlinePage == null )
    {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage
        {
            @Override
            public void createControl ( Composite parent )
            {
                super.createControl ( parent );
                contentOutlineViewer = getTreeViewer ();
                contentOutlineViewer.addSelectionChangedListener ( this );

                // Set up the tree viewer.
                //
                contentOutlineViewer.setContentProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
                contentOutlineViewer.setLabelProvider ( new DelegatingStyledCellLabelProvider ( new DecoratingColumLabelProvider.StyledLabelProvider ( new AdapterFactoryLabelProvider.StyledLabelProvider ( adapterFactory, contentOutlineViewer ), new DiagnosticDecorator.Styled ( editingDomain.getResourceSet (), contentOutlineViewer ) ) ) );
                contentOutlineViewer.setInput ( editingDomain.getResourceSet () );

                new ColumnViewerInformationControlToolTipSupport ( contentOutlineViewer, new DiagnosticDecorator.Styled.EditingDomainLocationListener ( editingDomain, contentOutlineViewer ) );

                // Make sure our popups work.
                //
                createContextMenuFor ( contentOutlineViewer );

                if ( !editingDomain.getResourceSet ().getResources ().isEmpty () )
                {
                    // Select the root object in the view.
                    //
                    contentOutlineViewer.setSelection ( new StructuredSelection ( editingDomain.getResourceSet ().getResources ().get ( 0 ) ), true );
                }
            }

            @Override
            public void makeContributions ( IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager )
            {
                super.makeContributions ( menuManager, toolBarManager, statusLineManager );
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars ( IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                getActionBarContributor ().shareGlobalActions ( this, actionBars );
            }
        }

        contentOutlinePage = new MyContentOutlinePage ();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener ( new ISelectionChangedListener () {
            // This ensures that we handle selections correctly.
            //
            public void selectionChanged ( SelectionChangedEvent event )
            {
                handleContentOutlineSelection ( event.getSelection () );
            }
        } );
    }

    return contentOutlinePage;
}
 
源代码12 项目: neoscada   文件: MemoryEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage ()
{
    if ( contentOutlinePage == null )
    {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage
        {
            @Override
            public void createControl ( Composite parent )
            {
                super.createControl ( parent );
                contentOutlineViewer = getTreeViewer ();
                contentOutlineViewer.addSelectionChangedListener ( this );

                // Set up the tree viewer.
                //
                contentOutlineViewer.setContentProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
                contentOutlineViewer.setLabelProvider ( new DelegatingStyledCellLabelProvider ( new AdapterFactoryLabelProvider.StyledLabelProvider ( adapterFactory, contentOutlineViewer ) ) );
                contentOutlineViewer.setInput ( editingDomain.getResourceSet () );

                // Make sure our popups work.
                //
                createContextMenuFor ( contentOutlineViewer );

                if ( !editingDomain.getResourceSet ().getResources ().isEmpty () )
                {
                    // Select the root object in the view.
                    //
                    contentOutlineViewer.setSelection ( new StructuredSelection ( editingDomain.getResourceSet ().getResources ().get ( 0 ) ), true );
                }
            }

            @Override
            public void makeContributions ( IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager )
            {
                super.makeContributions ( menuManager, toolBarManager, statusLineManager );
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars ( IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                getActionBarContributor ().shareGlobalActions ( this, actionBars );
            }
        }

        contentOutlinePage = new MyContentOutlinePage ();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener ( new ISelectionChangedListener () {
            // This ensures that we handle selections correctly.
            //
            public void selectionChanged ( SelectionChangedEvent event )
            {
                handleContentOutlineSelection ( event.getSelection () );
            }
        } );
    }

    return contentOutlinePage;
}
 
源代码13 项目: neoscada   文件: RecipeEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage ()
{
    if ( contentOutlinePage == null )
    {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage
        {
            @Override
            public void createControl ( Composite parent )
            {
                super.createControl ( parent );
                contentOutlineViewer = getTreeViewer ();
                contentOutlineViewer.addSelectionChangedListener ( this );

                // Set up the tree viewer.
                //
                contentOutlineViewer.setContentProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
                contentOutlineViewer.setLabelProvider ( new DelegatingStyledCellLabelProvider ( new DecoratingColumLabelProvider.StyledLabelProvider ( new AdapterFactoryLabelProvider.StyledLabelProvider ( adapterFactory, contentOutlineViewer ), new DiagnosticDecorator.Styled ( editingDomain.getResourceSet (), contentOutlineViewer ) ) ) );
                contentOutlineViewer.setInput ( editingDomain.getResourceSet () );

                new ColumnViewerInformationControlToolTipSupport ( contentOutlineViewer, new DiagnosticDecorator.Styled.EditingDomainLocationListener ( editingDomain, contentOutlineViewer ) );

                // Make sure our popups work.
                //
                createContextMenuFor ( contentOutlineViewer );

                if ( !editingDomain.getResourceSet ().getResources ().isEmpty () )
                {
                    // Select the root object in the view.
                    //
                    contentOutlineViewer.setSelection ( new StructuredSelection ( editingDomain.getResourceSet ().getResources ().get ( 0 ) ), true );
                }
            }

            @Override
            public void makeContributions ( IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager )
            {
                super.makeContributions ( menuManager, toolBarManager, statusLineManager );
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars ( IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                getActionBarContributor ().shareGlobalActions ( this, actionBars );
            }
        }

        contentOutlinePage = new MyContentOutlinePage ();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener ( new ISelectionChangedListener () {
            // This ensures that we handle selections correctly.
            //
            public void selectionChanged ( SelectionChangedEvent event )
            {
                handleContentOutlineSelection ( event.getSelection () );
            }
        } );
    }

    return contentOutlinePage;
}
 
源代码14 项目: neoscada   文件: InfrastructureEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage ()
{
    if ( contentOutlinePage == null )
    {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage
        {
            @Override
            public void createControl ( Composite parent )
            {
                super.createControl ( parent );
                contentOutlineViewer = getTreeViewer ();
                contentOutlineViewer.addSelectionChangedListener ( this );

                // Set up the tree viewer.
                //
                contentOutlineViewer.setUseHashlookup ( true );
                contentOutlineViewer.setContentProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
                contentOutlineViewer.setLabelProvider ( new DelegatingStyledCellLabelProvider ( new DecoratingColumLabelProvider.StyledLabelProvider ( new AdapterFactoryLabelProvider.StyledLabelProvider ( adapterFactory, contentOutlineViewer ), new DiagnosticDecorator.Styled ( editingDomain, contentOutlineViewer, InfrastructureEditorPlugin.getPlugin ().getDialogSettings () ) ) ) );
                contentOutlineViewer.setInput ( editingDomain.getResourceSet () );

                new ColumnViewerInformationControlToolTipSupport ( contentOutlineViewer, new DiagnosticDecorator.Styled.EditingDomainLocationListener ( editingDomain, contentOutlineViewer ) );

                // Make sure our popups work.
                //
                createContextMenuFor ( contentOutlineViewer );

                if ( !editingDomain.getResourceSet ().getResources ().isEmpty () )
                {
                    // Select the root object in the view.
                    //
                    contentOutlineViewer.setSelection ( new StructuredSelection ( editingDomain.getResourceSet ().getResources ().get ( 0 ) ), true );
                }
            }

            @Override
            public void makeContributions ( IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager )
            {
                super.makeContributions ( menuManager, toolBarManager, statusLineManager );
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars ( IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                getActionBarContributor ().shareGlobalActions ( this, actionBars );
            }
        }

        contentOutlinePage = new MyContentOutlinePage ();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener ( new ISelectionChangedListener () {
            // This ensures that we handle selections correctly.
            //
            public void selectionChanged ( SelectionChangedEvent event )
            {
                handleContentOutlineSelection ( event.getSelection () );
            }
        } );
    }

    return contentOutlinePage;
}
 
源代码15 项目: neoscada   文件: SecurityEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage ()
{
    if ( contentOutlinePage == null )
    {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage
        {
            @Override
            public void createControl ( Composite parent )
            {
                super.createControl ( parent );
                contentOutlineViewer = getTreeViewer ();
                contentOutlineViewer.addSelectionChangedListener ( this );

                // Set up the tree viewer.
                //
                contentOutlineViewer.setContentProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
                contentOutlineViewer.setLabelProvider ( new AdapterFactoryLabelProvider ( adapterFactory ) );
                contentOutlineViewer.setInput ( editingDomain.getResourceSet () );

                // Make sure our popups work.
                //
                createContextMenuFor ( contentOutlineViewer );

                if ( !editingDomain.getResourceSet ().getResources ().isEmpty () )
                {
                    // Select the root object in the view.
                    //
                    contentOutlineViewer.setSelection ( new StructuredSelection ( editingDomain.getResourceSet ().getResources ().get ( 0 ) ), true );
                }
            }

            @Override
            public void makeContributions ( IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager )
            {
                super.makeContributions ( menuManager, toolBarManager, statusLineManager );
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars ( IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                getActionBarContributor ().shareGlobalActions ( this, actionBars );
            }
        }

        contentOutlinePage = new MyContentOutlinePage ();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener
                ( new ISelectionChangedListener ()
                {
                    // This ensures that we handle selections correctly.
                    //
                    public void selectionChanged ( SelectionChangedEvent event )
                    {
                        handleContentOutlineSelection ( event.getSelection () );
                    }
                } );
    }

    return contentOutlinePage;
}
 
源代码16 项目: neoscada   文件: GlobalizeEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage ()
{
    if ( contentOutlinePage == null )
    {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage
        {
            @Override
            public void createControl ( Composite parent )
            {
                super.createControl ( parent );
                contentOutlineViewer = getTreeViewer ();
                contentOutlineViewer.addSelectionChangedListener ( this );

                // Set up the tree viewer.
                //
                contentOutlineViewer.setContentProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
                contentOutlineViewer.setLabelProvider ( new DelegatingStyledCellLabelProvider ( new AdapterFactoryLabelProvider.StyledLabelProvider ( adapterFactory, contentOutlineViewer ) ) );
                contentOutlineViewer.setInput ( editingDomain.getResourceSet () );

                // Make sure our popups work.
                //
                createContextMenuFor ( contentOutlineViewer );

                if ( !editingDomain.getResourceSet ().getResources ().isEmpty () )
                {
                    // Select the root object in the view.
                    //
                    contentOutlineViewer.setSelection ( new StructuredSelection ( editingDomain.getResourceSet ().getResources ().get ( 0 ) ), true );
                }
            }

            @Override
            public void makeContributions ( IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager )
            {
                super.makeContributions ( menuManager, toolBarManager, statusLineManager );
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars ( IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                getActionBarContributor ().shareGlobalActions ( this, actionBars );
            }
        }

        contentOutlinePage = new MyContentOutlinePage ();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener ( new ISelectionChangedListener () {
            // This ensures that we handle selections correctly.
            //
            public void selectionChanged ( SelectionChangedEvent event )
            {
                handleContentOutlineSelection ( event.getSelection () );
            }
        } );
    }

    return contentOutlinePage;
}
 
源代码17 项目: neoscada   文件: ComponentEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage ()
{
    if ( contentOutlinePage == null )
    {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage
        {
            @Override
            public void createControl ( Composite parent )
            {
                super.createControl ( parent );
                contentOutlineViewer = getTreeViewer ();
                contentOutlineViewer.addSelectionChangedListener ( this );

                // Set up the tree viewer.
                //
                contentOutlineViewer.setContentProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
                contentOutlineViewer.setLabelProvider ( new DelegatingStyledCellLabelProvider ( new DecoratingColumLabelProvider.StyledLabelProvider ( new AdapterFactoryLabelProvider.StyledLabelProvider ( adapterFactory, contentOutlineViewer ), new DiagnosticDecorator.Styled ( editingDomain, contentOutlineViewer, ComponentEditorPlugin.getPlugin ().getDialogSettings () ) ) ) );
                contentOutlineViewer.setInput ( editingDomain.getResourceSet () );

                new ColumnViewerInformationControlToolTipSupport ( contentOutlineViewer, new DiagnosticDecorator.Styled.EditingDomainLocationListener ( editingDomain, contentOutlineViewer ) );

                // Make sure our popups work.
                //
                createContextMenuFor ( contentOutlineViewer );

                if ( !editingDomain.getResourceSet ().getResources ().isEmpty () )
                {
                    // Select the root object in the view.
                    //
                    contentOutlineViewer.setSelection ( new StructuredSelection ( editingDomain.getResourceSet ().getResources ().get ( 0 ) ), true );
                }
            }

            @Override
            public void makeContributions ( IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager )
            {
                super.makeContributions ( menuManager, toolBarManager, statusLineManager );
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars ( IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                getActionBarContributor ().shareGlobalActions ( this, actionBars );
            }
        }

        contentOutlinePage = new MyContentOutlinePage ();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener ( new ISelectionChangedListener () {
            // This ensures that we handle selections correctly.
            //
            public void selectionChanged ( SelectionChangedEvent event )
            {
                handleContentOutlineSelection ( event.getSelection () );
            }
        } );
    }

    return contentOutlinePage;
}
 
源代码18 项目: neoscada   文件: ItemEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage ()
{
    if ( contentOutlinePage == null )
    {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage
        {
            @Override
            public void createControl ( Composite parent )
            {
                super.createControl ( parent );
                contentOutlineViewer = getTreeViewer ();
                contentOutlineViewer.addSelectionChangedListener ( this );

                // Set up the tree viewer.
                //
                contentOutlineViewer.setContentProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
                contentOutlineViewer.setLabelProvider ( new AdapterFactoryLabelProvider ( adapterFactory ) );
                contentOutlineViewer.setInput ( editingDomain.getResourceSet () );

                // Make sure our popups work.
                //
                createContextMenuFor ( contentOutlineViewer );

                if ( !editingDomain.getResourceSet ().getResources ().isEmpty () )
                {
                    // Select the root object in the view.
                    //
                    contentOutlineViewer.setSelection ( new StructuredSelection ( editingDomain.getResourceSet ().getResources ().get ( 0 ) ), true );
                }
            }

            @Override
            public void makeContributions ( IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager )
            {
                super.makeContributions ( menuManager, toolBarManager, statusLineManager );
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars ( IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                getActionBarContributor ().shareGlobalActions ( this, actionBars );
            }
        }

        contentOutlinePage = new MyContentOutlinePage ();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener
                ( new ISelectionChangedListener ()
                {
                    // This ensures that we handle selections correctly.
                    //
                    public void selectionChanged ( SelectionChangedEvent event )
                    {
                        handleContentOutlineSelection ( event.getSelection () );
                    }
                } );
    }

    return contentOutlinePage;
}
 
源代码19 项目: neoscada   文件: ConfigurationEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage ()
{
    if ( contentOutlinePage == null )
    {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage
        {
            @Override
            public void createControl ( Composite parent )
            {
                super.createControl ( parent );
                contentOutlineViewer = getTreeViewer ();
                contentOutlineViewer.addSelectionChangedListener ( this );

                // Set up the tree viewer.
                //
                contentOutlineViewer.setContentProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
                contentOutlineViewer.setLabelProvider ( new AdapterFactoryLabelProvider ( adapterFactory ) );
                contentOutlineViewer.setInput ( editingDomain.getResourceSet () );

                // Make sure our popups work.
                //
                createContextMenuFor ( contentOutlineViewer );

                if ( !editingDomain.getResourceSet ().getResources ().isEmpty () )
                {
                    // Select the root object in the view.
                    //
                    contentOutlineViewer.setSelection ( new StructuredSelection ( editingDomain.getResourceSet ().getResources ().get ( 0 ) ), true );
                }
            }

            @Override
            public void makeContributions ( IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager )
            {
                super.makeContributions ( menuManager, toolBarManager, statusLineManager );
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars ( IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                getActionBarContributor ().shareGlobalActions ( this, actionBars );
            }
        }

        contentOutlinePage = new MyContentOutlinePage ();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener
                ( new ISelectionChangedListener ()
                {
                    // This ensures that we handle selections correctly.
                    //
                    public void selectionChanged ( SelectionChangedEvent event )
                    {
                        handleContentOutlineSelection ( event.getSelection () );
                    }
                } );
    }

    return contentOutlinePage;
}
 
源代码20 项目: scava   文件: CrossflowEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage() {
	if (contentOutlinePage == null) {
		// The content outline is just a tree.
		//
		class MyContentOutlinePage extends ContentOutlinePage {
			@Override
			public void createControl(Composite parent) {
				super.createControl(parent);
				contentOutlineViewer = getTreeViewer();
				contentOutlineViewer.addSelectionChangedListener(this);

				// Set up the tree viewer.
				//
				contentOutlineViewer.setUseHashlookup(true);
				contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
				contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
				contentOutlineViewer.setInput(editingDomain.getResourceSet());

				// Make sure our popups work.
				//
				createContextMenuFor(contentOutlineViewer);

				if (!editingDomain.getResourceSet().getResources().isEmpty()) {
				  // Select the root object in the view.
				  //
				  contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
				}
			}

			@Override
			public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
				super.makeContributions(menuManager, toolBarManager, statusLineManager);
				contentOutlineStatusLineManager = statusLineManager;
			}

			@Override
			public void setActionBars(IActionBars actionBars) {
				super.setActionBars(actionBars);
				getActionBarContributor().shareGlobalActions(this, actionBars);
			}
		}

		contentOutlinePage = new MyContentOutlinePage();

		// Listen to selection so that we can handle it is a special way.
		//
		contentOutlinePage.addSelectionChangedListener
			(new ISelectionChangedListener() {
				 // This ensures that we handle selections correctly.
				 //
				 public void selectionChanged(SelectionChangedEvent event) {
					 handleContentOutlineSelection(event.getSelection());
				 }
			 });
	}

	return contentOutlinePage;
}
 
源代码21 项目: M2Doc   文件: GenconfEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated
 */
public IContentOutlinePage getContentOutlinePage() {
    if (contentOutlinePage == null) {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage {
            @Override
            public void createControl(Composite parent) {
                super.createControl(parent);
                contentOutlineViewer = getTreeViewer();
                contentOutlineViewer.addSelectionChangedListener(this);

                // Set up the tree viewer.
                //
                contentOutlineViewer.setUseHashlookup(true);
                contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
                contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
                contentOutlineViewer.setInput(editingDomain.getResourceSet());

                // Make sure our popups work.
                //
                createContextMenuFor(contentOutlineViewer);

                if (!editingDomain.getResourceSet().getResources().isEmpty()) {
                    // Select the root object in the view.
                    //
                    contentOutlineViewer.setSelection(
                            new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
                }
            }

            @Override
            public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager,
                    IStatusLineManager statusLineManager) {
                super.makeContributions(menuManager, toolBarManager, statusLineManager);
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars(IActionBars actionBars) {
                super.setActionBars(actionBars);
                getActionBarContributor().shareGlobalActions(this, actionBars);
            }
        }

        contentOutlinePage = new MyContentOutlinePage();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener(new ISelectionChangedListener() {
            // This ensures that we handle selections correctly.
            //
            public void selectionChanged(SelectionChangedEvent event) {
                handleContentOutlineSelection(event.getSelection());
            }
        });
    }

    return contentOutlinePage;
}
 

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage() {
	if (contentOutlinePage == null) {
		// The content outline is just a tree.
		//
		class MyContentOutlinePage extends ContentOutlinePage {
			@Override
			public void createControl(Composite parent) {
				super.createControl(parent);
				contentOutlineViewer = getTreeViewer();
				contentOutlineViewer.addSelectionChangedListener(this);

				// Set up the tree viewer.
				//
				contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
				contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
				contentOutlineViewer.setInput(editingDomain.getResourceSet());

				// Make sure our popups work.
				//
				createContextMenuFor(contentOutlineViewer);

				if (!editingDomain.getResourceSet().getResources().isEmpty()) {
				  // Select the root object in the view.
				  //
				  contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
				}
			}

			@Override
			public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
				super.makeContributions(menuManager, toolBarManager, statusLineManager);
				contentOutlineStatusLineManager = statusLineManager;
			}

			@Override
			public void setActionBars(IActionBars actionBars) {
				super.setActionBars(actionBars);
				getActionBarContributor().shareGlobalActions(this, actionBars);
			}
		}

		contentOutlinePage = new MyContentOutlinePage();

		// Listen to selection so that we can handle it is a special way.
		//
		contentOutlinePage.addSelectionChangedListener
			(new ISelectionChangedListener() {
				 // This ensures that we handle selections correctly.
				 //
				 public void selectionChanged(SelectionChangedEvent event) {
					 handleContentOutlineSelection(event.getSelection());
				 }
			 });
	}

	return contentOutlinePage;
}
 
源代码23 项目: eip-designer   文件: EipEditor.java

/**
   * This accesses a cached version of the content outliner.
   * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
   * @generated
   */
public IContentOutlinePage getContentOutlinePage() {
     if (contentOutlinePage == null) {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage {
           @Override
           public void createControl(Composite parent) {
              super.createControl(parent);
              contentOutlineViewer = getTreeViewer();
              contentOutlineViewer.addSelectionChangedListener(this);

              // Set up the tree viewer.
              //
              contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
              contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
              contentOutlineViewer.setInput(editingDomain.getResourceSet());

              // Make sure our popups work.
              //
              createContextMenuFor(contentOutlineViewer);

              if (!editingDomain.getResourceSet().getResources().isEmpty()) {
                // Select the root object in the view.
                //
                contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
              }
           }

           @Override
           public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
              super.makeContributions(menuManager, toolBarManager, statusLineManager);
              contentOutlineStatusLineManager = statusLineManager;
           }

           @Override
           public void setActionBars(IActionBars actionBars) {
              super.setActionBars(actionBars);
              getActionBarContributor().shareGlobalActions(this, actionBars);
           }
        }

        contentOutlinePage = new MyContentOutlinePage();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener
           (new ISelectionChangedListener() {
               // This ensures that we handle selections correctly.
               //
               public void selectionChanged(SelectionChangedEvent event) {
                  handleContentOutlineSelection(event.getSelection());
               }
            });
     }

     return contentOutlinePage;
  }
 
源代码24 项目: ifml-editor   文件: CoreEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage() {
	if (contentOutlinePage == null) {
		// The content outline is just a tree.
		//
		class MyContentOutlinePage extends ContentOutlinePage {
			@Override
			public void createControl(Composite parent) {
				super.createControl(parent);
				contentOutlineViewer = getTreeViewer();
				contentOutlineViewer.addSelectionChangedListener(this);

				// Set up the tree viewer.
				//
				contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
				contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
				contentOutlineViewer.setInput(editingDomain.getResourceSet());

				// Make sure our popups work.
				//
				createContextMenuFor(contentOutlineViewer);

				if (!editingDomain.getResourceSet().getResources().isEmpty()) {
				  // Select the root object in the view.
				  //
				  contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
				}
			}

			@Override
			public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
				super.makeContributions(menuManager, toolBarManager, statusLineManager);
				contentOutlineStatusLineManager = statusLineManager;
			}

			@Override
			public void setActionBars(IActionBars actionBars) {
				super.setActionBars(actionBars);
				getActionBarContributor().shareGlobalActions(this, actionBars);
			}
		}

		contentOutlinePage = new MyContentOutlinePage();

		// Listen to selection so that we can handle it is a special way.
		//
		contentOutlinePage.addSelectionChangedListener
			(new ISelectionChangedListener() {
				 // This ensures that we handle selections correctly.
				 //
				 public void selectionChanged(SelectionChangedEvent event) {
					 handleContentOutlineSelection(event.getSelection());
				 }
			 });
	}

	return contentOutlinePage;
}
 
源代码25 项目: ifml-editor   文件: ExtensionsEditor.java

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage() {
	if (contentOutlinePage == null) {
		// The content outline is just a tree.
		//
		class MyContentOutlinePage extends ContentOutlinePage {
			@Override
			public void createControl(Composite parent) {
				super.createControl(parent);
				contentOutlineViewer = getTreeViewer();
				contentOutlineViewer.addSelectionChangedListener(this);

				// Set up the tree viewer.
				//
				contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
				contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
				contentOutlineViewer.setInput(editingDomain.getResourceSet());

				// Make sure our popups work.
				//
				createContextMenuFor(contentOutlineViewer);

				if (!editingDomain.getResourceSet().getResources().isEmpty()) {
				  // Select the root object in the view.
				  //
				  contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
				}
			}

			@Override
			public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
				super.makeContributions(menuManager, toolBarManager, statusLineManager);
				contentOutlineStatusLineManager = statusLineManager;
			}

			@Override
			public void setActionBars(IActionBars actionBars) {
				super.setActionBars(actionBars);
				getActionBarContributor().shareGlobalActions(this, actionBars);
			}
		}

		contentOutlinePage = new MyContentOutlinePage();

		// Listen to selection so that we can handle it is a special way.
		//
		contentOutlinePage.addSelectionChangedListener
			(new ISelectionChangedListener() {
				 // This ensures that we handle selections correctly.
				 //
				 public void selectionChanged(SelectionChangedEvent event) {
					 handleContentOutlineSelection(event.getSelection());
				 }
			 });
	}

	return contentOutlinePage;
}
 
 类所在包
 同包方法