/* Copyright 2009 predic8 GmbH, www.predic8.com Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package com.predic8.plugin.membrane.dialogs.rule.providers; import org.eclipse.jface.viewers.ILabelProviderListener; import org.eclipse.jface.viewers.ITableLabelProvider; import org.eclipse.swt.graphics.Image; import com.predic8.membrane.core.interceptor.Interceptor; public class InterceptorTableViewerLabelProvider implements ITableLabelProvider { public String getColumnText(Object element, int columnIndex) { Interceptor obj = (Interceptor) element; switch (columnIndex) { case 0: return obj.getDisplayName(); case 1: return obj.getClass().getName(); default: throw new RuntimeException("Interceptor table must have only two columns"); } } public Image getColumnImage(Object element, int columnIndex) { return null; } public void addListener(ILabelProviderListener listener) { // ignore } public void dispose() { // ignore } public boolean isLabelProperty(Object element, String property) { // TODO Auto-generated method stub return false; } public void removeListener(ILabelProviderListener listener) { // TODO Auto-generated method stub } }