Author: Grid.Qian
Date: 2008-11-05 22:26:03 -0500 (Wed, 05 Nov 2008)
New Revision: 11550
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/plugin.xml
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BpmnPoolsChoicePage.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/GeneratedFileLocationPage.java
Log:
JBIDE-3088:BPMN -> jPDL wizard fails if selected file is not BPMN
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/plugin.xml 2008-11-06 02:27:48 UTC
(rev 11549)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/plugin.xml 2008-11-06 03:26:03 UTC
(rev 11550)
@@ -10,7 +10,6 @@
class="org.jboss.tools.jbpm.convert.b2j.wizard.B2JExportWizard"
id="org.jboss.tools.jbpm.convert.export.b2jexportwizard">
<description>%wizard.description</description>
- <selection name="*.bpmn"
class="org.eclipse.core.resources.IFile"/>
</wizard>
</extension>
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BpmnPoolsChoicePage.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BpmnPoolsChoicePage.java 2008-11-06
02:27:48 UTC (rev 11549)
+++
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BpmnPoolsChoicePage.java 2008-11-06
03:26:03 UTC (rev 11550)
@@ -39,7 +39,8 @@
/**
* @author Grid Qian
*
- * the wizardpage used by user to choose the bpmn pool from a bpmn diagram
+ * the wizardpage used by user to choose the bpmn pool from a bpmn
+ * diagram
*/
public class BpmnPoolsChoicePage extends WizardPage {
@@ -161,7 +162,11 @@
if (listViewer == null) {
return;
}
- listViewer.setInput(idMap.entrySet());
+ if (idMap != null) {
+ listViewer.setInput(idMap.entrySet());
+ } else {
+ listViewer.setInput(null);
+ }
wizard = this.getWizard();
List<String> poolIdList = ((BpmnToWizard) wizard).getPoolIdList();
if (poolIdList.size() == 0) {
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/GeneratedFileLocationPage.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/GeneratedFileLocationPage.java 2008-11-06
02:27:48 UTC (rev 11549)
+++
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/GeneratedFileLocationPage.java 2008-11-06
03:26:03 UTC (rev 11550)
@@ -122,6 +122,9 @@
// Select the parent project of this first bpmn file chosen
ITreeSelection node = (ITreeSelection) currentSelection;
TreePath[] paths = node.getPaths();
+ if(paths.length == 0) {
+ return;
+ }
TreePath projPath = new TreePath(new Object[] { paths[0]
.getFirstSegment() });
TreeSelection projSel = new TreeSelection(projPath);
Show replies by date