Search in sources :

Example 1 with IControllerExtensionProvider

use of org.freeplane.main.osgi.IControllerExtensionProvider in project freeplane by freeplane.

the class Activator method start.

public void start(final BundleContext context) throws Exception {
    registerClasspathUrlHandler(context);
    context.registerService(IControllerExtensionProvider.class.getName(), new IControllerExtensionProvider() {

        public void installExtension(Controller controller) {
            WorkspaceController.install(controller);
            UserAccountController.install(controller);
            LogUtils.info("Workspace controller installed.");
            startControllerExtensions(context, controller);
        }
    }, null);
    final Hashtable<String, String[]> props = new Hashtable<String, String[]>();
    // WORKSPACE - todo(low): list all modes from freeplane controller
    props.put("mode", new String[] { MModeController.MODENAME });
    context.registerService(IModeControllerExtensionProvider.class.getName(), new IModeControllerExtensionProvider() {

        public void installExtension(ModeController modeController) {
            addToQuitChain();
            WorkspaceController.getController().installMode(modeController);
            startPluginServices(context, modeController);
            WorkspaceController.getController().startModeExtension(modeController);
        }
    }, props);
}
Also used : IControllerExtensionProvider(org.freeplane.main.osgi.IControllerExtensionProvider) Hashtable(java.util.Hashtable) ModeController(org.freeplane.features.mode.ModeController) MModeController(org.freeplane.features.mode.mindmapmode.MModeController) UserAccountController(org.freeplane.core.user.UserAccountController) Controller(org.freeplane.features.mode.Controller) ModeController(org.freeplane.features.mode.ModeController) MModeController(org.freeplane.features.mode.mindmapmode.MModeController) IModeControllerExtensionProvider(org.freeplane.main.osgi.IModeControllerExtensionProvider)

Example 2 with IControllerExtensionProvider

use of org.freeplane.main.osgi.IControllerExtensionProvider in project freeplane by freeplane.

the class Activator method start.

/*
	 * (non-Javadoc)
	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
	 */
public void start(final BundleContext context) throws Exception {
    parentLogger = Logger.getAnonymousLogger().getParent();
    handler = new ReportGenerator();
    parentLogger.addHandler(handler);
    context.registerService(IControllerExtensionProvider.class.getName(), new IControllerExtensionProvider() {

        public void installExtension(Controller controller) {
            handler.setBugReportListener(new ManualBugReporter());
        }
    }, null);
}
Also used : IControllerExtensionProvider(org.freeplane.main.osgi.IControllerExtensionProvider) Controller(org.freeplane.features.mode.Controller)

Aggregations

Controller (org.freeplane.features.mode.Controller)2 IControllerExtensionProvider (org.freeplane.main.osgi.IControllerExtensionProvider)2 Hashtable (java.util.Hashtable)1 UserAccountController (org.freeplane.core.user.UserAccountController)1 ModeController (org.freeplane.features.mode.ModeController)1 MModeController (org.freeplane.features.mode.mindmapmode.MModeController)1 IModeControllerExtensionProvider (org.freeplane.main.osgi.IModeControllerExtensionProvider)1