Author: Grid.Qian
Date: 2008-12-30 02:36:42 -0500 (Tue, 30 Dec 2008)
New Revision: 12838
Removed:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/.settings/attachedFile.properties
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/GraphicalFileGenerator.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/TranslateHelper.java
Log:
JBIDE-3471: if a subprocess have only a default task, then there are not gpd.xml for this
subprocess in generated jpdl folder.
Deleted:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/.settings/attachedFile.properties
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/.settings/attachedFile.properties 2008-12-29
14:27:45 UTC (rev 12837)
+++
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/.settings/attachedFile.properties 2008-12-30
07:36:42 UTC (rev 12838)
@@ -1,2 +0,0 @@
-## index of importer -> set(imports)
-#Fri Dec 26 15:31:28 CST 2008
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/GraphicalFileGenerator.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/GraphicalFileGenerator.java 2008-12-29
14:27:45 UTC (rev 12837)
+++
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/GraphicalFileGenerator.java 2008-12-30
07:36:42 UTC (rev 12838)
@@ -113,8 +113,10 @@
for (String bpmnID : map.keySet()) {
if (bpmnID != null) {
// when translate bpmn loop activity, we create a mock
- // structure and when translate bpmn transaction, we create a
- // mock structure too. For these reason, we need to give a (x,y)
+ // structure
+ // when translate bpmn transaction, we create a
+ // mock structure too.
+ // For these reasons, we need to give a (x,y)
// increment to avoid two element overlap
int xIncre = 0;
int yIncre = 0;
@@ -161,11 +163,10 @@
eleList);
xIncre = 300;
yIncre = 200;
+ } else if(bpmnID.endsWith(Constants.Bpmn_Pool_Element_Name)){
+ continue;
}
}
- if (bpmnGpdEle == null) {
- continue;
- }
translateGraphicalElement(TranslateHelper.getXY(bpmnGpdEle,
xIncre, yIncre), map.get(bpmnID), eleList);
}
@@ -179,7 +180,7 @@
return;
}
- // if not translate, then translate the pool of the element
+ // if not translate the element's pool, then translate the pool of the element
if (!gpdPoolNames.contains(jpdlEle.getParent().attributeValue(
Constants.Dom_Element_Name))
&& Constants.Jpdl_Process_Definition_Element_Name
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/TranslateHelper.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/TranslateHelper.java 2008-12-29
14:27:45 UTC (rev 12837)
+++
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/b2j/translate/TranslateHelper.java 2008-12-30
07:36:42 UTC (rev 12838)
@@ -152,7 +152,7 @@
/*
* select the elements from process. These elements have no transitions sub
- * element or have transtions to end-state.
+ * element or have transitions to end-state.
*/
public static List<Element> locateLastElements(Element processRoot) {
List<Element> list = new ArrayList<Element>();
@@ -164,16 +164,14 @@
Element subEle = ((Element) ele)
.element(Constants.Jpdl_Transition_Element);
if (subEle != null
- && endState
- .attributeValue(Constants.Dom_Element_Name)
+ && endState.attributeValue(Constants.Dom_Element_Name)
.equals(subEle.attributeValue(Constants.To))) {
list.add((Element) ele);
}
}
} else {
for (Object ele : processRoot.elements()) {
- if (((Element) ele)
- .element(Constants.Jpdl_Transition_Element) == null) {
+ if (((Element) ele).element(Constants.Jpdl_Transition_Element) == null) {
list.add((Element) ele);
}
}
@@ -189,8 +187,7 @@
List<Element> eleList) {
Element element = null;
for (Element ele : eleList) {
- String str = ele
- .attributeValue(Constants.Bpmn_Href_Attribute_Name);
+ String str = ele.attributeValue(Constants.Bpmn_Href_Attribute_Name);
if (str != null && str.contains(bpmnID)) {
element = ele;
break;
@@ -228,8 +225,7 @@
String width, String height) {
Element ele = DomXmlWriter.addElement(parentEle, name);
DomXmlWriter.addAttribute(ele, Constants.Width_Attribute_Name, width);
- DomXmlWriter.addAttribute(ele, Constants.Height_Attribute_Name,
- height);
+ DomXmlWriter.addAttribute(ele, Constants.Height_Attribute_Name, height);
return ele;
}
@@ -267,14 +263,19 @@
*/
public static String[] getXY(Element bpmnGpdEle, int xIncre, int yIncre) {
String xy[] = new String[2];
- xy[0] = String.valueOf(Integer.parseInt(bpmnGpdEle
- .attributeValue(Constants.X_Attribute_Name) == null ? "0"
- : bpmnGpdEle.attributeValue(Constants.X_Attribute_Name))
- + xIncre);
- xy[1] = String.valueOf(Integer.parseInt(bpmnGpdEle
- .attributeValue(Constants.Y_Attribute_Name) == null ? "0"
- : bpmnGpdEle.attributeValue(Constants.Y_Attribute_Name))
- + yIncre);
+ if (bpmnGpdEle == null) {
+ xy[0] = String.valueOf(xIncre);
+ xy[1] = String.valueOf(yIncre);
+ } else {
+ xy[0] = String.valueOf(Integer.parseInt(bpmnGpdEle
+ .attributeValue(Constants.X_Attribute_Name) == null ? "0"
+ : bpmnGpdEle.attributeValue(Constants.X_Attribute_Name))
+ + xIncre);
+ xy[1] = String.valueOf(Integer.parseInt(bpmnGpdEle
+ .attributeValue(Constants.Y_Attribute_Name) == null ? "0"
+ : bpmnGpdEle.attributeValue(Constants.Y_Attribute_Name))
+ + yIncre);
+ }
return xy;
}
Show replies by date