| /******************************************************************************* |
| * Copyright (c) 2003, 2005 IBM Corporation 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: |
| * IBM Corporation - Initial API and implementation |
| *******************************************************************************/ |
| package org.eclipse.wst.server.ui.internal.viewers; |
| |
| import org.eclipse.jface.viewers.ILabelProvider; |
| import org.eclipse.jface.viewers.ILabelProviderListener; |
| import org.eclipse.swt.graphics.Image; |
| /** |
| * A basic label provider. |
| */ |
| public abstract class BaseLabelProvider implements ILabelProvider { |
| /** |
| * BaseLabelProvider constructor comment. |
| */ |
| public BaseLabelProvider() { |
| super(); |
| } |
| |
| /** |
| * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener) |
| */ |
| public void addListener(ILabelProviderListener listener) { |
| // do nothing |
| } |
| |
| /** |
| * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose() |
| */ |
| public void dispose() { |
| // do nothing |
| } |
| |
| /** |
| * @see ILabelProvider#getImage(java.lang.Object) |
| */ |
| public Image getImage(Object element) { |
| return null; |
| } |
| |
| /** |
| * @see ILabelProvider#getText(java.lang.Object) |
| */ |
| public String getText(Object element) { |
| return ""; |
| } |
| |
| /** |
| * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String) |
| */ |
| public boolean isLabelProperty(Object element, String property) { |
| return false; |
| } |
| |
| /** |
| * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener) |
| */ |
| public void removeListener(ILabelProviderListener listener) { |
| // do nothing |
| } |
| |
| protected String notNull(String s) { |
| if (s == null) |
| return ""; |
| return s; |
| } |
| } |