Select Git revision
CyActivator.java
-
Philipp Spohr authored
Basic work on implementing visual representation of solution
Philipp Spohr authoredBasic work on implementing visual representation of solution
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
CyActivator.java 1.93 KiB
package de.hhu.ba.yoshikoWrapper;
import java.util.Properties;
import org.cytoscape.application.CyApplicationManager;
import org.cytoscape.application.swing.CyAction;
import org.cytoscape.application.swing.CySwingApplication;
import org.cytoscape.application.swing.CytoPanelComponent;
import org.cytoscape.service.util.AbstractCyActivator;
import org.osgi.framework.BundleContext;
import de.hhu.ba.yoshikoWrapper.core.ConfigurationManager;
import de.hhu.ba.yoshikoWrapper.core.Core;
import de.hhu.ba.yoshikoWrapper.core.YoshikoLoader;
import de.hhu.ba.yoshikoWrapper.gui.MainPanel;
import de.hhu.ba.yoshikoWrapper.gui.MainPanelAction;
import de.hhu.ba.yoshikoWrapper.gui.SolutionsPanel;
public class CyActivator extends AbstractCyActivator {
public CyActivator() {
super();
}
@Override
public void start(BundleContext context) throws Exception {
//Initialize cytoscape configuration system
ConfigurationManager cm = new ConfigurationManager("yoshikoWrapper", "yoshiko.props");
Properties propsReaderServiceProps = new Properties();
propsReaderServiceProps.setProperty("cyPropertyName", "yoshiko.props");
registerAllServices(context,cm,propsReaderServiceProps);
//Attempt to find the yoshiko lib in r a previously stored location
YoshikoLoader.provideConfiguration(cm);
if (!YoshikoLoader.isLibraryLoaded()){
YoshikoLoader.loadLibrary(cm.getProperties().getProperty("pathToYoshiko"));
}
CyApplicationManager cyApplicationManager = getService(context, CyApplicationManager.class);
Core.setApplicationManager(cyApplicationManager);
CySwingApplication cytoscapeDesktopService = getService(context,CySwingApplication.class);
//main panel and result panel
MainPanel mainPanel = new MainPanel();
SolutionsPanel solutionsPanel = new SolutionsPanel();
registerService(context,mainPanel,CytoPanelComponent.class, new Properties());
registerService(context,solutionsPanel,CytoPanelComponent.class, new Properties());
}
}