当前位置: 首页>>代码示例>>Java>>正文


Java IActionFilter类代码示例

本文整理汇总了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;
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:24,代码来源:BuildFavoriteAdapterFactory.java

示例2: getAdapterList

import org.eclipse.ui.IActionFilter; //导入依赖的package包/类
@Override
@SuppressWarnings("rawtypes")
public Class[] getAdapterList() {
    return new Class[] {
        IActionFilter.class
    };
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:8,代码来源:AdapterFactory.java

示例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);
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:10,代码来源:UMLFileTreeNode.java

示例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);
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:11,代码来源:UMLTreeNode.java

示例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);
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:13,代码来源:PythonSourceFolder.java

示例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);
}
 
开发者ID:d-case,项目名称:d-case_editor,代码行数:12,代码来源:MonitorEditPart.java

示例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);
}
 
开发者ID:d-case,项目名称:d-case_editor,代码行数:8,代码来源:DcaseNodeEditPart.java

示例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);
}
 
开发者ID:d-case,项目名称:d-case_editor,代码行数:12,代码来源:ArgumentEditPart.java

示例9: PythonSourceFolderActionFilter

import org.eclipse.ui.IActionFilter; //导入依赖的package包/类
public PythonSourceFolderActionFilter(IActionFilter platformActionFilter) {
    this.platformActionFilter = platformActionFilter;
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:4,代码来源:PythonSourceFolderActionFilter.java


注:本文中的org.eclipse.ui.IActionFilter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。