blob: 8e66f00824df42bcc7f6c8158dfde95c106541c4 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 KPIT Technologies.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Jan Mauersberger- initial API and implementation
* Sascha Baumgart- initial API and implementation
*******************************************************************************/
package claimtypes.provider.color;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.ui.provider.PropertySource;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import claimtypes.ClaimtypesPackage;
public class ClaimTypeColorPropertySource extends PropertySource {
public ClaimTypeColorPropertySource(Object object,
IItemPropertySource itemPropertySource) {
super(object, itemPropertySource);
}
@Override
protected IPropertyDescriptor createPropertyDescriptor(
IItemPropertyDescriptor itemPropertyDescriptor) {
ClaimtypesPackage pkg = ClaimtypesPackage.eINSTANCE;
Object feature = itemPropertyDescriptor.getFeature(object);
if (pkg.getClaimType_Color().equals(feature)) {
return new ClaimTypeColorPropertyDescriptor(object,
itemPropertyDescriptor);
} else {
return super.createPropertyDescriptor(itemPropertyDescriptor);
}
}
}