Java 类org.eclipse.ui.IActionFilter 实例源码

项目:team-explorer-everywhere    文件:BuildFavoriteAdapterFactory.java   
@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;
}
项目:team-explorer-everywhere    文件:AdapterFactory.java   
@Override
@SuppressWarnings("rawtypes")
public Class[] getAdapterList() {
    return new Class[] {
        IActionFilter.class
    };
}
项目:team-explorer-everywhere    文件:BuildFavoriteAdapterFactory.java   
@Override
@SuppressWarnings("rawtypes")
public Class[] getAdapterList() {
    return new Class[] {
        IActionFilter.class
    };
}
项目:NEXCORE-UML-Modeler    文件:UMLFileTreeNode.java   
/**
 * @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);
}
项目:NEXCORE-UML-Modeler    文件:UMLTreeNode.java   
/**
 * @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);
}
项目:Pydev    文件:PythonSourceFolder.java   
@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);
}
项目:d-case_editor    文件:MonitorEditPart.java   
/**
 * {@inheritDoc}
 */
@SuppressWarnings("unchecked")
@Override
public Object getAdapter(Class adapter) {
    if (adapter == IActionFilter.class) {
        return SetParametersActionFilter.getSingleton();
    }
    return super.getAdapter(adapter);
}
项目:d-case_editor    文件:DcaseNodeEditPart.java   
@Override
public Object getAdapter(Class adapter) {
    if (adapter == IActionFilter.class) {
        return SetParametersActionFilter.getSingleton();
    }
    return super.getAdapter(adapter);
}
项目:d-case_editor    文件:GoalEditPart.java   
/**
 * {@inheritDoc}
 */
@SuppressWarnings("unchecked")
@Override
public Object getAdapter(Class adapter) {
    if (adapter == IActionFilter.class) {
        return SetParametersActionFilter.getSingleton();
    }
    return super.getAdapter(adapter);
}
项目:d-case_editor    文件:ArgumentEditPart.java   
/**
 * {@inheritDoc}
 */
//@SuppressWarnings("unchecked")
@Override
public Object getAdapter(Class adapter) {
    if (adapter == IActionFilter.class) {
        return SetParametersActionFilter.getSingleton();
    }
    return super.getAdapter(adapter);
}
项目:Pydev    文件:PythonSourceFolderActionFilter.java   
public PythonSourceFolderActionFilter(IActionFilter platformActionFilter) {
    this.platformActionFilter = platformActionFilter;
}