List<OSGiFramework> frameworks = new ArrayList<OSGiFramework>();
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
frameworks.clear();
Workspace workspace = (Workspace) newInput;
IConfigurationElement[] configElements = Platform.getExtensionRegistry().getConfigurationElementsFor(Plugin.PLUGIN_ID, "osgiFrameworks");
for (IConfigurationElement element : configElements) {
String frameworkName = element.getAttribute("name");
String bsn = element.getAttribute("bsn");
URL iconUrl = null;
String iconPath = element.getAttribute("icon");
if (iconPath != null) {
Bundle contributorBundle = BundleUtils.findBundle(Plugin.getDefault().getBundleContext(), element.getContributor().getName(), null);
if (contributorBundle != null)
iconUrl = contributorBundle.getEntry(iconPath);
}
List<RepositoryPlugin> repositories = (workspace != null) ? workspace.getRepositories() : Collections.<RepositoryPlugin> emptyList();
for (RepositoryPlugin repo : repositories) {
try {
SortedSet<Version> versions = repo.versions(bsn);
if (versions != null)
for (Version version : versions) {