Hi, guys.
I need help to fix a bug. The following is about bug and some exploration.
When copy and paste the node has children node, pasting action produces
redundant children nodes.
For example, if you copy node like :
<bpel:if name="If">
<bpel:sequence>
<bpel:invoke name="Invoke"/>
</bpel:sequence>
<bpel:elseif/>
<bpel:elseif/>
</bpel:if>
when you paste it, you may got this:
<bpel:if name="If3">
<bpel:sequence>
<bpel:invoke name="Invoke"></bpel:invoke>
</bpel:sequence>
<bpel:elseif></bpel:elseif>
<bpel:elseif></bpel:elseif>
<bpel:elseif></bpel:elseif>
<bpel:elseif></bpel:elseif>
<bpel:sequence>
<bpel:invoke name="Invoke"></bpel:invoke>
</bpel:sequence>
<bpel:elseif></bpel:elseif>
<bpel:sequence>
<bpel:invoke name="Invoke"></bpel:invoke>
</bpel:sequence>
</bpel:if>
You may not get the same result in every copying and pasting operation.
The result is not expected. I try to fix the bug, so I explore the
BPELCopyAction and BPELPasteAction in package org.eclipse.bpel.ui.actions. At
first, I thought the problem may have connection with BPELPasteCommand in
package org.eclipse.bpel.ui.commands. The related code is BPELPasteCommand's
doExcute() method, here is the code:
public void doExecute() {
TransferBuffer transferBuffer = fBpelEditor.getTransferBuffer();
fPastedObjects =
transferBuffer.copyTransferBuffer(fTargetObject,
fBpelEditor.getExtensionMap(),fReference );
}
After I read the code of the method TransferBuffer.copyTransferBuffer, I found
the method copy the source node model to the target node model. I thought the
model copying may cause this bug. But after explore detail in
TransferBuffer.copyContentsTo method, I found the there is nothing wrong in
model copying, or I missed something? If the model copying is right, may be
problem arise when model being serialized to xml. I cannot find the relative
code, any hints may be help.
Thanks!
grovecai
_______________________________________________
bpel-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/bpel-dev