Christian came across a problem with concurrency in FigClassifierRole
of the new sequence diagrams.

The problem was that drawing of a message edge (user interaction an
AWT thread) was effecting the Fig composition at the same time as the
same Fig was receiving a model event which also resulted in a change
to the Fig composition.

Forcing the handling of the model event to the AWT thread solved this.

I'm thinking that this is probably something we should do in general
in Figs to be safe

Something like the following in FigNodeModelElement (and Edge)

    final protected void modelChanged(final PropertyChangeEvent mee) {
        Runnable doWorkRunnable = new Runnable() {
            public void run() {
                modelChangedImpl(mee);
            }
        };

        SwingUtilities.invokeLater(doWorkRunnable);
    }

    protected void modelChangedImpl(PropertyChangeEvent mee) {
        // Here goes the code previously in modelChanged
    }


Sound reasonable?

Bob.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to