01: /*******************************************************************************
02: * Copyright (c) 2000, 2007 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.pde.internal.ui.views.dependencies;
11:
12: import java.util.Arrays;
13: import java.util.Collection;
14: import java.util.Collections;
15:
16: import org.eclipse.osgi.service.resolver.BundleDescription;
17:
18: public class CallersContentProvider extends
19: DependenciesViewPageContentProvider {
20: public CallersContentProvider(DependenciesView view) {
21: super (view);
22: }
23:
24: protected Collection findReferences(BundleDescription desc) {
25: if (desc != null) {
26: // don't return any callers for fragments (since no one can depend on a fragment
27: if (desc.getHost() == null) {
28: BundleDescription[] dependents = desc.getDependents();
29: return Arrays.asList(dependents);
30: }
31: }
32: return Collections.EMPTY_LIST;
33: }
34:
35: }
|