@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; }
@Override @SuppressWarnings("rawtypes") public Class[] getAdapterList() { return new Class[] { IActionFilter.class }; }
/** * @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); }
/** * @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); }
@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); }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public Object getAdapter(Class adapter) { if (adapter == IActionFilter.class) { return SetParametersActionFilter.getSingleton(); } return super.getAdapter(adapter); }
@Override public Object getAdapter(Class adapter) { if (adapter == IActionFilter.class) { return SetParametersActionFilter.getSingleton(); } return super.getAdapter(adapter); }
/** * {@inheritDoc} */ //@SuppressWarnings("unchecked") @Override public Object getAdapter(Class adapter) { if (adapter == IActionFilter.class) { return SetParametersActionFilter.getSingleton(); } return super.getAdapter(adapter); }
public PythonSourceFolderActionFilter(IActionFilter platformActionFilter) { this.platformActionFilter = platformActionFilter; }