Skip to content
Snippets Groups Projects
Commit 32b0dc60 authored by Philipp Spohr's avatar Philipp Spohr
Browse files

Upgraded wrapper for the latest yoshiko changes (once again)

parent 6e20a6f3
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ public class CyActivator extends AbstractCyActivator { ...@@ -20,7 +20,7 @@ public class CyActivator extends AbstractCyActivator {
@Override @Override
public void start(BundleContext context) throws Exception { public void start(BundleContext context) throws Exception {
//TODO: Load shared library if installed on startup
CySwingApplication cytoscapeDesktopService = getService(context,CySwingApplication.class); CySwingApplication cytoscapeDesktopService = getService(context,CySwingApplication.class);
MainPanel mainPanel = new MainPanel(); MainPanel mainPanel = new MainPanel();
......
...@@ -20,6 +20,7 @@ public class YoshikoLoader { ...@@ -20,6 +20,7 @@ public class YoshikoLoader {
public void loadLibrary(String libPath) { public void loadLibrary(String libPath) {
//TODO: IF ALREADY LOADED DON'T LOAD AGAIN!!!!
try { try {
System.load(libPath); System.load(libPath);
libraryLoaded = true; libraryLoaded = true;
......
...@@ -8,7 +8,6 @@ import javax.swing.Icon; ...@@ -8,7 +8,6 @@ import javax.swing.Icon;
import javax.swing.JButton; import javax.swing.JButton;
import javax.swing.JFileChooser; import javax.swing.JFileChooser;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel; import javax.swing.JPanel;
import org.cytoscape.application.swing.CytoPanelComponent; import org.cytoscape.application.swing.CytoPanelComponent;
import org.cytoscape.application.swing.CytoPanelName; import org.cytoscape.application.swing.CytoPanelName;
...@@ -16,7 +15,6 @@ import org.cytoscape.application.swing.CytoPanelName; ...@@ -16,7 +15,6 @@ import org.cytoscape.application.swing.CytoPanelName;
import de.hhu.ba.yoshikoWrapper.core.YoshikoLoader; import de.hhu.ba.yoshikoWrapper.core.YoshikoLoader;
import de.hhu.ba.yoshikoWrapper.swig.LibraryInterface; import de.hhu.ba.yoshikoWrapper.swig.LibraryInterface;
import de.hhu.ba.yoshikoWrapper.swig.SWIGTYPE_p_yskInput__LibraryInput; import de.hhu.ba.yoshikoWrapper.swig.SWIGTYPE_p_yskInput__LibraryInput;
import de.hhu.ba.yoshikoWrapper.swig.SWIGTYPE_p_ysk__ClusterEditingInstance;
/**This class describes the Swing Panel that the user interacts with in cytoscape /**This class describes the Swing Panel that the user interacts with in cytoscape
* @author Philipp Spohr, Aug 6, 2017 * @author Philipp Spohr, Aug 6, 2017
...@@ -39,7 +37,7 @@ public class MainPanel extends JPanel implements CytoPanelComponent { ...@@ -39,7 +37,7 @@ public class MainPanel extends JPanel implements CytoPanelComponent {
private JLabel yoshikoVersionLabel; private JLabel yoshikoVersionLabel;
/** /**
* Main constructor, creates a new Panel and intializes subcomponents * Main constructor, creates a new Panel and initializes subcomponents
*/ */
public MainPanel() { public MainPanel() {
...@@ -79,6 +77,9 @@ public class MainPanel extends JPanel implements CytoPanelComponent { ...@@ -79,6 +77,9 @@ public class MainPanel extends JPanel implements CytoPanelComponent {
SWIGTYPE_p_yskInput__LibraryInput instance; SWIGTYPE_p_yskInput__LibraryInput instance;
instance = LibraryInterface.new_LibraryInput(); instance = LibraryInterface.new_LibraryInput();
LibraryInterface.LibraryInput_setSize(instance, 4); LibraryInterface.LibraryInput_setSize(instance, 4);
LibraryInterface.LibraryInput_addEdge(instance, 0, 1, 2);
LibraryInterface.LibraryInput_addEdge(instance, 1, 3, 5);
LibraryInterface.LibraryInput_parseInput(instance);
} }
} }
......
...@@ -42,15 +42,11 @@ public class LibraryInterface { ...@@ -42,15 +42,11 @@ public class LibraryInterface {
LibraryInterfaceJNI.delete_edge(SWIGTYPE_p_yskInput__edge.getCPtr(self)); LibraryInterfaceJNI.delete_edge(SWIGTYPE_p_yskInput__edge.getCPtr(self));
} }
public static SWIGTYPE_p_ysk__ClusterEditingInstance LibraryInput_parseInput(SWIGTYPE_p_yskInput__LibraryInput self, SWIGTYPE_p_std__istream is) { public static SWIGTYPE_p_ysk__ClusterEditingInstance LibraryInput_parseInput(SWIGTYPE_p_yskInput__LibraryInput self) {
long cPtr = LibraryInterfaceJNI.LibraryInput_parseInput(SWIGTYPE_p_yskInput__LibraryInput.getCPtr(self), SWIGTYPE_p_std__istream.getCPtr(is)); long cPtr = LibraryInterfaceJNI.LibraryInput_parseInput(SWIGTYPE_p_yskInput__LibraryInput.getCPtr(self));
return (cPtr == 0) ? null : new SWIGTYPE_p_ysk__ClusterEditingInstance(cPtr, false); return (cPtr == 0) ? null : new SWIGTYPE_p_ysk__ClusterEditingInstance(cPtr, false);
} }
public static boolean LibraryInput_validateInput(SWIGTYPE_p_yskInput__LibraryInput self, SWIGTYPE_p_std__istream is) {
return LibraryInterfaceJNI.LibraryInput_validateInput(SWIGTYPE_p_yskInput__LibraryInput.getCPtr(self), SWIGTYPE_p_std__istream.getCPtr(is));
}
public static SWIGTYPE_p_yskInput__LibraryInput new_LibraryInput() { public static SWIGTYPE_p_yskInput__LibraryInput new_LibraryInput() {
long cPtr = LibraryInterfaceJNI.new_LibraryInput(); long cPtr = LibraryInterfaceJNI.new_LibraryInput();
return (cPtr == 0) ? null : new SWIGTYPE_p_yskInput__LibraryInput(cPtr, true); return (cPtr == 0) ? null : new SWIGTYPE_p_yskInput__LibraryInput(cPtr, true);
......
...@@ -17,8 +17,7 @@ public class LibraryInterfaceJNI { ...@@ -17,8 +17,7 @@ public class LibraryInterfaceJNI {
public final static native double edge_cost_get(long jarg1); public final static native double edge_cost_get(long jarg1);
public final static native long new_edge(); public final static native long new_edge();
public final static native void delete_edge(long jarg1); public final static native void delete_edge(long jarg1);
public final static native long LibraryInput_parseInput(long jarg1, long jarg2); public final static native long LibraryInput_parseInput(long jarg1);
public final static native boolean LibraryInput_validateInput(long jarg1, long jarg2);
public final static native long new_LibraryInput(); public final static native long new_LibraryInput();
public final static native void LibraryInput_setSize(long jarg1, int jarg2); public final static native void LibraryInput_setSize(long jarg1, int jarg2);
public final static native void LibraryInput_addEdge(long jarg1, int jarg2, int jarg3, double jarg4); public final static native void LibraryInput_addEdge(long jarg1, int jarg2, int jarg3, double jarg4);
......
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.8
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package de.hhu.ba.yoshikoWrapper.swig;
public class SWIGTYPE_p_std__istream {
private transient long swigCPtr;
protected SWIGTYPE_p_std__istream(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_std__istream() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_std__istream obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment