本文整理汇总了Java中org.eclipse.ui.IActionFilter类的典型用法代码示例。如果您正苦于以下问题:Java IActionFilter类的具体用法?Java IActionFilter怎么用?Java IActionFilter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IActionFilter类属于org.eclipse.ui包,在下文中一共展示了IActionFilter类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAdapter
import org.eclipse.ui.IActionFilter; //导入依赖的package包/类
@Override
@SuppressWarnings("rawtypes")
public Object getAdapter(final Object adaptableObject, final Class adapterType) {
if (adaptableObject instanceof BuildFavoriteItem) {
return new IActionFilter() {
@Override
public boolean testAttribute(final Object target, final String name, final String value) {
final BuildFavoriteItem favorite = (BuildFavoriteItem) target;
if (name.equals("XAML")) //$NON-NLS-1$
{
return favorite.getBuildDefinitionType() == DefinitionType.XAML;
} else if (name.equals("BUILD")) //$NON-NLS-1$
{
return favorite.getBuildDefinitionType() == DefinitionType.BUILD;
}
return false;
}
};
}
return null;
}
示例2: getAdapterList
import org.eclipse.ui.IActionFilter; //导入依赖的package包/类
@Override
@SuppressWarnings("rawtypes")
public Class[] getAdapterList() {
return new Class[] {
IActionFilter.class
};
}
示例3: getAdapter
import org.eclipse.ui.IActionFilter; //导入依赖的package包/类
/**
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
public Object getAdapter(Class adapter) {
if (adapter == IActionFilter.class) {
return new UMLTreeActionFilter();
}
return super.getAdapter(adapter);
}
示例4: getAdapter
import org.eclipse.ui.IActionFilter; //导入依赖的package包/类
/**
* @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class)
*/
@Override
public Object getAdapter(Class adapter) {
if (adapter == IActionFilter.class) {
return new UMLTreeActionFilter();
}
return super.getAdapter(adapter);
}
示例5: getAdapter
import org.eclipse.ui.IActionFilter; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public <T> T getAdapter(Class<T> adapter) {
if (adapter == IActionFilter.class) {
IActionFilter platformActionFilter = (IActionFilter) this.getActualObject().getAdapter(adapter);
return (T) new PythonSourceFolderActionFilter(platformActionFilter);
}
if (adapter == IContributorResourceAdapter.class) {
return (T) this;
}
return WrappedResource.getAdapterFromActualObject(this.getActualObject(), adapter);
}
示例6: getAdapter
import org.eclipse.ui.IActionFilter; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
@Override
public Object getAdapter(Class adapter) {
if (adapter == IActionFilter.class) {
return SetParametersActionFilter.getSingleton();
}
return super.getAdapter(adapter);
}
示例7: getAdapter
import org.eclipse.ui.IActionFilter; //导入依赖的package包/类
@Override
public Object getAdapter(Class adapter) {
if (adapter == IActionFilter.class) {
return SetParametersActionFilter.getSingleton();
}
return super.getAdapter(adapter);
}
示例8: getAdapter
import org.eclipse.ui.IActionFilter; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
//@SuppressWarnings("unchecked")
@Override
public Object getAdapter(Class adapter) {
if (adapter == IActionFilter.class) {
return SetParametersActionFilter.getSingleton();
}
return super.getAdapter(adapter);
}
示例9: PythonSourceFolderActionFilter
import org.eclipse.ui.IActionFilter; //导入依赖的package包/类
public PythonSourceFolderActionFilter(IActionFilter platformActionFilter) {
this.platformActionFilter = platformActionFilter;
}