1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package org.dishevelled.venn.cytoscape3.internal;
25
26 import java.util.Properties;
27
28 import org.cytoscape.application.CyApplicationManager;
29 import org.cytoscape.application.swing.CyAction;
30 import org.cytoscape.group.CyGroupManager;
31 import org.cytoscape.service.util.AbstractCyActivator;
32 import org.cytoscape.service.util.CyServiceRegistrar;
33
34 import org.osgi.framework.BundleContext;
35
36
37
38
39
40
41 public final class CyActivator extends AbstractCyActivator
42 {
43 @Override
44 public void start(final BundleContext bundleContext)
45 {
46 if (bundleContext == null)
47 {
48 throw new NullPointerException("bundleContext must not be null");
49 }
50 CyApplicationManager applicationManager = getService(bundleContext, CyApplicationManager.class);
51 CyGroupManager groupManager = getService(bundleContext, CyGroupManager.class);
52 CyServiceRegistrar serviceRegistrar = getService(bundleContext, CyServiceRegistrar.class);
53
54 VennDiagramsAction vennDiagramsAction = new VennDiagramsAction(applicationManager, groupManager, serviceRegistrar);
55 Properties properties = new Properties();
56 registerService(bundleContext, vennDiagramsAction, CyAction.class, properties);
57 }
58 }