Skip to content

Commit

Permalink
Added discovery ui for Bioclispe features
Browse files Browse the repository at this point in the history
With marketplace wizard
  • Loading branch information
Arvid Berg committed Dec 21, 2011
1 parent 0eb36dc commit adeca26
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/net.bioclipse.ui.install/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
28 changes: 28 additions & 0 deletions plugins/net.bioclipse.ui.install/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>net.bioclipse.ui.install</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
14 changes: 14 additions & 0 deletions plugins/net.bioclipse.ui.install/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Install
Bundle-SymbolicName: net.bioclipse.ui.install;singleton:=true
Bundle-Version: 2.5.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.eclipse.equinox.p2.discovery;bundle-version="1.0.0",
org.eclipse.equinox.p2.discovery.compatibility;bundle-version="1.0.1",
org.eclipse.equinox.p2.ui.discovery;bundle-version="1.0.0",
org.eclipse.ui;bundle-version="3.6.2",
org.eclipse.epp.mpc.ui;bundle-version="1.0.1"
Import-Package: org.slf4j;version="1.5.11"
Eclipse-RegisterBuddy: org.eclipse.equinox.p2.ui.discovery
Bundle-ActivationPolicy: lazy
7 changes: 7 additions & 0 deletions plugins/net.bioclipse.ui.install/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
logo_16_trans.gif,\
icon_16-32bit.bmp
Binary file not shown.
Binary file added plugins/net.bioclipse.ui.install/logo_16_trans.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions plugins/net.bioclipse.ui.install/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.ui.commands">
<command
id="openInstallDialog"
name="Install Feature">
<defaultHandler
class="net.bioclipse.ui.install.handler.OpenDiscoveryDialog">
<parameter
name="net.bioclipse.ui.install.parameter1"
value="net.bioclipse.ui.install.parameter1">
</parameter>
</defaultHandler>
</command>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="menu:help?after=net.bioclipse.data.openWizard">
<command
commandId="openInstallDialog"
label="Install Feature"
style="push">
</command>
</menuContribution>
</extension>
<extension
point="org.eclipse.epp.mpc.ui.catalog">
<catalog
description="Discover modular features for Bioclipse"
icon="icon_16-32bit.bmp"
label="Bioclipse Discovery"
url="http://localhost:8080/marketplace_0.4/">
</catalog>
</extension>
</plugin>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package net.bioclipse.ui.install.handler;

import java.net.URI;
import java.net.URISyntaxException;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.epp.mpc.ui.MarketplaceClient;
import org.eclipse.equinox.internal.p2.discovery.Catalog;
import org.eclipse.equinox.internal.p2.discovery.DiscoveryCore;
import org.eclipse.equinox.internal.p2.ui.discovery.repository.RepositoryDiscoveryStrategy;
import org.eclipse.equinox.internal.p2.ui.discovery.util.WorkbenchUtil;
import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration;
import org.eclipse.equinox.internal.p2.ui.discovery.wizards.DiscoveryWizard;
import org.eclipse.jface.wizard.WizardDialog;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class OpenDiscoveryDialog extends AbstractHandler{
private static Logger logger = LoggerFactory.getLogger(OpenDiscoveryDialog.class);
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
MarketplaceClient.openMarketplaceWizard(null);
return null;
}

}

0 comments on commit adeca26

Please sign in to comment.