blob: 1a669393747f5659b747a9ffb7c1d80552452073 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2018 Agence spatiale canadienne / Canadian Space Agency
* 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:
* Pierre Allard,
* Regent L'Archeveque - initial API and implementation
*
* SPDX-License-Identifier: EPL-1.0
*******************************************************************************/
package org.eclipse.apogy.examples.antenna.provider;
import org.eclipse.apogy.examples.antenna.DishAntenna;
import org.eclipse.emf.common.notify.AdapterFactory;
public class DishAntennaCustomItemProvider extends DishAntennaItemProvider {
public DishAntennaCustomItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
@Override
public String getText(Object object) {
// Cast to a dish antenna
DishAntenna dishAntenna = (DishAntenna) object;
String label = getString("_UI_DishAntenna_type");
// If the dish antenna isn't null
if (dishAntenna != null) {
// Add on whether or not it's initialized
label += " (Init=" + dishAntenna.isInitialized() + ")";
}
// Return the label
return label;
}
}