blob: 66c8743ff9482143bc048d4632c9333bbafde214 [file] [log] [blame]
package org.eclipse.ui.externaltools.internal.ui;
/**********************************************************************
Copyright (c) 2002 IBM Corp. and others.
All rights reserved.   This program and the accompanying materials
are made available under the terms of the Common Public License v0.5
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/cpl-v05.html
 
Contributors:
**********************************************************************/
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.externaltools.internal.core.ToolMessages;
/**
* Label provider for the tree viewer of the Log Console.
*/
public class LogTreeLabelProvider implements ILabelProvider {
private LogConsoleView console;
public LogTreeLabelProvider(LogConsoleView console) {
this.console = console;
}
/**
* @see ILabelProvider#getImage(Object)
*/
public Image getImage(Object element) {
return null;
}
/**
* @see ILabelProvider#getText(Object)
*/
public String getText(Object element) {
String text = ((OutputStructureElement) element).getName();
if (text == null)
// this can happen if the user writes a task name that doesn't exist => the #taskStarted will be triggered
// but null will be given as a name to the current task, and then only, the exception will be raised
return ToolMessages.getString("LogTreeLabelProvider.invalidItemName"); // $NON-NLS-1$
return text;
}
/**
* @see IBaseLabelProvider#addListener(ILabelProviderListener)
*/
public void addListener(ILabelProviderListener listener) {
}
/**
* @see IBaseLabelProvider#dispose()
*/
public void dispose() {
}
/**
* @see IBaseLabelProvider#isLabelProperty(Object, String)
*/
public boolean isLabelProperty(Object arg0, String arg1) {
return false;
}
/**
* @see IBaseLabelProvider#removeListener(ILabelProviderListener)
*/
public void removeListener(ILabelProviderListener listener) {
}
}