| /******************************************************************************* |
| * Copyright (c) 2004, 2007 Mylyn project committers 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 |
| *******************************************************************************/ |
| |
| package org.eclipse.mylyn.internal.context.ui.editors; |
| |
| import org.eclipse.jface.resource.ImageDescriptor; |
| import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages; |
| import org.eclipse.mylyn.tasks.core.AbstractTask; |
| import org.eclipse.ui.IEditorInput; |
| import org.eclipse.ui.IPersistableElement; |
| |
| /** |
| * @author Mik Kersten |
| */ |
| public class ContextEditorInput implements IEditorInput { |
| |
| private static final String LABEL = "Task Context Editor"; |
| |
| private AbstractTask task; |
| |
| public ContextEditorInput(AbstractTask task) { |
| this.task = task; |
| } |
| |
| public boolean exists() { |
| return false; |
| } |
| |
| public ImageDescriptor getImageDescriptor() { |
| return TasksUiImages.TASK_ACTIVE_CENTERED; |
| } |
| |
| public String getName() { |
| return LABEL; |
| } |
| |
| public IPersistableElement getPersistable() { |
| return null; |
| } |
| |
| public String getToolTipText() { |
| return null; |
| } |
| |
| @SuppressWarnings("unchecked") |
| public Object getAdapter(Class adapter) { |
| return null; |
| } |
| |
| public AbstractTask getTask() { |
| return task; |
| } |
| |
| } |