Author: bbrodt
Date: 2011-01-10 13:11:38 -0500 (Mon, 10 Jan 2011)
New Revision: 28052
Modified:
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/TypeSelectorDialog.java
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/FaultCatchNameSection.java
Log:
https://issues.jboss.org/browse/JBIDE-8045
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java
===================================================================
---
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java 2011-01-10
17:52:38 UTC (rev 28051)
+++
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java 2011-01-10
18:11:38 UTC (rev 28052)
@@ -349,6 +349,7 @@
public static String FaultCatchNameDetails_Namespace__21;
public static String FaultCatchNameDetails_User_defined_15;
public static String FaultCatchNameSection_Variable_Name_3;
+ public static String FaultCatchNameSection_Error_Invalid_Type;
public static String FaultHandlerAdapter_Fault_Handlers_1;
public static String FaultThrowNameDetails_Built_in_14;
public static String FaultThrowNameDetails_Fault_Name__16;
Modified:
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/TypeSelectorDialog.java
===================================================================
---
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/TypeSelectorDialog.java 2011-01-10
17:52:38 UTC (rev 28051)
+++
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/TypeSelectorDialog.java 2011-01-10
18:11:38 UTC (rev 28052)
@@ -93,7 +93,7 @@
//
https://jira.jboss.org/browse/JBIDE-7107
// set by caller if a selection from the lower tree (typically message parts or XSD
elements)
// are required before "OK" button can be enabled.
- protected boolean requireLowerTreeSelection = true;
+ protected boolean requireLowerTreeSelection = false;
/**
@@ -316,4 +316,15 @@
return true;
}
+
+ /**
+ *
https://issues.jboss.org/browse/JBIDE-8045
+ * Enable or disable lower tree selection required flag (see
this.requireLowerTreeSelection)
+ *
+ * @param enabled
+ */
+ public void setRequireLowerTreeSelection(boolean enabled)
+ {
+ this.requireLowerTreeSelection = enabled;
+ }
}
Modified:
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties
===================================================================
---
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties 2011-01-10
17:52:38 UTC (rev 28051)
+++
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties 2011-01-10
18:11:38 UTC (rev 28052)
@@ -248,6 +248,7 @@
FaultCatchNameDetails_User_defined_15=&User-defined
FaultCatchNameSection_Variable_Name_3=Variable Name\:
FaultCatchNameSection_None_0=(none)
+FaultCatchNameSection_Error_Invalid_Type=Data caught by a Fault Handler must be a Message
Type or an XSD Element
FaultHandlerAdapter_Fault_Handlers_1=Fault Handlers
FaultThrowNameDetails_Built_in_14=&Built-in
FaultThrowNameDetails_Fault_Name__16=Faul&t Name\:
Modified:
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/FaultCatchNameSection.java
===================================================================
---
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/FaultCatchNameSection.java 2011-01-10
17:52:38 UTC (rev 28051)
+++
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/FaultCatchNameSection.java 2011-01-10
18:11:38 UTC (rev 28052)
@@ -70,6 +70,7 @@
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.commands.Command;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.events.SelectionEvent;
@@ -526,12 +527,17 @@
variable = BPELFactory.eINSTANCE.createVariable();
_catch.setFaultVariable(variable);
}
+ //
https://issues.jboss.org/browse/JBIDE-8045
+ // Data caught by fault handler can be either a Message Type
+ // or an XSD Element.
if (type instanceof Message) {
- variable.setMessageType((Message)type);
- } else {
- variable.setMessageType(null);
+ _catch.setFaultMessageType((Message)type);
+ _catch.setFaultElement(null);
}
- _catch.setFaultMessageType(variable.getMessageType());
+ else if (type instanceof XSDElementDeclaration) {
+ _catch.setFaultMessageType(null);
+ _catch.setFaultElement((XSDElementDeclaration)type);
+ }
}
});
getCommandFramework().execute(wrapInShowContextCommand(command));
@@ -562,9 +568,17 @@
if (!command.isEmpty())
getCommandFramework().execute(wrapInShowContextCommand(command));
}
- public void selectXSDType(XSDTypeDefinition xsdType) { store(xsdType); }
- public void selectXSDElement(XSDElementDeclaration xsdElement) { }
- public void selectMessageType(Message message) { store(message); }
+ //
https://issues.jboss.org/browse/JBIDE-8045
+ public void selectXSDType(XSDTypeDefinition xsdType) {
+ MessageDialog.openError(null, Messages.SelectionAndCreationDialog_Error_2,
+ Messages.FaultCatchNameSection_Error_Invalid_Type);
+ }
+ public void selectXSDElement(XSDElementDeclaration xsdElement) {
+ store(xsdElement);
+ }
+ public void selectMessageType(Message message) {
+ store(message);
+ }
}
protected void createVariableWidgets(Composite parent) {
@@ -714,6 +728,10 @@
if (_catch.getFaultMessageType() != null) {
variableTypeSelector.setVariableType(_catch.getFaultMessageType());
}
+ //
https://issues.jboss.org/browse/JBIDE-8045
+ if (_catch.getFaultElement() != null) {
+ variableTypeSelector.setVariableType(_catch.getFaultElement());
+ }
}
@Override