Java 类org.eclipse.ui.part.IContributedContentsView 实例源码

项目:SecureBPMN    文件:ActivitiPropertySection.java   
/**
 * @return the {@link IDiagramEditor} diagram editor.
 */
protected IDiagramEditor getDiagramEditor() {
    IWorkbenchPart part = getPart();
    if (part instanceof IContributedContentsView) {
      IContributedContentsView contributedView = (IContributedContentsView) part
         .getAdapter(IContributedContentsView.class);
     if (contributedView != null) {
       part = contributedView.getContributingPart();
     }
    }

    if (part instanceof IDiagramEditor) {
        return (IDiagramEditor) part;
    }
    return null;
}
项目:FoxBPM-Designer    文件:AbstractFixFlowPropertySection.java   
@Override
public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
    if (part instanceof ContentOutline) {
        ContentOutline outline = (ContentOutline)part;
        IContributedContentsView v = (IContributedContentsView)outline.getAdapter(IContributedContentsView.class);
        if (v!=null)
            part = v.getContributingPart();
    }
    editor = (DiagramEditor)part.getAdapter(DiagramEditor.class);

    if (editor!=null) {
        return true;
    }
    return false;
}
项目:FindBug-for-Domino-Designer    文件:AbstractFindbugsView.java   
@Override
public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
    if (adapter == IContributedContentsView.class) {
        return this;
    }
    return super.getAdapter(adapter);
}
项目:birt    文件:LibraryExplorerView.java   
public Object getAdapter( Class key )
{
    if ( key == IContributedContentsView.class )
        return new IContributedContentsView( ) {

            public IWorkbenchPart getContributingPart( )
            {
                return getCurrentContributingPart( );
            }
        };
    return super.getAdapter( key );
}
项目:birt    文件:DataView.java   
public Object getAdapter( Class key )
{
    if ( key == IContributedContentsView.class )
        return new IContributedContentsView( ) {

            public IWorkbenchPart getContributingPart( )
            {
                return getCurrentContributingPart( );
            }
        };
    return super.getAdapter( key );
}
项目:birt    文件:AttributeView.java   
public Object getAdapter( Class key )
{
    if ( key == IContributedContentsView.class )
    {
        return new IContributedContentsView( ) {

            public IWorkbenchPart getContributingPart( )
            {
                return getCurrentContributingPart( );
            }
        };
    }
    return super.getAdapter( key );
}