Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extra options #225

Open
diffany-admin opened this issue Dec 22, 2014 · 11 comments
Open

extra options #225

diffany-admin opened this issue Dec 22, 2014 · 11 comments

Comments

@diffany-admin
Copy link
Collaborator

Issue by svlandeg
Thu Nov 20 08:19:41 2014


I am seeing the "extra options" menu twice in the diffany plugin?

extraoptions

@diffany-admin
Copy link
Collaborator Author

Comment by svlandeg
Thu Nov 20 08:29:01 2014


This happened after uninstalling the plugin, and installing a new one from file. Then suddenly the old one was mentioned as "installed" again, too. Still, I wonder how the menu got duplicated then.

I just tried again by uninstalling, actually closing cytoscape, reopening and installing again. This time I see only one version, and the menu is OK as well...

@diffany-admin
Copy link
Collaborator Author

Comment by tvparys
Thu Nov 20 14:07:40 2014


The is probably because the nature of the Extra Options menu (with the radio buttons) required a manual adding, instead of using the built-in app menu registration.
So, re-installing the App without closing Cytoscape, simply executes the menu initialization twice.
This might be solved by implementing an App destructor, which cleans up more nicely when the app is uninstalled.

@diffany-admin
Copy link
Collaborator Author

Comment by svlandeg
Thu Nov 20 14:13:50 2014


Right. I guess if it's too much work for now, move to a future milestone?

@diffany-admin
Copy link
Collaborator Author

Comment by tvparys
Thu Nov 20 14:18:14 2014


I can see how it should be done.
The annoying thing seems to be that it's simple to implement the bundle's start() method, but the stop() method has a final default implementation, so it can't be overridden.
The solution would be to not use the AbstractActivator, but to completely implement our own BundleActivator I guess...

@diffany-admin
Copy link
Collaborator Author

Comment by tvparys
Thu Nov 20 14:57:26 2014


Simply copying the whole AbstractActivator to our own package in order to make a non-final stop() method, does not seem to work:

[ERROR] /home/thpar/git/diffnet/diffany/src/main/java/be/svlandeg/diffany/cytoscape/internal/AbstractDiffanyActivator.java:[33,19] cannot access org.osgi.util.tracker.ServiceTracker
[ERROR] class file for org.osgi.util.tracker.ServiceTracker not found

@diffany-admin
Copy link
Collaborator Author

Comment by tvparys
Thu Nov 20 15:26:01 2014


Version 3.1.1 features a shutdown() method for App devs to override.
We are using the 3.0.1 libs. What was the reason for that again?
Let's NOT toy around with big version changes for this release though...

@diffany-admin
Copy link
Collaborator Author

Comment by tvparys
Thu Nov 20 15:28:21 2014


From API 3.1.1:

        /**
         * Cleans up resources used by the app.  If the app creates threads, **adds
         * menu items via Swing**, or performs any other operation that modifies the
         * environment, this method this method should be overridden to
         * perform any necessary clean up.
         */

@diffany-admin
Copy link
Collaborator Author

Comment by svlandeg
Thu Nov 20 15:33:03 2014


No idea why were are using the 3.0.1 libs ... :s

@diffany-admin
Copy link
Collaborator Author

Comment by tvparys
Thu Nov 20 15:33:46 2014


I think that was the recommended stable version when we started out.

@diffany-admin
Copy link
Collaborator Author

Comment by tvparys
Thu Nov 20 15:39:09 2014


Changing the pom.xml dependencies to 3.1.1 compiles and runs without problems and enables the shutdown() method. Implementing and testing.

@diffany-admin
Copy link
Collaborator Author

Comment by tvparys
Thu Nov 20 15:54:10 2014


Too risky an operation for now. Menu's can be removed effectively, but don't appear anymore at all when the App is installed a second time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants