01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.views.tasklist;
11:
12: import org.eclipse.core.resources.IResource;
13: import org.eclipse.core.runtime.IAdaptable;
14:
15: /**
16: * <code>ITaskListResourceAdapter</code> is an adapter interface that
17: * supplies the resource to query for markers to display in the task list.
18: * <p>
19: * The Tasks view checks for this adapter before the <code>IResource</code>
20: * adapter, allowing the object to provide a resource to the Tasks view without
21: * necessarily exposing it to other components that look for an <code>IResource</code>
22: * adapter.
23: * </p>
24: * <p>
25: * Implementors of this interface are typically registered with an
26: * IAdapterFactory for lookup via the getAdapter() mechanism.
27: * </p>
28: */
29: public interface ITaskListResourceAdapter {
30:
31: /**
32: * Returns the resource to query for the markers to display
33: * for the given adaptable.
34: *
35: * @param adaptable the adaptable being queried.
36: * @return the resource or <code>null</code> if there
37: * is no adapted resource for this object.
38: */
39: public IResource getAffectedResource(IAdaptable adaptable);
40:
41: }
|