Package de.innovationgate.eclipse.utils.ui

Source Code of de.innovationgate.eclipse.utils.ui.FileLabelProvider

/*******************************************************************************
* Copyright (c) 2009, 2010 Innovation Gate GmbH.
* 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:
*     Innovation Gate GmbH - initial API and implementation
******************************************************************************/
package de.innovationgate.eclipse.utils.ui;

import org.eclipse.core.resources.IFile;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.swt.graphics.Image;

public class FileLabelProvider implements ILabelProvider {

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


  public String getText(Object element) {
    if (element instanceof IFile) {
        IFile file = (IFile) element;
      return file.getFullPath().toString();
    } else {
      return null;
    }
  }


  public void addListener(ILabelProviderListener listener) {
  }


  public void dispose() {
  }

  public boolean isLabelProperty(Object element, String property) {
    return false;
  }


  public void removeListener(ILabelProviderListener listener) {
  }

}
TOP

Related Classes of de.innovationgate.eclipse.utils.ui.FileLabelProvider

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.