Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[bpel-dev] patch11=elements-added-with-name-attributes-in-sequence

Hi Simon,

 

This little patch #11 fixed the first two points from the TODO list (https://bugs.eclipse.org/bugs/show_bug.cgi?id=197468):

 

1. Elements are added into the DOM model (and thus in the source tab) without the name attribute.

2. Renaming just added elements in the design tab doesn’t affect the corresponding nodes in the source tab until the file is saved.

 

Things may work badly inside structured activities other than Sequence. This will work once I complete for other structured activities  what I did in patch #9 (changes made in Sequence sub-nodes in the source tab are reflected in the design tab).

 

Thanks,

            Vitaly.

### Eclipse Workspace Patch 1.0
#P org.eclipse.bpel.ui
Index: src/org/eclipse/bpel/ui/commands/InsertInContainerCommand.java
===================================================================
RCS file: /cvsroot/technology/org.eclipse.bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/commands/InsertInContainerCommand.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 InsertInContainerCommand.java
--- src/org/eclipse/bpel/ui/commands/InsertInContainerCommand.java	22 Jul 2007 16:34:38 -0000	1.1.2.1
+++ src/org/eclipse/bpel/ui/commands/InsertInContainerCommand.java	7 Aug 2007 10:21:50 -0000
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.bpel.ui.commands;
 
+import org.eclipse.bpel.model.Activity;
+import org.eclipse.bpel.model.resource.BPELResource;
 import org.eclipse.bpel.ui.Messages;
 import org.eclipse.bpel.ui.adapters.IContainer;
 import org.eclipse.bpel.ui.adapters.ILabeledElement;
@@ -68,10 +70,11 @@
 	    	beforeElement = org.eclipse.bpel.ui.util.BPELEditorUtil.getInstance().getElementForObject(before);
 	    }
 	    
-	    MyBPELWriter writer = new MyBPELWriter((org.eclipse.bpel.model.resource.BPELResource)(parent.eResource()),
+	    MyBPELWriter writer = new MyBPELWriter((BPELResource)(parent.eResource()),
 	    										parentElement.getOwnerDocument());
 
-	    Element childElement = writer.activity2XML(((org.eclipse.bpel.model.Activity)child));
+	    Element childElement = writer.activity2XML(((Activity)child));
+	    ((Activity)child).setElement(childElement);
 
 	    parentElement.insertBefore(childElement, beforeElement);
 	}

Back to the top