Package org.erlide.ui.views

Source Code of org.erlide.ui.views.BackendLabelProvider

/*******************************************************************************
* Copyright (c) 2009-2013 Vlad Dumitrescu 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:
*     Vlad Dumitrescu
*******************************************************************************/
package org.erlide.ui.views;

import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;
import org.erlide.backend.api.BackendData;
import org.erlide.backend.api.IBackend;
import org.erlide.runtime.runtimeinfo.RuntimeInfo;

public class BackendLabelProvider extends LabelProvider {

    @Override
    public Image getImage(final Object element) {
        return null;
    }

    @Override
    public String getText(final Object element) {
        final IBackend b = (IBackend) element;
        final BackendData data = b.getData();
        final RuntimeInfo info = data.getRuntimeInfo();
        final String s = info != null ? info.getName() : "<none>";
        return s + ": " + data.getNodeName();
    }

}
TOP

Related Classes of org.erlide.ui.views.BackendLabelProvider

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.