blob: d013a4d09708dfe29243ed9b47c73cb217d1ed75 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2011-2013 EclipseSource Muenchen GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Eugen Neufeld - initial API and implementation
*******************************************************************************/
package org.eclipse.emf.ecp.edit.internal.swt.table;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecp.edit.util.ECPApplicableTester;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
public class LinkCellEditorTester implements ECPApplicableTester {
public LinkCellEditorTester() {
// TODO Auto-generated constructor stub
}
public int isApplicable(IItemPropertyDescriptor itemPropertyDescriptor, EObject eObject) {
EStructuralFeature feature = (EStructuralFeature) itemPropertyDescriptor.getFeature(null);
if (EReference.class.isInstance(feature)) {
return 1;
}
return NOT_APPLICABLE;
}
}