/** * @return array of source locations defined by a bundle manifest entry */ public Collection<SourceLocation> getBundleManifestLocations() { return getBundleManifestLocator().getSourceLocations(); }
/** * @return source location that was specified by a bundle manifest entry to provide source for the given plugin. */ private SourceLocation getBundleManifestLocation(String pluginID, Version version) { return getBundleManifestLocator().getSourceLocation(pluginID, version); }
/** * Searches bundle manifest source locations for the one that provides source * for the given plugin. Gets the source roots (String paths) for the plugin * by parsing the source bundle's manifest. If the given plugin does not have * a known source location with a bundle manifest entry an empty Set will be returned. * * @param plugin plugin to lookup source for * @return set of String paths that are source roots for the plugin, possibly empty */ public Set<String> findSourceRoots(IPluginBase plugin) { if (plugin.getId() == null || plugin.getVersion() == null) { return Collections.emptySet(); } return getBundleManifestLocator().getSourceRoots(plugin.getId(), new Version(plugin.getVersion())); }
/** * Searches bundle manifest source locations for the one that provides source * for the given plugin. Gets all source roots for the source bundle by parsing * the manifest file. If the source bundle provides source for multiple plugins, * the roots specified for all of them (duplicates removed). If the source bundle * only provides source for a single plugin/version, this method will return the * same result as #findSourceRoots(IPluginModelBase). If the given plugin does not have * a known source location with a bundle manifest entry an empty Set will be returned. * * @param plugin plugin to lookup source for * @return set of String paths that are source roots for the bundle, possibly empty */ public Set<String> findAllSourceRootsInSourceLocation(IPluginBase plugin) { if (plugin.getId() == null || plugin.getVersion() == null) { return Collections.emptySet(); } return getBundleManifestLocator().getAllSourceRoots(plugin.getId(), new Version(plugin.getVersion())); }
/** * Returns whether the given path describes a source location with a source bundle manifest entry. * @param plugin the plug-in to test * @return whether the given path is a bundle manifest location */ public boolean hasBundleManifestLocation(IPluginBase plugin) { if (plugin.getId() == null || plugin.getVersion() == null) { return false; } return getBundleManifestLocator().hasValidSourceLocation(plugin.getId(), new Version(plugin.getVersion())); }