Re: [Cytoscape-discuss] Migration of plugin to Cytoscape 3.0.0 Beta2 API ...

70 views
Skip to first unread message

Jason Montojo

unread,
Sep 27, 2012, 10:35:33 AM9/27/12
to cytoscap...@googlegroups.com
Hi Bram,

Thanks for your feedback!  My comments are inlined below:

On Fri, Sep 14, 2012 at 5:58 AM, Bram Van de Sande <vandesa...@gmail.com> wrote:
A. In the previous version I created a custom VisualStyle programmatically and want to do the same in the new version of the plugin. I followed the example in the CookBook but this results in an error when trying to install the plugin from a JAR file (using the App Manager):
Caused by: java.lang.NoClassDefFoundError: org/cytoscape/view/vizmap/mappings/DiscreteMapping
at view.IRegulonVisualStyle.createVisualStyle(Unknown Source)
at view.IRegulonVisualStyle.install(Unknown Source)
at view.IRegulonApp.<init>(Unknown Source)
... 16 more

Which version of the API are you compiling against?  And which version of Cytoscape are you running your plugin with?  I tried to reproduce this using the M5 release (a.k.a the developer's beta) as well as the latest stable build but I couldn't trigger that exception...
 
B. Is there a way to log messages to the Developer's Log Console. I tried to get an implementation of the OSGi LogService interface but this resulted in a RuntimeException.

You'll need to add a reference to pax-logging-api to your compile time classpath.  We use version 1.5.2 currently at runtime so that's probably a good choice to compile against.  Once that's done, you can obtain a logger like this:

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
...
Logger logger = LoggerFactory.getLogger(Your.class);

C. I tried to hook up HTML help pages to the Cytoscape help system via the instructions provided in the CookBook. Unfortunately this results in a HelpSetException at plugin installation time. The code snippet that results in this error:

The cookbook instructions have a bit of a bug.  HELP_SET_NAME should be pointing to a file like /help/jhelpset.hs which should be present in your app's JAR.  Can you confirm the URL is right and that jhelpset.hs is in the appropriate spot in your JAR?
 
D. My plugin registers the following listeners: NetworkViewAddedListener, NetworkViewDestroyedListener and NetworkViewChangedListener. Could it be that my listeners are not always called in the current version of Cytoscape 3.0?

Your listeners should always be called.  Can you provide more information about the symptoms you're seeing?  As long as the listeners get registered as soon as your app starts up, they should get all the notifications.

Hope this helps,
Jason
Reply all
Reply to author
Forward
0 new messages