Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ve-dev] Initialization error with VisualComponentAdapter#componentValidated()

Rich -- thanks very much for getting the "fix" in for the TreeVisualContainerEditpolicy.activate() problem.

As you may remember, I have been getting a rather strange initialization message ( http://dev.eclipse.org/mhonarc/lists/ve-dev/msg01342.html).  Think I have finally localized the source.

I am using VisualComponentAdapter#componentValidated() as a trigger to reconcile layout configuration changes in the remote VM with the model held by my helper.  To implement the reconcile, I am doing a number of calls out to my remoteVMAdapter to dig out the informaiton I need.  (These calls are being made within the callback thread -- which appears to already be an async thread.)

During initialization of VE on an existing source file, VisualComponentAdapter#componentValidated() is being called, starting a reconcile.  Invariably, one of the calls to the remoteVMAdapter will fail, provoking the error message.  The specific call that fails seems to vary, as does the content of the error message, *apparently* depending on the number of formlayout/JPanels are in the design.  The listing in the prior message comes from a design with three formlayout/JPanels.  For a single formlayout/JPanel, I get only this as the error:

!ENTRY org.eclipse.jem.proxy 4 0 2006-08-30 21:08:35.625
!MESSAGE In REMCallbackThread
!STACK 0
java.net.SocketException: Socket closed
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at java.io.DataOutputStream.flush(Unknown Source)
at org.eclipse.jem.internal.proxy.common.remote.Commands.sendErrorCommand(Commands.java:1372)
at org.eclipse.jem.internal.proxy.common.remote.Commands.sendCallbackDoneCommand(Commands.java:1134)
at org.eclipse.jem.internal.proxy.remote.REMCallbackThread.run(REMCallbackThread.java:246)

Currently, I am flagging and ignoring the first  #componentValidated() callback, thereby skipping the reconcile during VE initialization.  Subsequent #componentValidated()/reconciles work fine.

Question is, is this just an initialization problem internal to VE -- and have I identified a valid workaround -- or is my doing the reconcile on the callback thread not proper?  If not, what is the correct way to use #componentValidated() to initiate the reconcile process.

Appreciate any help and advice you can give,
Gerald


Back to the top