PathVisio / libGPML

Java library for reading / writing GPML files
Apache License 2.0
2 stars 4 forks source link

Remove JOption Dialog from libGPML #19

Closed Finterly closed 1 year ago

Finterly commented 1 year ago

JOption dialog is used in two places in libGPML:

  1. org.pathvisio.libgpml.model > GPMLFormat.java (which is currently removed) image

  2. org.pathvisio.libgpml.model > DataNode.java (for the Alias method)

These should be removed (or rather added back in for GPMLFormat.java). Egon proposes a "in other settings we used a listener system for this the library would fire an event to all tools that are listening PV would be listening (and convert this event in a dialog)but the JUnit test would not register a listener and therefore ignore it other events I can imagine to happen: "Hey, this is not an GPML file! What are you trying to make me read??" (or something like that)

we use it in the CDK. Look for IOSetting: https://github.com/cdk/cdk/search?q=IOSetting and an reader and write level, in the interface, there should be a method like to register a listener. the reader would keep a list of listeners, and "fire" the event with those listeners I think see base/interfaces/src/main/java/org/openscience/cdk/io/IChemObjectIO.java

the CDK implements several listeners, for example: storage/io/src/main/java/org/openscience/cdk/io/listener/SwingGUIListener.java storage/io/src/main/java/org/openscience/cdk/io/listener/TextGUIListener.java the SwingGUI listener would then show to popup dialog

Finterly commented 1 year ago

The dialog for when changing DataNode setType() was moved to ant pathvisio4. As per commit 7b5b8a9

egonw commented 1 year ago

I think this was fixed.