1 11 package org.eclipse.pde.internal.ui.view; 12 13 import org.eclipse.pde.core.plugin.IFragment; 14 import org.eclipse.pde.core.plugin.IPlugin; 15 import org.eclipse.pde.core.plugin.IPluginBase; 16 import org.eclipse.pde.core.plugin.IPluginImport; 17 import org.eclipse.pde.internal.core.PDECore; 18 19 public class CalleesContentProvider extends DependenciesViewPageContentProvider { 20 public CalleesContentProvider(DependenciesView view) { 21 super(view); 22 } 23 24 28 protected Object [] findCallees(IPluginBase plugin) { 29 if (plugin instanceof IFragment) { 30 String hostId = ((IFragment) plugin).getPluginId(); 31 IPlugin hostPlugin = PDECore.getDefault().findPlugin(hostId); 32 if (hostPlugin != null) { 33 IPluginImport[] imports = plugin.getImports(); 34 Object [] result = new Object [imports.length + 1]; 35 System.arraycopy(imports, 0, result, 0, imports.length); 36 result[imports.length] = hostPlugin; 37 return result; 38 } 39 } 40 return plugin.getImports(); 41 } 42 43 } 44 | Popular Tags |