Hi Jason,
I took your exact same approach.
My JFrame class is instantiated in CyActivator and I have a class which extends AbstractCyAction and on actionPerformed it calls frame.setVisible(true)
This works fine.
Now, In my CyActivator class, I instantiate my listeners class and register my listeners:
myListeners = new AppListeners();
//Register listeners
registerService(bc, myListeners, NetworkViewAddedListener.class, new Properties());
My listeners class prints the following:
public void handleEvent(NetworkViewAddedEvent nvae) {
System.out.println("Network view add: registering->"+nvae.getNetworkView().getModel().getSUID());
}
If I build my app, launch cytoscape, update and start, when my network is generated I see the output:
Network view add: registering->71
Which is great. Now, If I rebuild changing the print statement to include more arrows, update my bundle and launch my app again, on a network view added event I see
Cytoscape 3.0.0-M5> update 182
Network view add: registering->>>>71
Network view add: registering->71
Both the old and the new listeners are still there. i.e. the old listeners were not removed which causes the redundancy…
Am I missing something?
Omar