本文整理汇总了Java中org.eclipse.ui.part.IContributedContentsView类的典型用法代码示例。如果您正苦于以下问题:Java IContributedContentsView类的具体用法?Java IContributedContentsView怎么用?Java IContributedContentsView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IContributedContentsView类属于org.eclipse.ui.part包,在下文中一共展示了IContributedContentsView类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDiagramEditor
import org.eclipse.ui.part.IContributedContentsView; //导入依赖的package包/类
/**
* @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;
}
示例2: appliesTo
import org.eclipse.ui.part.IContributedContentsView; //导入依赖的package包/类
@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;
}
示例3: getAdapter
import org.eclipse.ui.part.IContributedContentsView; //导入依赖的package包/类
@Override
public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
if (adapter == IContributedContentsView.class) {
return this;
}
return super.getAdapter(adapter);
}
示例4: getAdapter
import org.eclipse.ui.part.IContributedContentsView; //导入依赖的package包/类
public Object getAdapter( Class key )
{
if ( key == IContributedContentsView.class )
return new IContributedContentsView( ) {
public IWorkbenchPart getContributingPart( )
{
return getCurrentContributingPart( );
}
};
return super.getAdapter( key );
}
示例5: getAdapter
import org.eclipse.ui.part.IContributedContentsView; //导入依赖的package包/类
public Object getAdapter( Class key )
{
if ( key == IContributedContentsView.class )
{
return new IContributedContentsView( ) {
public IWorkbenchPart getContributingPart( )
{
return getCurrentContributingPart( );
}
};
}
return super.getAdapter( key );
}