Observations about details pane callback methods

Observations about details pane callback methods

Postby JohnM » Sun Sep 05, 2004 2:52 pm

I'm adding a new tab in the details pane and have read the info at http://www.gentleware.com/support/dev/hints.php4. My tab class extends org.argouml.ui.TabSpawnable.

I've been experimenting with the on* methods and observed the following:

A) File\New Project produces two consecutive calls of onProjectClosed(), passing the previous project as the argument.

B) File\New Project doesn't seem to call onProjectCreated().

C) onProjectSaved() seems to be passed null rather than a project. Here's what my method does:

protected void onProjectSaved(PoseidonProject project) {
System.out.println("ModelConnectionPane.onProjectSaved: " + project.getName());

The save then fails. Here's what the log reports:

2004-09-05 14:38:46,999 WARN [Saving SwingWorker]: [ActionSaveProject] caught unspecified Exception null
at com.georgejames.umlanji.poseidon.ui.ModelConnectionPane.onProjectSaved(ModelConnectionPane.java:134)
at org.argouml.ui.DetailsPane.C(Unknown Source)
at org.argouml.ui.DetailsPane.access$300(Unknown Source)
at org.argouml.ui.DetailsPane$1.vetoableChange(Unknown Source)
at java.beans.VetoableChangeSupport.fireVetoableChange(Unknown Source)
at java.beans.VetoableChangeSupport.fireVetoableChange(Unknown Source)
at com.gentleware.poseidon.kernel.PoseidonProject.fireProjectChanged(Unknown Source)
at com.gentleware.poseidon.uml.UmlProject.postSave(Unknown Source)
at com.gentleware.poseidon.ui.R$1.construct(Unknown Source)
at com.gentleware.poseidon.util.SwingWorker$3.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

onProjectLoaded(), onProjectCreated(), onProjectClosed(), onProjectSaved()
John Murray
Posts: 73
Joined: Sun Aug 10, 2003 1:02 pm

Re: Observations about details pane callback methods

Postby [gw] Jesco von Voss » Mon Sep 06, 2004 11:39 am

A and B seem to be a bug in Poseidon; we'll investigate further. C indeed receives null as parameter value; that one I just fixed (will be corrected in 2.6).

As a workaround, you can add your own project event listener to the class PoseidonProject.

Jesco von Voss
[gw] Jesco von Voss
Posts: 273
Joined: Sat Jan 18, 2003 10:08 am
Location: Hamburg

Return to Plug-Ins

Who is online

Users browsing this forum: No registered users and 2 guests