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

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

源代码1 项目: spotbugs   文件: AbstractFindbugsView.java
@Override
public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
    if (adapter == IContributedContentsView.class) {
        return this;
    }
    return super.getAdapter(adapter);
}
 
源代码2 项目: birt   文件: LibraryExplorerView.java
public Object getAdapter( Class key )
{
	if ( key == IContributedContentsView.class )
		return new IContributedContentsView( ) {

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

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

			public IWorkbenchPart getContributingPart( )
			{
				return getCurrentContributingPart( );
			}
		};
	}
	return super.getAdapter( key );
}
 
源代码5 项目: bonita-studio   文件: TabbedPropertySheetPage.java
/**
 * Handle the part activated event.
 *
 * @param part
 *            the new activated part.
 */
protected void handlePartActivated(IWorkbenchPart part) {
	/*
	 * The properties view has been activated and the current page is this
	 * instance of TabbedPropertySheetPage
	 */
	boolean thisActivated = part instanceof PropertySheet
		&& ((PropertySheet) part).getCurrentPage() == this;

	/*
	 * When the active part changes and the part does not provide a
	 * selection that affects this property sheet page, the PropertySheet
	 * does not send us a selectionChanged() event. We need to be informed
	 * of these events since we want to send aboutToBeHidden() and
	 * aboutToBeShown() when the property sheet is hidden or shown.
	 */
       if (!thisActivated && !part.equals(contributor)
               && !part.getSite().getId().equals(contributor.getContributorId())) {
		/*
		 * Is the part is a IContributedContentsView for the contributor,
		 * for example, outline view.
		 */
		IContributedContentsView view = Adapters.adapt(part, IContributedContentsView.class);
		if (view == null
			|| (view.getContributingPart() != null && !view
				.getContributingPart().equals(contributor))) {
			if (activePropertySheet) {
				if (currentTab != null) {
					currentTab.aboutToBeHidden();
				}
				activePropertySheet = false;
			}
			return;
		}
	}
	if (!activePropertySheet && currentTab != null) {
		currentTab.aboutToBeShown();
		currentTab.refresh();
	}
	activePropertySheet = true;
}
 
 类所在包
 同包方法