Activator.java 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package uraxis;
  2. import com.ur.urcap.api.contribution.program.swing.SwingProgramNodeService;
  3. import com.ur.urcap.api.contribution.toolbar.swing.SwingToolbarService;
  4. import org.osgi.framework.BundleActivator;
  5. import org.osgi.framework.BundleContext;
  6. import com.ur.urcap.api.contribution.InstallationNodeService;
  7. import com.ur.urcap.api.contribution.ProgramNodeService;
  8. import com.ur.urcap.api.contribution.DaemonService;
  9. import uraxis.programnodes.AbsFestoNodeService;
  10. import uraxis.programnodes.NodeType;
  11. import uraxis.programnodes.RelFestoNodeService;
  12. import uraxis.programnodes.init.FestoInitNodeService;
  13. import uraxis.toolbar.MyToolbarService;
  14. /**
  15. * Hello world activator for the OSGi bundle URCAPS contribution
  16. *
  17. */
  18. public class Activator implements BundleActivator {
  19. public static MyDaemonInterface daemonInterface;
  20. @Override
  21. public void start(BundleContext context) throws Exception {
  22. System.out.println("Activator says Hello World!");
  23. MyDaemonDaemonService daemonService = new MyDaemonDaemonService();
  24. MyDaemonInstallationNodeService installationNodeService = new MyDaemonInstallationNodeService(daemonService);
  25. context.registerService(InstallationNodeService.class, installationNodeService, null);
  26. context.registerService(DaemonService.class, daemonService, null);
  27. context.registerService(SwingToolbarService.class, new MyToolbarService(), null);
  28. context.registerService(SwingProgramNodeService.class, new AbsFestoNodeService(), null);
  29. // context.registerService(SwingProgramNodeService.class, new RelFestoNodeService(), null);
  30. context.registerService(SwingProgramNodeService.class, new FestoInitNodeService(), null);
  31. }
  32. @Override
  33. public void stop(BundleContext bundleContext) throws Exception {
  34. System.out.println("Activator says Goodbye World!");
  35. }
  36. }