blob: c0a6794edd1ab4e2e17c3a2e2b660f870236226e [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,
* Sebastien Gemme - initial API and implementation
*
* SPDX-License-Identifier: EPL-1.0
*
*******************************************************************************/
package org.eclipse.apogy.common.topology.provider;
import org.eclipse.apogy.common.topology.ContentNode;
import org.eclipse.emf.common.notify.AdapterFactory;
public class ContentNodeCustomItemProvider extends ContentNodeItemProvider {
public ContentNodeCustomItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
@Override
public String getText(Object object) {
ContentNode<?> contentNode = (ContentNode<?>) object;
String label = null;
if (contentNode.getNodeId() != null && contentNode.getNodeId().length() > 0) {
label = contentNode.getNodeId();
} else {
label = getString("_UI_ContentNode_type");
}
return label;
}
}