| /******************************************************************************* |
| * Copyright (c) 2006, 2008 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: |
| * Norimasa HAYASHIDA - initial API and implementation |
| *******************************************************************************/ |
| |
| package org.eclipse.actf.visualization.eval.preferences; |
| |
| import org.eclipse.jface.viewers.ITreeContentProvider; |
| import org.eclipse.jface.viewers.Viewer; |
| |
| |
| |
| |
| public class GuidelineTreeContentProvider implements ITreeContentProvider { |
| |
| public Object[] getChildren(Object parentElement) { |
| IGuidelineTreeItem parent = (IGuidelineTreeItem) parentElement; |
| return parent.getChildren().toArray(); |
| } |
| |
| public Object getParent(Object element) { |
| return ((IGuidelineTreeItem) element).getParent(); |
| } |
| |
| public boolean hasChildren(Object element) { |
| return getChildren(element).length > 0; |
| } |
| |
| public Object[] getElements(Object inputElement) { |
| return getChildren(inputElement); |
| } |
| |
| public void dispose() { |
| } |
| |
| public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { |
| } |
| } |