blob: 9a70316147f99548ce8064da759dd1bbeb565aed [file] [log] [blame]
/**
* Copyright (c) 2009 Thales Corporate Services S.A.S.
* 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:
* Thales Corporate Services S.A.S - initial API and implementation
*/
package org.eclipse.egf.model.fprod.provider;
import org.eclipse.egf.model.fprod.ProductionPlanInvocation;
import org.eclipse.emf.common.notify.AdapterFactory;
/**
* @author Xavier Maysonnave
*
*/
public class ProductionPlanInvocationCustomItemProvider extends ProductionPlanInvocationItemProvider {
/**
* This constructs an instance from a factory and a notifier.
*/
public ProductionPlanInvocationCustomItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the label text for the adapted class.
*/
@Override
public String getText(Object object) {
String label = ((ProductionPlanInvocation) object).getName();
return label == null || label.length() == 0 ? "[" + getString("_UI_ProductionPlanInvocation_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
label + " [" + getString("_UI_ProductionPlanInvocation_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}