Use the XPath source viewer configuration instead of the XPath editor
diff --git a/plugins/org.eclipse.bpel.ui/plugin.xml b/plugins/org.eclipse.bpel.ui/plugin.xml
index 5bfb636..d5a3e28 100644
--- a/plugins/org.eclipse.bpel.ui/plugin.xml
+++ b/plugins/org.eclipse.bpel.ui/plugin.xml
@@ -222,12 +222,6 @@
            <input type="org.eclipse.bpel.model.Empty"/>

         </propertySection>

         <propertySection

-               tab="org.eclipse.bpel.ui.tabs.details"

-               class="org.eclipse.bpel.ui.properties.AttributesSection"

-               id="org.eclipse.bpel.ui.sections.Attributes">

-            <input type="org.eclipse.bpel.model.Process"/>

-        </propertySection>

-        <propertySection

                tab="org.eclipse.bpel.ui.tabs.description"

                class="org.eclipse.bpel.ui.properties.NameSection"

                id="org.eclipse.bpel.ui.sections.Name">

diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/IHelpContextIds.java b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/IHelpContextIds.java
index 161bd81..aaa2b5c 100644
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/IHelpContextIds.java
+++ b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/IHelpContextIds.java
@@ -16,7 +16,6 @@
 import org.eclipse.bpel.ui.preferences.WSILPreferencePage;

 import org.eclipse.bpel.ui.properties.ActionImplementationSection;

 import org.eclipse.bpel.ui.properties.AssignImplSection;

-import org.eclipse.bpel.ui.properties.AttributesSection;

 import org.eclipse.bpel.ui.properties.CompensateScopeSection;

 import org.eclipse.bpel.ui.properties.CorrSetImplSection;

 import org.eclipse.bpel.ui.properties.CorrelationSection;

@@ -95,8 +94,6 @@
   public static final String PROPERTY_PAGE_NAMESPACE = PREFIX + "property_namespace"; //$NON-NLS-1$

 	/** Context ID for the {@link RepeatingAlarmConditionSection}. */

 	public static final String PROPERTY_PAGE_REPEAT_ALARM = PREFIX + "property_repeat_alarm"; //$NON-NLS-1$

-	/** Context ID for the {@link AttributesSection}. */

-	public static final String PROPERTY_PAGE_ATTRIBUTES = PREFIX + "property_attributes"; //$NON-NLS-1$

 	/** Context ID for the {@link ValidateSection} and {@link ValidateVariablesSection}. */

 	public static final String PROPERTY_PAGE_VALIDATE_DETAILS = PREFIX + "property_validate"; //$NON-NLS-1$

   /** Context ID for the {@link DocumentationSection}. */

diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java
index e558fc0..7a1d73e 100644
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java
+++ b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java
@@ -15,7 +15,7 @@
 public final class Messages extends NLS {

 

 	private static final String BUNDLE_NAME = "org.eclipse.bpel.ui.messages"; //$NON-NLS-1$

-	

+

 

 	private Messages() {

 		// Do not instantiate

@@ -134,8 +134,6 @@
 	public static String TypeSelectorDialog_7;

 	public static String TypeSelectorDialog_9;

 	public static String Validate;

-	public static String AttributesDetails_Expression_Language__2;

-	public static String AttributesDetails_Query_Language__2;

 	public static String AutoArrangeFlowsAction_Arrange_Flow_Contents_2;

 	public static String AutoArrangeFlowsAction_Auto_arrange_flow_contents_3;

 	public static String ToggleLayoutOrientation_1;

@@ -165,7 +163,7 @@
 	public static String BPELEditor_Compensate_1;

 	public static String BPELEditor_Compensate_2;

 	public static String BPELEditor_CompensateScope_1;

-	public static String BPELEditor_CompensateScope_2;	

+	public static String BPELEditor_CompensateScope_2;

 	public static String BPELEditor_Flow_1;

 	public static String BPELEditor_Flow_2;

 	public static String BPELEditor_Invoke_35;

@@ -210,14 +208,13 @@
 	public static String BPELPasteAction_Paste_2;

 	public static String BPELPasteAction_Paste_3;

 	public static String BPELPreferencePage_HomePage_Description;

-	public static String BPELPreferencePage_ExpressionEditorPage_Description;

 	public static String BPELPreferencePage_0;

 	public static String BPELPreferencePage_0TT;

 	public static String BPELPreferencePage_1;

-	public static String BPELPreferencePage_1TT;	

+	public static String BPELPreferencePage_1TT;

 	public static String BPELPreferencePage_2;

-	public static String BPELPreferencePage_2TT;	

-	public static String BPELPreferencePage_3;	

+	public static String BPELPreferencePage_2TT;

+	public static String BPELPreferencePage_3;

 	public static String BPELPreferencePage_3TT;

 	public static String BPELPreferencePage_4;

 	public static String BPELPreferencePage_4TT;

@@ -237,11 +234,10 @@
 	public static String BPELPreferencePage_WSIL_NameLimit;

 	public static String BPELPreferencePage_WSIL_EnterLocation;

 	public static String BPELPreferencePage_WSIL_EnterDescription;

-	public static String BPELUIRegistry_Expression_language_editors_must_provide_expressionLanguage_and_class__8;

 	public static String BPELUtil__unknown_URI__54;

 	public static String BPELUtil_HiddenSequence_2;

 	public static String BPELUtil_Sequence_1;

-	

+

 	// https://issues.jboss.org/browse/JBIDE-8601

 	public static String BPELUtil__Error;

 	public static String BPELUtil_NoEditorForNullObject;

@@ -251,9 +247,6 @@
 	public static String BPELXYLayoutEditPolicy_Add_Part_1;

 	public static String BPELXYLayoutEditPolicy_Move_Part_2;

 	public static String ElseIfAdapter_ElseIf_1;

-	public static String ElseIfConditionSection_Create_a_New_Condition_2;

-	public static String ElseIfConditionSection_Create_condition_text_2;

-	public static String ElseIfConditionSection_No_condition_specified_1;

 	public static String CatchAdapter_Catch_1;

 	public static String CatchAllAdapter_0;

 	public static String CatchAllDetails_0;

@@ -317,10 +310,7 @@
 	public static String EditMessagePropertyDialog_23;

 	public static String EditMessagePropertyDialog_26;

 	public static String EditMessagePropertyDialog_27;

-	public static String EditMessagePropertyDialog_2;

-	public static String EditMessagePropertyDialog_3;

 	public static String EditMessagePropertyDialog_4;

-	public static String EditMessagePropertyDialog_9;

 

 	// https://jira.jboss.org/browse/JBIDE-7107

 	public static String EditMessagePropertyDialog_11;

@@ -328,14 +318,11 @@
 	public static String EditMessagePropertyDialog_13;

 	public static String EditMessagePropertyDialog_15;

 	public static String EditMessagePropertyDialog_16;

-	

+

 	public static String EditMessagePropertyDialog_Type_1;

 	public static String EditMessagePropertyDialog_Element_1;

 	public static String EditMessagePropertyDialog_Message_1;

 	public static String EditPropertyAliasDialog_10;

-	public static String EditPropertyAliasDialog_3;

-	public static String EditPropertyAliasDialog_4;

-	public static String EditPropertyAliasDialog_8;

 	public static String EditPropertyAliasDialog_9;

 	public static String EndNodeAdapter_End_1;

 	public static String EndpointReferenceAssignCategory_Endpoint_Reference;

@@ -344,9 +331,6 @@
 	public static String ExitOnStandardFault_Yes_2;

 	public static String ExitOnStandardFault_No_3;

 	public static String ExpressionAssignCategory_Expression_1;

-	public static String ExpressionSection_Expression_language_1;

-	public static String ExpressionSection_No_Expression_2;

-	public static String ExpressionSection_Same_as_Process_1;

 	public static String FaultAdapter_Fault_1;

 	public static String FaultCatchNameDetails_Built_in_14;

 	public static String FaultCatchNameDetails_Fault_Name__16;

@@ -367,7 +351,6 @@
 	public static String FaultThrowNameSection_Browse_1;

 	public static String FaultThrowNameSection_None_3;

 	public static String FaultThrowNameSection_Select_Fault_Variable_2;

-	public static String FileAndComboSelectionDialog_Browse_1;

 	public static String FlowXYLayoutEditPolicy_Create_1;

 	public static String IBPELUIConstants_Activity_Change_36;

 	public static String IBPELUIConstants_Add_Compensation_Handler_11;

@@ -381,7 +364,7 @@
 	public static String IBPELUIConstants_Add_Custom_Setting_13;

 	public static String IBPELUIConstants_Add_Event_Handler_11;

 	public static String IBPELUIConstants_Add_Fault_Handler_11;

-	public static String IBPELUIConstants_Add_Import;	

+	public static String IBPELUIConstants_Add_Import;

 	public static String IBPELUIConstants_Add_Link_5;

 	public static String IBPELUIConstants_Add_Partner_7;

 	public static String IBPELUIConstants_Add_Property_9;

@@ -464,9 +447,6 @@
 	public static String InvokeImplDetails_MessageTypeOrElement;

 

 	public static String InvokeImplSection_None_1;

-	public static String JoinConditionSection_Create_a_New_Condition_3;

-	public static String JoinConditionSection_No_condition_specified_1;

-	public static String JoinConditionSection_Optional_condition_text_2;

 	public static String JoinFailureDetails_No_3;

 	public static String JoinFailureDetails_Suppress_Join_Failure__1;

 	public static String JoinFailureDetails_Use_Same_Value_as_Parent__No__6;

@@ -489,12 +469,12 @@
 	public static String MessageExchangeImplSection_Create_Global;

 	public static String MessageExchangeImplSection_Create_Local;

 	public static String MessageExchangeImplSection_Clear;

-	

-	public static String MessageExchange_Create_Dialog_Title; 

-	public static String MessageExchange_Create_Dialog_NameField_Label; 

-	

-	

-	

+

+	public static String MessageExchange_Create_Dialog_Title;

+	public static String MessageExchange_Create_Dialog_NameField_Label;

+

+

+

 	public static String ModelLabelProvider____None____1;

 	public static String ModelTreeLabelProvider_s1_s2;

 	public static String NameDetails_BPEL_Name__3;

@@ -551,10 +531,6 @@
 	public static String RenameAction_Rename_0;

 	public static String RenameAction_Rename_1;

 	public static String ReorderInContainerCommand_Reorder_1;

-	public static String RepeatingAlarmConditionSection_Choose_type_text_2;

-	public static String RepeatingAlarmConditionSection_Create_a_New_Repeat_Condition_3;

-	public static String RepeatingAlarmConditionSection_No_condition_specified_1;

-	public static String RepeatingAlarmConditionSection_Not_supported_in_Pick_text_3;

 	public static String ReplaceInContainerCommand_Replace_1;

 	public static String ReplyAction_Reply_HTML_Description_1;

 	public static String RevertAction_0;

@@ -586,9 +562,6 @@
 	public static String ToggleShowEventHandler_Shows_event_handler_activities_3;

 	public static String ToggleShowFaultHandler_Show_Fault_Handler_2;

 	public static String ToggleShowFaultHandler_Shows_fault_handler_activities_3;

-	public static String TransitionConditionSection_Create_a_New_Condition_3;

-	public static String TransitionConditionSection_No_condition_specified_1;

-	public static String TransitionConditionSection_Optional_condition_text_2;

 	public static String VariableAdapter_0;

 	public static String VariableImplDetails_Isolated__6;

 	public static String VariablePartAssignCategory_Query__8;

@@ -621,35 +594,15 @@
 	public static String VariablesEditPart_Add_Variable_1;

 	public static String VariablesEditPart_Remove_Variable_1;

 	public static String VariablesEditPart_Variables_1;

-	public static String WaitConditionSection_Create_a_New_Condition_2;

-	public static String WaitConditionSection_Create_condition_text_2;

 	public static String WaitConditionSection_Date_1;

 	public static String WaitConditionSection_Duration_2;

-	public static String WaitConditionSection_No_condition_specified_1;

-	public static String WhileConditionSection_Create_a_New_Condition_3;

-	public static String WhileConditionSection_Mandatory_condition_text_2;

-	public static String WhileConditionSection_No_condition_specified_1;

-	

+

 	public static String ForEachSection_IS_PARALLEL;

 	public static String ForEachSection_COUNTER_NAME;

-	public static String ForEachCompletionConditionSection_No_condition_specified_1;

-	public static String ForEachCompletionConditionSection_Optional_condition_text_2;

-	public static String ForEachCompletionConditionSection_Create_a_New_Condition_3;

 	public static String ForEachSuccessfulBranchesOnlySection_1;

-	public static String ForEachStartCounterValuesSection_No_Expression_specified_1;

 	public static String ForEachStartCounterValuesSection_TITLE_3;

 	public static String ForEachFinalCounterValuesSection_TITLE_3;

-	public static String ForEachFinalCounterValuesSection_No_Expression_specified_1;

-	public static String ForEachCounterValuesSection_Mandatory_Expression_2;

-	public static String ForEachCounterValuesSection_Create_a_New_Expression_3;

-	

-	public static String WorkbenchFileSelectionDialog_Browse_2;

-	public static String WsdlFileSelectionDialog_Select_a_WSDL_File_1;

-	public static String XPathExpressionEditor_Date_Time_UTC_3;

-	public static String XPathExpressionEditor_Duration_4;

-	public static String XPathExpressionEditor_Expression_Type_2;

-	public static String XPathExpressionEditor_Literal_1;

-	public static String XPathExpressionEditor_Text_0;

+

 	public static String XSDAttributeDeclarationAdapter_XSD_Attribute_1;

 	public static String XSDComplexTypeDefinitionAdapter_0;

 	public static String XSDElementDeclarationAdapter_XSD_Element_1;

@@ -686,7 +639,7 @@
 

     public static String OutlinePage_showOverviewView;

     public static String OutlinePage_showOutlineView;

-    

+

 	public static String DeletePartnerLinkTypeWarningMessage;

 	public static String DeletePartnerLinkTypeWarningDialogTitle;

 

@@ -700,12 +653,12 @@
 	public static String Editor_load_error_title;

 	public static String Editor_load_error;

 	public static String Editor_design_page_error;

-	

+

 	public static String Make_Process_Abstract_Title;

 	public static String Make_Process_Abstract_Message;

-	

+

 	static {

-		

+

 		NLS.initializeMessages(BUNDLE_NAME, Messages.class);

 	}

 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/AnnotationHelper.java b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/AnnotationHelper.java
index 6e536ce..e095aae 100644
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/AnnotationHelper.java
+++ b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/AnnotationHelper.java
@@ -17,14 +17,12 @@
 import org.eclipse.bpel.model.Variable;

 import org.eclipse.bpel.model.partnerlinktype.PartnerLinkType;

 import org.eclipse.bpel.model.partnerlinktype.Role;

-import org.eclipse.bpel.ui.extensions.BPELUIRegistry;

-import org.eclipse.bpel.ui.extensions.ExpressionEditorDescriptor;

 import org.eclipse.wst.wsdl.Message;

 import org.eclipse.wst.wsdl.Operation;

 import org.eclipse.xsd.XSDTypeDefinition;

 

 public class AnnotationHelper {

-	

+

 	private AnnotationHelper() {

 	}

 

@@ -52,7 +50,7 @@
 		}

 		return var.getName();

 	}

-	

+

 	public static String getAnnotation(PartnerLink pLink) {

 		if (pLink == null || pLink.getName() == null) {

 			return null;

@@ -63,7 +61,7 @@
 		}

 		return pLink.getName();

 	}

-	

+

 	public static String getAnnotation(Role role) {

 		if (role == null) {

 			return Messages.NONE;

@@ -77,25 +75,12 @@
 		}

 		return operation.getName();

 	}

-	

+

 	public static String getAnnotation(Expression expression) {

 		if (expression == null) {

 			return null;

 		}

-		return (expression.getBody() instanceof String) ? 

+		return (expression.getBody() instanceof String) ?

 				(String)expression.getBody() : null;

 	}

-

-	public static String getExpressionLanguage(Expression expression) {

-		if (expression == null) {

-			return null;

-		}

-		String language = expression.getExpressionLanguage();

-		ExpressionEditorDescriptor descriptor = 

-			BPELUIRegistry.getInstance().getExpressionEditorDescriptor(language);

-		if (descriptor != null) {

-			language = descriptor.getLabel();

-		}

-		return language;

-	}

 }

diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/ElseIfAdapter.java b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/ElseIfAdapter.java
index d443c38..15168da 100644
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/ElseIfAdapter.java
+++ b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/ElseIfAdapter.java
@@ -32,7 +32,7 @@
 {

 

 	/* IContainer delegate */

-	

+

 	@Override

 	public IContainer createContainerDelegate() {

 		// TODO: IfAdapter ensures the ElseIf always has an activity inside it,

@@ -43,34 +43,34 @@
 	}

 

 	/* ILabeledElement */

-	

+

 	public Image getSmallImage(Object object) {

 		return BPELUIPlugin.INSTANCE.getImage(IBPELUIConstants.ICON_CASE_16);

 	}

-	

+

 	public Image getLargeImage(Object object) {

 		return BPELUIPlugin.INSTANCE.getImage(IBPELUIConstants.ICON_CASE_32);

-	}	

-	

+	}

+

 	public String getTypeLabel(Object object) {

-		String s = Messages.ElseIfAdapter_ElseIf_1; 

-		return s; 

-	}	

-	

+		String s = Messages.ElseIfAdapter_ElseIf_1;

+		return s;

+	}

+

 	public String getLabel(Object object) {

 		String s = ModelHelper.getDisplayName(object);

 		if (s != null && !("".equals(s))) return s; //$NON-NLS-1$

 		return getTypeLabel(object);

 	}

-	

+

 	/* EditPartFactory */

-	

+

 	public EditPart createEditPart(EditPart context, Object model) {

 		EditPart result = new ElseIfEditPart();

 		result.setModel(model);

 		return result;

 	}

-	

+

 	/* IOutlineEditPartFactory */

 

 	public EditPart createOutlineEditPart(EditPart context, Object model) {

@@ -80,18 +80,17 @@
 	}

 

 	/* IExtensionFactory */

-	

+

 	public EObject createExtension(EObject object) {

 		return UiextensionmodelFactory.eINSTANCE.createCaseExtension();

 	}

 

 	/* IAnnotatedElement */

-	

+

 	public String[] getAnnotation(Object object) {

 		Expression expression = ((ElseIf)object).getCondition();

 		return new String[] {

-				org.eclipse.bpel.ui.adapters.Messages.CONDITION, AnnotationHelper.getAnnotation(expression),

-				org.eclipse.bpel.ui.adapters.Messages.LANGUAGE, AnnotationHelper.getExpressionLanguage(expression)

+				org.eclipse.bpel.ui.adapters.Messages.CONDITION, AnnotationHelper.getAnnotation(expression)

 			};

 	}

 }

diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/IfAdapter.java b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/IfAdapter.java
index 058d3a7..91cb7cb 100644
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/IfAdapter.java
+++ b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/IfAdapter.java
@@ -28,7 +28,7 @@
 public class IfAdapter extends ContainerActivityAdapter implements IAnnotatedElement {

 

 	/* IContainer delegate */

-		

+

 	@Override

 	public IContainer createContainerDelegate() {

 		MultiContainer omc = new MultiContainer();

@@ -39,7 +39,7 @@
 	}

 

 	/* EditPartFactory */

-	

+

 	@Override

 	public EditPart createEditPart(EditPart context, Object model) {

 		EditPart result = new IfEditPart();

@@ -48,37 +48,35 @@
 	}

 

 	/* IOutlineEditPartFactory */

-	

+

 	@Override

 	public EditPart createOutlineEditPart(EditPart context, Object model) {

 		EditPart result = new OutlineTreeEditPart();

 		result.setModel(model);

-		return result;	

+		return result;

 	}

-	

+

 	/* IEditPartActionContributor */

-	

+

 	@Override

 	public List getEditPartActions(final EditPart editPart) {

 		List actions = super.getEditPartActions(editPart);

 		Object modelObject = editPart.getModel();

-		

+

 		actions.add(new CreateElseIfAction(editPart));

-		  

+

 		if (((If)modelObject).getElse() == null) {

 			actions.add(new CreateElseAction(editPart));

 		}

 		return actions;

 	}

-	

+

 	/* IAnnotatedElement */

-	

+

 	public String[] getAnnotation(Object object) {

 		Expression expression = ((If)object).getCondition();

 		return new String[] {

-			Messages.CONDITION, AnnotationHelper.getAnnotation(expression),

-			Messages.LANGUAGE, AnnotationHelper.getExpressionLanguage(expression)

-			};

+			Messages.CONDITION, AnnotationHelper.getAnnotation(expression)

+		};

 	}

 }

-	
\ No newline at end of file
diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/Messages.java b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/Messages.java
index 784722d..deb527e 100644
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/Messages.java
+++ b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/Messages.java
@@ -23,13 +23,12 @@
 	public static String INPUT;

 	public static String OUTPUT;

 	public static String CONDITION;

-	public static String LANGUAGE;

 	public static String MY_ROLE;

 	public static String PARTNER_ROLE;

 	public static String NONE;

 	public static String OPERATION;

 

-	

+

 	static {

 		// initialize resource bundle

 		NLS.initializeMessages(BUNDLE_NAME, Messages.class);

diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/RepeatUntilAdapter.java b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/RepeatUntilAdapter.java
index 7ce8cf0..8a702ff 100644
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/RepeatUntilAdapter.java
+++ b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/RepeatUntilAdapter.java
@@ -28,16 +28,16 @@
 	}

 

 	/* EditPartFactory */

-	

+

 	@Override

-	public EditPart createEditPart(EditPart context, Object model) {	

+	public EditPart createEditPart(EditPart context, Object model) {

 		EditPart result = new SequenceEditPart();

 		result.setModel(model);

 		return result;

 	}

 

 	/* IOutlineEditPartFactory */

-	

+

 	@Override

 	public EditPart createOutlineEditPart(EditPart context, Object model) {

 		EditPart result = new OutlineTreeEditPart();

@@ -46,12 +46,11 @@
 	}

 

 	/* IAnnotatedElement */

-	

+

 	public String[] getAnnotation(Object object) {

 		Expression expression = ((RepeatUntil)object).getCondition();

 		return new String[] {

-			Messages.CONDITION, AnnotationHelper.getAnnotation(expression),

-			Messages.LANGUAGE, AnnotationHelper.getExpressionLanguage(expression)

-			};

+			Messages.CONDITION, AnnotationHelper.getAnnotation(expression)

+		};

 	}

 }

diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/WhileAdapter.java b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/WhileAdapter.java
index 260375a..48ba9c9 100644
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/WhileAdapter.java
+++ b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/WhileAdapter.java
@@ -25,7 +25,7 @@
 	 * @see org.eclipse.bpel.ui.adapters.ContainerActivityAdapter#createContainerDelegate()

 	 */

 	/* IContainer delegate */

-	

+

 	@Override

 	public IContainer createContainerDelegate() {

 		return new ActivityContainer(BPELPackage.eINSTANCE.getWhile_Activity());

@@ -33,14 +33,14 @@
 

 	/**

 	 * @see org.eclipse.bpel.ui.adapters.ActivityAdapter#createEditPart(org.eclipse.gef.EditPart, java.lang.Object)

-	 */	

+	 */

 	@Override

 	public EditPart createEditPart(EditPart context, Object model) {

 		EditPart result = new SequenceEditPart();

 		result.setModel(model);

 		return result;

-	}	

-	

+	}

+

 	/**

 	 * @see org.eclipse.bpel.ui.adapters.ActivityAdapter#createOutlineEditPart(org.eclipse.gef.EditPart, java.lang.Object)

 	 */

@@ -52,12 +52,11 @@
 	}

 

 	/* IAnnotatedElement */

-	

+

 	public String[] getAnnotation(Object object) {

 		Expression expression = ((While)object).getCondition();

 		return new String[] {

-			Messages.CONDITION, AnnotationHelper.getAnnotation(expression),

-			Messages.LANGUAGE, AnnotationHelper.getExpressionLanguage(expression)

-			};

+			Messages.CONDITION, AnnotationHelper.getAnnotation(expression)

+		};

 	}

 }

diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/messages.properties b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/messages.properties
index 7875655..801af96 100644
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/messages.properties
+++ b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/messages.properties
@@ -24,7 +24,6 @@
 ForEachAdapter_1=Final counter value

 ForEachAdapter_2=Counter variable name

 CONDITION=Condition

-LANGUAGE=Language

 PARTNER_LINK=Partner Link

 OPERATION=Operation

 INPUT=Input

diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/EditPropertyAliasDialog.java b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/EditPropertyAliasDialog.java
index b7eaa4a..b0a97ae 100644
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/EditPropertyAliasDialog.java
+++ b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/EditPropertyAliasDialog.java
@@ -107,7 +107,7 @@
 		}

 

 		public String getQuery() {

-			return this.fEditor.getContents();

+			return this.expressionText.getText().trim();

 		}

 

 		@Override

diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/editors/xpath/XPathTextEditor.java b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/editors/xpath/XPathTextEditor.java
index 2301bc3..cad2e8e 100644
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/editors/xpath/XPathTextEditor.java
+++ b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/editors/xpath/XPathTextEditor.java
@@ -271,9 +271,8 @@
 		}

 	}

 

-	/*** Private Classes */

-

-	class BracketInserter implements VerifyKeyListener  {

+	// VZ: make this class public and static

+	public class BracketInserter implements VerifyKeyListener  {

 

 		private boolean fCloseBrackets = true;

 		private boolean fCloseStrings  = true;

diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties
index ea4672f..7717e4d 100644
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties
+++ b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties
@@ -25,8 +25,6 @@
 AssignImplDetails_KeepSrcElementName=&Keep Source Element Name

 AssignImplDetails_IgnoreMissingSourceData=&Ignore Missing Source Data

 Validate=&Validate

-AttributesDetails_Expression_Language__2=E&xpression language\:

-AttributesDetails_Query_Language__2=&Query language\:

 AutoArrangeFlowsAction_Arrange_Flow_Contents_2=Arrange Flow Contents

 AutoArrangeFlowsAction_Auto_arrange_flow_contents_3=Auto-arrange Flow Contents

 ToggleLayoutOrientation_1=Switch to horizontal layout

@@ -101,7 +99,6 @@
 BPELPasteAction_Paste_2=Paste from Transfer Buffer

 BPELPasteAction_Paste_3=Paste

 BPELPreferencePage_HomePage_Description=Expand the tree to edit preferences for the BPEL feature.

-BPELPreferencePage_ExpressionEditorPage_Description=Expand the tree to edit preferences for the Expression Editor.

 BPELPreferencePage_0=Use animation when laying out activities

 BPELPreferencePage_0TT=When Flows automatically lay out their child activities, animation will be used to bring about a smooth transition.

 BPELPreferencePage_1=Manual place activities in the Flow node

@@ -134,7 +131,6 @@
 You can add or remove WSIL links to/from the above document.\n\

 The result will be shown in the WSIL browser of the editor.

 #

-BPELUIRegistry_Expression_language_editors_must_provide_expressionLanguage_and_class__8=Expression language editors must provide expressionLanguage and class.

 BPELUtil__Error=Error

 BPELUtil__unknown_URI__54=<unknown URI>

 BPELUtil_HiddenSequence_2=HiddenSequence

@@ -147,9 +143,6 @@
 BPELXYLayoutEditPolicy_Add_Part_1=Add Part

 BPELXYLayoutEditPolicy_Move_Part_2=Move Part

 ElseIfAdapter_ElseIf_1=Else If

-ElseIfConditionSection_Create_a_New_Condition_2=Create a New Condition

-ElseIfConditionSection_Create_condition_text_2=To create a valid BPEL process you should specify a condition.\nChoose the type of condition from the Combo Box above, or click\nthe button below to create a new expression of the default type\nfor your Process.

-ElseIfConditionSection_No_condition_specified_1=This ElseIf currently does not have a condition specified.

 CatchAdapter_Catch_1=Catch

 CatchAllAdapter_0=Catch All

 CatchAllDetails_0=The Catch All will be executed if the Fault is not caught by an existing Catch.

@@ -206,7 +199,6 @@
 DurationSelector_Months_1=Mont&hs

 DurationSelector_Seconds_5=Se&conds

 DurationSelector_Years_1=Ye&ars

-EditMessagePropertyDialog_9=Create Property

 EditMessagePropertyDialog_10=Defined As

 EditMessagePropertyDialog_14=Na&me\:

 EditMessagePropertyDialog_18=Bro&wse...

@@ -217,8 +209,6 @@
 EditMessagePropertyDialog_23=&Remove

 EditMessagePropertyDialog_26=Create Message Property

 EditMessagePropertyDialog_27=Edit Message Property

-EditMessagePropertyDialog_2=Part

-EditMessagePropertyDialog_3=<none>

 EditMessagePropertyDialog_4=\: {0}

 

 # https://bugs.eclipse.org/bugs/show_bug.cgi?id=330813

@@ -233,9 +223,6 @@
 EditMessagePropertyDialog_Element_1=Element\:

 EditMessagePropertyDialog_Message_1=Message\:

 EditPropertyAliasDialog_10=Edit Property Alias

-EditPropertyAliasDialog_3=Create Property Alias

-EditPropertyAliasDialog_4=Edit Property Alias

-EditPropertyAliasDialog_8=&Part\:

 EditPropertyAliasDialog_9=Create Property Alias

 EndNodeAdapter_End_1=End

 EndpointReferenceAssignCategory_Endpoint_Reference=Endpoint Reference

@@ -244,9 +231,6 @@
 ExitOnStandardFault_Yes_2 = &Yes

 ExitOnStandardFault_No_3 = &No

 ExpressionAssignCategory_Expression_1=Expression

-ExpressionSection_Expression_language_1=E&xpression language\:

-ExpressionSection_No_Expression_2=No Expression

-ExpressionSection_Same_as_Process_1=Same as Process ({0})

 FaultAdapter_Fault_1=Fault

 FaultCatchNameDetails_Built_in_14=&Built-in

 FaultCatchNameDetails_Fault_Name__16=Faul&t Name\:

@@ -268,7 +252,6 @@
 FaultThrowNameSection_Browse_1=Br&owse...

 FaultThrowNameSection_None_3=(none)

 FaultThrowNameSection_Select_Fault_Variable_2=Select Fault Variable

-FileAndComboSelectionDialog_Browse_1=Browse

 FlowXYLayoutEditPolicy_Create_1=Create

 IBPELUIConstants_Activity_Change_36=Activity Change

 IBPELUIConstants_Add_Compensation_Handler_11=Add Compensation Handler

@@ -378,9 +361,6 @@
 InvokeImplSection_23=&Variable:

 InvokeImplSection_24=Edit WSDL.

 InvokeImplSection_25=Clear Fault Name

-JoinConditionSection_Create_a_New_Condition_3=&Create a New Condition

-JoinConditionSection_No_condition_specified_1=This activity currently does not have a join condition specified.

-JoinConditionSection_Optional_condition_text_2=Join conditions are optional.  If you don't specify this\njoin condition, it will evaluate to the logical OR of the\ntransition conditions of all incoming Links.

 JoinFailureDetails_No_3=&No

 JoinFailureDetails_Suppress_Join_Failure__1=Suppress Join Failure\:

 JoinFailureDetails_Use_Same_Value_as_Parent__No__6=Use Same Value as P&arent (No)

@@ -491,10 +471,6 @@
 RenameAction_Rename_0=Rename

 RenameAction_Rename_1=Rename

 ReorderInContainerCommand_Reorder_1=Reorder

-RepeatingAlarmConditionSection_Choose_type_text_2=Choose the type of Repeat condition from the Combo Box above, or click\nthe button below to create a new expression of the default type\nfor your Process.

-RepeatingAlarmConditionSection_Create_a_New_Repeat_Condition_3=&Create a New Repeat Condition

-RepeatingAlarmConditionSection_No_condition_specified_1=This OnAlarm currently does not have a Repeat condition specified.

-RepeatingAlarmConditionSection_Not_supported_in_Pick_text_3=Repeat conditions are only supported for an OnAlarm in an Event Handler.

 ReplaceInContainerCommand_Replace_1=Replace

 ReplyAction_Reply_HTML_Description_1=<H3>Reply</H3><DIV><P>Use this activity to return a message to the partner that initiated the operation. This activity is used primarily in a synchronous (request/response) operation, and specifies the same partner implementation as the receive activity that invoked the process in the first place. A reply is always sent to the same partner from which a message was previously received.</P></DIV>

 RevertAction_0=Revert

@@ -526,9 +502,6 @@
 ToggleShowEventHandler_Shows_event_handler_activities_3=Shows event handler activities

 ToggleShowFaultHandler_Show_Fault_Handler_2=Show Fault Handler

 ToggleShowFaultHandler_Shows_fault_handler_activities_3=Shows fault handler activities

-TransitionConditionSection_Create_a_New_Condition_3=&Create a New Condition

-TransitionConditionSection_No_condition_specified_1=This Link currently does not have a transition condition specified.

-TransitionConditionSection_Optional_condition_text_2=Transition conditions are optional.  A Link with no transition\ncondition specified will always evaluate to 'True'.

 VariableImplDetails_Isolated__6=I&solated

 VariablePartAssignCategory_Query__8=&Query\:

 VariablePartAssignCategory_Variable_or_Part_1=Variable

@@ -561,35 +534,15 @@
 VariablesEditPart_Add_Variable_1=Add Variable

 VariablesEditPart_Remove_Variable_1=Remove Variable

 VariablesEditPart_Variables_1=Variables

-WaitConditionSection_Create_a_New_Condition_2=&Create a New Condition

-WaitConditionSection_Create_condition_text_2=To create a valid BPEL process you should specify a condition.\nChoose the type of condition from the Combo Box above, or click\nthe button below to create a new expression of the default type\nfor your Process.

 WaitConditionSection_Date_1=&Date

 WaitConditionSection_Duration_2=D&uration

-WaitConditionSection_No_condition_specified_1=This object currently does not have a duration or deadline specified.

-WhileConditionSection_Create_a_New_Condition_3=&Create a New Condition

-WhileConditionSection_Mandatory_condition_text_2=To create a valid BPEL process you should specify a condition.\nChoose the type of condition from the Combo Box above, or click\nthe button below to create a new expression of the default type\nfor your Process.

-WhileConditionSection_No_condition_specified_1=This While currently does not have a condition specified.

 

 ForEachSection_COUNTER_NAME=Counter &variable name\:

 ForEachSection_IS_PARALLEL=&Parallel execution

-ForEachCompletionConditionSection_No_condition_specified_1=This ForEach currently does not have a completion condition specified.

-ForEachCompletionConditionSection_Optional_condition_text_2=You may specify a completion condition to prevent some of the\nchildren from executing (in the serial case), or to force early\ntermination of some of the children (in the parallel case).\nChoose the type of condition from the Combo Box above, or click\nthe button below to create a new expression of the default type\nfor your Process.

-ForEachCompletionConditionSection_Create_a_New_Condition_3=&Create a New Condition

 ForEachSuccessfulBranchesOnlySection_1=Count &successful branches only

-ForEachStartCounterValuesSection_No_Expression_specified_1=This ForEach currently does not have a start counter value specified.

-ForEachFinalCounterValuesSection_No_Expression_specified_1=This ForEach currently does not have a final counter value specified.

 ForEachStartCounterValuesSection_TITLE_3=Start Counter Value

 ForEachFinalCounterValuesSection_TITLE_3=Final Counter Value

-ForEachCounterValuesSection_Mandatory_Expression_2=To create a valid BPEL process you should specify an expression.\nChoose the type of expression from the Combo Box above, or click\nthe button below to create a new expression of the default type\nfor your Process.

-ForEachCounterValuesSection_Create_a_New_Expression_3=Create a New Expression

 

-WorkbenchFileSelectionDialog_Browse_2=Browse

-WsdlFileSelectionDialog_Select_a_WSDL_File_1=Select a WSDL File

-XPathExpressionEditor_Date_Time_UTC_3=Date/Time (UTC)\:

-XPathExpressionEditor_Duration_4=Duration\:

-XPathExpressionEditor_Expression_Type_2=Expression &Type\:

-XPathExpressionEditor_Literal_1=Literal

-XPathExpressionEditor_Text_0=Text

 XSDAttributeDeclarationAdapter_XSD_Attribute_1=XSD Attribute

 XSDElementDeclarationAdapter_XSD_Element_1=XSD Element

 XSDTypeDefinitionAdapter_XSD_Type_1=XSD Type

diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/AttributesSection.java b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/AttributesSection.java
deleted file mode 100644
index 6f59799..0000000
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/AttributesSection.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2005, 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials

- * are made available under the terms of the Eclipse Public License v1.0

- * which accompanies this distribution, and is available at

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.bpel.ui.properties;

-

-import org.eclipse.bpel.common.ui.details.DelegateIValue;

-import org.eclipse.bpel.common.ui.details.FocusContext;

-import org.eclipse.bpel.common.ui.details.IDetailsAreaConstants;

-import org.eclipse.bpel.common.ui.details.IValue;

-import org.eclipse.bpel.common.ui.details.ViewerIValue;

-import org.eclipse.bpel.common.ui.details.viewers.ComboViewer;

-import org.eclipse.bpel.common.ui.flatui.FlatFormAttachment;

-import org.eclipse.bpel.common.ui.flatui.FlatFormData;

-import org.eclipse.bpel.model.BPELPackage;

-import org.eclipse.bpel.ui.IHelpContextIds;

-import org.eclipse.bpel.ui.Messages;

-import org.eclipse.bpel.ui.details.providers.ExpressionEditorDescriptorContentProvider;

-import org.eclipse.bpel.ui.details.providers.ExpressionEditorDescriptorLabelProvider;

-import org.eclipse.bpel.ui.details.providers.ModelViewerSorter;

-import org.eclipse.bpel.ui.extensions.BPELUIRegistry;

-import org.eclipse.bpel.ui.extensions.ExpressionEditorDescriptor;

-import org.eclipse.bpel.ui.util.BPELUtil;

-import org.eclipse.emf.ecore.EObject;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.widgets.Combo;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Label;

-import org.eclipse.ui.PlatformUI;

-

-

-/**

- * Details section for attributes of a Process

- */

-public class AttributesSection extends BPELPropertySection {

-

-	protected Combo fExpressionLanguageCombo;

-	protected Combo fQueryLanguageCombo;

-

-	protected ComboViewer fExpressionLanguageViewer;

-	protected ComboViewer fQueryLanguageViewer;

-

-	protected EditController fExpressionLanguageController;

-	protected EditController fQueryLanguageController;

-

-	protected IValue fContext;

-

-

-	@Override

-	protected void basicSetInput(EObject input) {

-		saveUserContextToInput() ;

-		super.basicSetInput(input);

-		restoreUserContextFromInput() ;

-

-		/** We assume it is Process */

-		this.fQueryLanguageController.setInput(input);

-		this.fExpressionLanguageController.setInput(input);

-	}

-

-	class ExpressionEditorDescriptorIValue extends DelegateIValue {

-		ExpressionEditorDescriptorIValue ( IValue arg ) {

-			super (arg);

-		}

-		/**

-		 * @see org.eclipse.bpel.common.ui.details.DelegateIValue#get()

-		 */

-		@Override

-		public Object get() {

-			String result = (String) this.fDelegate.get();

-			return result != null ? BPELUIRegistry.getInstance().getExpressionEditorDescriptor( result ) : null;

-			// returns an ExpressionEditorDescriptor

-		}

-

-		/**

-		 * @see org.eclipse.bpel.common.ui.details.DelegateIValue#set(java.lang.Object)

-		 */

-		@Override

-		public void set (Object object) {

-			ExpressionEditorDescriptor eed = (ExpressionEditorDescriptor) object;

-			this.fDelegate.set( eed != null ? eed.getExpressionLanguage() : null );

-		}

-	}

-	protected void createChangeTrackers() {

-		this.fExpressionLanguageController = createEditController();

-		this.fExpressionLanguageController.setFeature(BPELPackage.eINSTANCE.getProcess_ExpressionLanguage());

-		this.fExpressionLanguageController.setViewIValue(new ViewerIValue ( this.fExpressionLanguageViewer ) );

-		this.fExpressionLanguageController.setModeIValue(new ExpressionEditorDescriptorIValue (

-				this.fExpressionLanguageController.getModelIValue() ));

-

-		this.fExpressionLanguageController.startListeningTo(this.fExpressionLanguageCombo) ;

-

-		this.fQueryLanguageController = createEditController();

-		this.fQueryLanguageController.setFeature(BPELPackage.eINSTANCE.getProcess_QueryLanguage() );

-		this.fQueryLanguageController.setViewIValue(new ViewerIValue ( this.fQueryLanguageViewer ));

-		this.fQueryLanguageController.setModeIValue(new ExpressionEditorDescriptorIValue (

-				this.fQueryLanguageController.getModelIValue() ));

-		this.fQueryLanguageController.startListeningTo(this.fQueryLanguageCombo) ;

-	}

-

-	@SuppressWarnings("nls")

-	protected void createAttributesWidgets(Composite composite) {

-		FlatFormData data;

-

-		Label expressionLanguageLabel = this.fWidgetFactory.createLabel(composite, Messages.AttributesDetails_Expression_Language__2);

-		this.fExpressionLanguageCombo = new Combo(composite,SWT.FLAT | SWT.READ_ONLY );

-		this.fWidgetFactory.adapt(this.fExpressionLanguageCombo);

-		this.fExpressionLanguageCombo.setData(FocusContext.NAME,"expressionLanguage");

-

-		// Expression language combo layout

-		this.fExpressionLanguageViewer = new ComboViewer(this.fExpressionLanguageCombo);

-		data = new FlatFormData();

-		data.left = new FlatFormAttachment(0, BPELUtil.calculateLabelWidth(expressionLanguageLabel, STANDARD_LABEL_WIDTH_LRG));

-		data.right = new FlatFormAttachment(100, (-2) * IDetailsAreaConstants.HSPACE );

-		data.top = new FlatFormAttachment(0, IDetailsAreaConstants.VSPACE);

-		this.fExpressionLanguageCombo.setLayoutData(data);

-

-		this.fExpressionLanguageViewer.setContentProvider(new ExpressionEditorDescriptorContentProvider());

-		this.fExpressionLanguageViewer.setLabelProvider(new ExpressionEditorDescriptorLabelProvider());

-		this.fExpressionLanguageViewer.setSorter(ModelViewerSorter.getInstance());

-

-		// Expression language label layout

-		data = new FlatFormData();

-		data.left = new FlatFormAttachment(0, 0);

-		data.right = new FlatFormAttachment(this.fExpressionLanguageCombo, -IDetailsAreaConstants.HSPACE);

-		data.top = new FlatFormAttachment(this.fExpressionLanguageCombo, 0, SWT.CENTER);

-		expressionLanguageLabel.setLayoutData(data);

-

-		this.fExpressionLanguageViewer.setInput(new Object());

-

-		Label queryLanguageLabel = this.fWidgetFactory.createLabel(composite, Messages.AttributesDetails_Query_Language__2);

-		this.fQueryLanguageCombo = new Combo(composite,SWT.FLAT | SWT.READ_ONLY );

-		this.fWidgetFactory.adapt( this.fQueryLanguageCombo );

-		this.fQueryLanguageCombo.setData(FocusContext.NAME,"queryLanguage");

-

-		// Query language combo layout

-		this.fQueryLanguageViewer = new ComboViewer(this.fQueryLanguageCombo);

-		data = new FlatFormData();

-		data.left = new FlatFormAttachment(0, BPELUtil.calculateLabelWidth(queryLanguageLabel, STANDARD_LABEL_WIDTH_LRG));

-		data.right = new FlatFormAttachment(100, (-2) * IDetailsAreaConstants.HSPACE );

-		data.top = new FlatFormAttachment(this.fExpressionLanguageCombo, IDetailsAreaConstants.VSPACE);

-		this.fQueryLanguageCombo.setLayoutData(data);

-

-		this.fQueryLanguageViewer.setLabelProvider(new ExpressionEditorDescriptorLabelProvider());

-		this.fQueryLanguageViewer.setContentProvider(new ExpressionEditorDescriptorContentProvider());

-		this.fQueryLanguageViewer.setSorter(ModelViewerSorter.getInstance());

-//		queryLanguageViewer.addFilter(new ExpressionLanguageFilter(new String[0]));

-

-		// Query language label layout

-		data = new FlatFormData();

-		data.left = new FlatFormAttachment(0, 0);

-		data.right = new FlatFormAttachment(this.fQueryLanguageCombo, -IDetailsAreaConstants.HSPACE);

-		data.top = new FlatFormAttachment(this.fQueryLanguageCombo, 0, SWT.CENTER);

-		queryLanguageLabel.setLayoutData(data);

-

-		this.fQueryLanguageViewer.setInput(new Object());

-

-

-		this.fContext = new FocusContext( this.fExpressionLanguageCombo, this.fQueryLanguageCombo );

-	}

-

-	@Override

-	protected void createClient(Composite parent) {

-		Composite composite = createFlatFormComposite(parent);

-		createAttributesWidgets(composite);

-		createChangeTrackers();

-

-		PlatformUI.getWorkbench().getHelpSystem().setHelp(

-			composite, IHelpContextIds.PROPERTY_PAGE_ATTRIBUTES);

-	}

-

-	/**

-	 * @see org.eclipse.bpel.ui.properties.BPELPropertySection#getUserContext()

-	 */

-	@Override

-	public Object getUserContext() {

-		return this.fContext.get();

-	}

-

-	/**

-	 * @see org.eclipse.bpel.ui.properties.BPELPropertySection#restoreUserContext(java.lang.Object)

-	 */

-	@Override

-	public void restoreUserContext(Object userContext) {

-		this.fContext.set(userContext);

-	}

-}

diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/ExitOnStandardFaultSection.java b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/ExitOnStandardFaultSection.java
index 076f37d..e73c6d4 100644
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/ExitOnStandardFaultSection.java
+++ b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/ExitOnStandardFaultSection.java
@@ -30,65 +30,59 @@
  * ExitOnStandardFaultSection provides viewing and editing of the

  * exitOnStandardFault attribute of Process elements.

  */

-

 @SuppressWarnings({ "boxing", "nls" })

-

 public class ExitOnStandardFaultSection extends BPELPropertySection {

-	

-	

+

+

 	protected Button yesRadio, noRadio ;

 

 	EditController fRadioController;

-	

+

 	protected void createWidgets(Composite composite) {

 		FlatFormData data;

-		

-		Label suppressLabel = fWidgetFactory.createLabel(composite, Messages.ExitOnStandardFault_1); 

-		

-		yesRadio = fWidgetFactory.createButton(composite, Messages.ExitOnStandardFault_Yes_2, SWT.RADIO); 

+

+		Label suppressLabel = this.fWidgetFactory.createLabel(composite, Messages.ExitOnStandardFault_1);

+

+		this.yesRadio = this.fWidgetFactory.createButton(composite, Messages.ExitOnStandardFault_Yes_2, SWT.RADIO);

 		data = new FlatFormData();

 		data.left = new FlatFormAttachment(0, BPELUtil.calculateLabelWidth(suppressLabel, STANDARD_LABEL_WIDTH_LRG));

 		data.top = new FlatFormAttachment(0, 0);

-		yesRadio.setLayoutData(data);	

-		yesRadio.setData(RadioButtonIValue.VALUE, Boolean.TRUE);

+		this.yesRadio.setLayoutData(data);

+		this.yesRadio.setData(RadioButtonIValue.VALUE, Boolean.TRUE);

 

-		noRadio = fWidgetFactory.createButton(composite, Messages.ExitOnStandardFault_No_3, SWT.RADIO); 

+		this.noRadio = this.fWidgetFactory.createButton(composite, Messages.ExitOnStandardFault_No_3, SWT.RADIO);

 		data = new FlatFormData();

-		data.left = new FlatFormAttachment(yesRadio, IDetailsAreaConstants.HSPACE);

+		data.left = new FlatFormAttachment(this.yesRadio, IDetailsAreaConstants.HSPACE);

 		data.top = new FlatFormAttachment(0, 0);

-		noRadio.setLayoutData(data);

-		noRadio.setData(RadioButtonIValue.VALUE, Boolean.FALSE);

+		this.noRadio.setLayoutData(data);

+		this.noRadio.setData(RadioButtonIValue.VALUE, Boolean.FALSE);

 

 		data = new FlatFormData();

 		data.left = new FlatFormAttachment(0, 0);

-		data.right = new FlatFormAttachment(yesRadio, -IDetailsAreaConstants.HSPACE);

-		data.top = new FlatFormAttachment(yesRadio, 0, SWT.CENTER);

+		data.right = new FlatFormAttachment(this.yesRadio, -IDetailsAreaConstants.HSPACE);

+		data.top = new FlatFormAttachment(this.yesRadio, 0, SWT.CENTER);

 		suppressLabel.setLayoutData(data);

 	}

-	

+

 	protected void createControllers () {

-		fRadioController = createEditController();

-		fRadioController.setFeature(BPELPackage.eINSTANCE.getProcess_ExitOnStandardFault() );		

-		fRadioController.setViewIValue(new RadioButtonIValue ( yesRadio , noRadio )) ;		

-		fRadioController.startListeningTo(yesRadio,noRadio);

+		this.fRadioController = createEditController();

+		this.fRadioController.setFeature(BPELPackage.eINSTANCE.getProcess_ExitOnStandardFault() );

+		this.fRadioController.setViewIValue(new RadioButtonIValue ( this.yesRadio , this.noRadio )) ;

+		this.fRadioController.startListeningTo(this.yesRadio,this.noRadio);

 	}

-	

+

 	@Override

 	protected void createClient(Composite parent) {

 		Composite composite = createFlatFormComposite(parent);

 		createWidgets(composite);

 		createControllers();

-		

-    PlatformUI.getWorkbench().getHelpSystem().setHelp(

-      composite, IHelpContextIds.PROPERTY_PAGE_EXIT_ON_FAULT);

-	}

 

-	

+		PlatformUI.getWorkbench().getHelpSystem().setHelp( composite, IHelpContextIds.PROPERTY_PAGE_EXIT_ON_FAULT );

+	}

 

 	@Override

-	protected void basicSetInput (EObject newInput) {		

+	protected void basicSetInput (EObject newInput) {

 		super.basicSetInput(newInput);

-		fRadioController.setInput(newInput);		

+		this.fRadioController.setInput(newInput);

 	}

-	

 }

diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/ExpressionAssignCategory.java b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/ExpressionAssignCategory.java
index e1d6c2d..ff03df6 100644
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/ExpressionAssignCategory.java
+++ b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/ExpressionAssignCategory.java
@@ -11,17 +11,11 @@
 package org.eclipse.bpel.ui.properties;

 

 import org.eclipse.bpel.model.AbstractAssignBound;

-import org.eclipse.bpel.model.BPELFactory;

 import org.eclipse.bpel.model.BPELPackage;

-import org.eclipse.bpel.model.Expression;

 import org.eclipse.bpel.ui.IBPELUIConstants;

 import org.eclipse.bpel.ui.Messages;

 import org.eclipse.bpel.ui.adapters.IVirtualCopyRuleSide;

-import org.eclipse.bpel.ui.commands.CompoundCommand;

-import org.eclipse.bpel.ui.commands.SetCommand;

 import org.eclipse.bpel.ui.util.BPELUtil;

-import org.eclipse.bpel.ui.util.BatchedMultiObjectAdapter;

-import org.eclipse.bpel.ui.util.MultiObjectAdapter;

 import org.eclipse.emf.common.notify.Notification;

 import org.eclipse.emf.ecore.EObject;

 import org.eclipse.emf.ecore.EStructuralFeature;

@@ -63,16 +57,21 @@
 	}

 

 

-	/**

-	 * @see org.eclipse.bpel.ui.properties.BPELPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)

+	/*

+	 * (non-Javadoc)

+	 * @see org.eclipse.bpel.ui.properties.BPELPropertySection

+	 * #createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)

 	 */

 	@Override

 	public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {

 		super.createControls(parent, aTabbedPropertySheetPage);

 		this.fParent = parent;

 	}

-	/**

-	 * @see org.eclipse.bpel.ui.properties.IAssignCategory#getComposite()

+

+	/*

+	 * (non-Javadoc)

+	 * @see org.eclipse.bpel.ui.properties.IAssignCategory

+	 * #getComposite()

 	 */

 	public Composite getComposite() {

 		return this.fParent;

@@ -90,41 +89,6 @@
 		return true;

 	}

 

-

-	@Override

-	protected MultiObjectAdapter[] createAdapters() {

-		MultiObjectAdapter adapter = new BatchedMultiObjectAdapter() {

-			boolean needRefresh = false;

-			boolean toOrFromAffected = false;

-			@Override

-			public void notify(Notification n) {

-				this.needRefresh = isBodyAffected(n);

-

-				// if (isBodyAffected(n) && !isExecutingStoreCommand) needRefresh = true;

-				if (isToOrFromAffected(n)) {

-					this.toOrFromAffected = true;

-				}

-				refreshAdapters();

-			}

-			@Override

-			public void finish() {

-				if (this.needRefresh || this.toOrFromAffected) {

-					updateWidgets();

-				}

-				if (this.toOrFromAffected) {

-					updateCategoryWidgets();

-				}

-				this.toOrFromAffected = false;

-				this.needRefresh = false;

-			}

-		};

-		return new MultiObjectAdapter[] { adapter };

-	}

-

-	protected void updateCategoryWidgets() {

-		updateEditor();

-	}

-

 	/**

 	 * Policy: wrap the command with contexts from the ownerSection (rather

 	 * than from the category itself).  On undo, the ownerSection will delegate

@@ -154,27 +118,6 @@
 		return side != null ? side.getExpression() != null : false;

 	}

 

-

-	@Override

-	protected Command newStoreToModelCommand  (Object body) {

-		CompoundCommand result = new CompoundCommand();

-		// If there is no condition, create one.

-		Expression oldExp = getExprFromModel();

-		Expression exp = BPELFactory.eINSTANCE.createExpression();

-

-		// Don't set the language, because if the user has changed the

-		// language, a condition would already exist at this point.

-		if (oldExp != null) {

-			exp.setExpressionLanguage(oldExp.getExpressionLanguage());

-		}

-		exp.setBody(body);

-		result.add(new SetCommand( getExpressionTarget(), exp, getStructuralFeature() ));

-

-		// VZ: fEditor.addExtraStoreCommands(result);

-

-		return result;

-	}

-

 	/*

 	 * (non-Javadoc)

 	 * @see org.eclipse.bpel.ui.properties.ExpressionSection

diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/ExpressionSection.java b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/ExpressionSection.java
index 6daa637..168aefd 100644
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/ExpressionSection.java
+++ b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/ExpressionSection.java
@@ -10,159 +10,71 @@
  *******************************************************************************/

 package org.eclipse.bpel.ui.properties;

 

-import org.eclipse.bpel.common.ui.details.IOngoingChange;

-import org.eclipse.bpel.common.ui.editmodel.AbstractEditModelCommand;

-import org.eclipse.bpel.common.ui.flatui.FlatFormAttachment;

-import org.eclipse.bpel.common.ui.flatui.FlatFormData;

+import java.util.concurrent.atomic.AtomicBoolean;

+

 import org.eclipse.bpel.model.BPELFactory;

 import org.eclipse.bpel.model.Expression;

 import org.eclipse.bpel.ui.IBPELUIConstants;

 import org.eclipse.bpel.ui.commands.CompoundCommand;

 import org.eclipse.bpel.ui.commands.SetCommand;

-import org.eclipse.bpel.ui.editors.xpath.XPathTextEditor;

+import org.eclipse.bpel.ui.editors.xpath.ColorManager;

+import org.eclipse.bpel.ui.editors.xpath.XPathSourceViewerConfiguration;

 import org.eclipse.bpel.ui.expressions.IEditorConstants;

-import org.eclipse.bpel.ui.util.BatchedMultiObjectAdapter;

-import org.eclipse.bpel.ui.util.MultiObjectAdapter;

 import org.eclipse.core.resources.IMarker;

-import org.eclipse.core.runtime.IAdaptable;

 import org.eclipse.emf.common.notify.Notification;

 import org.eclipse.emf.ecore.EObject;

 import org.eclipse.emf.ecore.EStructuralFeature;

-import org.eclipse.emf.ecore.resource.Resource;

-import org.eclipse.gef.commands.Command;

+import org.eclipse.jface.text.Document;

+import org.eclipse.jface.text.IDocument;

+import org.eclipse.jface.text.source.ISourceViewer;

+import org.eclipse.jface.text.source.SourceViewer;

+import org.eclipse.jface.text.source.VerticalRuler;

 import org.eclipse.swt.SWT;

+import org.eclipse.swt.custom.StyledText;

+import org.eclipse.swt.events.ModifyEvent;

+import org.eclipse.swt.events.ModifyListener;

 import org.eclipse.swt.graphics.Font;

 import org.eclipse.swt.graphics.FontData;

+import org.eclipse.swt.layout.FillLayout;

+import org.eclipse.swt.layout.GridData;

+import org.eclipse.swt.layout.GridLayout;

 import org.eclipse.swt.widgets.Composite;

 import org.eclipse.swt.widgets.Label;

-import org.eclipse.ui.ide.IGotoMarker;

 

 /**

  * Base class with some shared behavior for details panes that edit a XPath expression.

  * @author Michal Chmielewski (michal.chmielewski@oracle.com)

- * @author Vincent Zurczak - EBM WebSourcing (Merge this class with TextSection and simplify it by only using the XPath editor)

+ * @author Vincent Zurczak - EBM WebSourcing (Merge this class with TextSection, simplify it by only using the XPath viewer)

+ * FIXME: There are probably cases that are not handled correctly. To be fixed on the fly.

+ * FIXME: Undo is not supported correctly.

  */

 public abstract class ExpressionSection extends BPELPropertySection {

 

 	protected Composite fEditorArea ;

-	protected XPathTextEditor fEditor;

+	protected StyledText expressionText;

 

 	protected Font boldFont;

 	protected String title;

 	protected Label titleLabel;

 

 	protected EStructuralFeature fStructuralFeature;

-	protected IOngoingChange change;

+	protected AtomicBoolean modelUpdate = new AtomicBoolean( false );

 

 

-	public ExpressionSection() {

-

-		this.change = new IOngoingChange() {

-			public String getLabel() {

-				return getCommandLabel();

-			}

-			public Command createApplyCommand() {

-				if (ExpressionSection.this.fEditor == null) {

-					return null;

-				}

-

-				CompoundCommand result = new CompoundCommand();

-				Expression exp = BPELFactory.eINSTANCE.createCondition();

-				exp.setBody( ExpressionSection.this.fEditor.getContents());

-				result.add( new SetCommand( getExpressionTarget(), getExpression4Target( exp ) , getStructuralFeature()));

-

-				// refresh the editor

-				result.add( new AbstractEditModelCommand() {

-					@Override

-					public void execute() {

-						if (ExpressionSection.this.fEditor != null) {

-							ExpressionSection.this.fEditor.markAsClean();

-						}

-					}

-					// TODO: is this correct?

-					@Override

-					public Resource[] getResources() {

-						return new Resource[ 0 ];

-					}

-					@Override

-					public Resource[] getModifiedResources() {

-						return new Resource[ 0 ];

-					}

-				});

-

-				return wrapInShowContextCommand(result);

-			}

-

-			public void restoreOldState() {

-				// updateWidgets();

-			}

-		};

-	}

-

-

-	protected void notifyEditorChanged() {

-		// TODO: why is this method being called before createClient() has finished

-		// when a BuiltInExpressionEditor was selected in the model?

-		if (this.change != null) {

-			getCommandFramework().notifyChangeInProgress(this.change);

-		}

-	}

-

-

-	/**

-	 * @see org.eclipse.bpel.ui.properties.BPELPropertySection#aboutToBeHidden()

+	/*

+	 * (non-Javadoc)

+	 * @see org.eclipse.bpel.ui.properties.BPELPropertySection

+	 * #addAllAdapters()

 	 */

 	@Override

-	public void aboutToBeHidden() {

-		super.aboutToBeHidden();

-		if (this.change != null)

-			getCommandFramework().notifyChangeDone(this.change);

-

-		// if (this.fEditor != null) this.fEditor.aboutToBeHidden();

-	}

-

-

-	@Override

 	protected void addAllAdapters() {

 		super.addAllAdapters();

 		Expression e = getExprFromModel();

-		if (e != null)

+		if( e != null && this.fAdapters.length > 0 )

 			this.fAdapters[0].addToObject(e);

 	}

 

 

-	@Override

-	protected MultiObjectAdapter[] createAdapters() {

-

-		MultiObjectAdapter adapter = new BatchedMultiObjectAdapter() {

-

-			boolean needRefresh = false;

-

-			@Override

-			public void notify (Notification n) {

-

-				if (markersHaveChanged(n)) {

-					updateMarkers();

-					return ;

-				}

-				this.needRefresh = this.needRefresh || isBodyAffected(n);

-				refreshAdapters();

-			}

-

-			@Override

-			public void finish() {

-				if (this.needRefresh) {

-					// updateWidgets();

-				}

-

-				this.needRefresh = false;

-			}

-		};

-

-		return new MultiObjectAdapter[] { adapter };

-	}

-

-

 	/**

 	 *  When this method is called, the section has already been created.

 	 *

@@ -173,12 +85,22 @@
 	 *  be based on the model.

 	 */

 	@Override

-	protected void basicSetInput (EObject newInput) {

+	protected void basicSetInput( EObject newInput ) {

 

+		this.modelUpdate.set( true );

 		super.basicSetInput(newInput);

 

 		/** Figure out based in the input, what EMF structural feature we are setting */

 		this.fStructuralFeature = getStructuralFeature( newInput );

+

+		Expression exp = getExprFromModel();

+		Object o = exp != null ? exp.getBody() : null;

+		String content = o == null ? "" : String.valueOf( o );

+		this.expressionText.setText( content );

+		this.expressionText.setSelection( content.length());

+		this.expressionText.setFocus();

+

+		this.modelUpdate.set( false );

 	}

 

 

@@ -192,10 +114,14 @@
 	 *

 	 * @return

 	 */

-	protected EObject getExpressionTarget () {

+	protected EObject getExpressionTarget() {

 		return getInput();

 	}

 

+

+	/**

+	 * @return

+	 */

 	protected String getExpressionType() {

 		return IEditorConstants.ET_ANY ;

 	}

@@ -205,7 +131,7 @@
 	 * Return the previously computed structural feature of the input object.

 	 * @return

 	 */

-	protected final EStructuralFeature getStructuralFeature() {

+	protected EStructuralFeature getStructuralFeature() {

 		return this.fStructuralFeature;

 	}

 

@@ -218,29 +144,27 @@
 

 

 	/**

-	 * Return the actual namespace from the expression, or null if not set.

+	 * @return

 	 */

-	protected String getExpressionLanguageFromModel() {

-		Expression expression = getExprFromModel();

-		return expression != null ? expression.getExpressionLanguage() : null;

-	}

-

-

-

 	protected Expression getExprFromModel() {

 

+		Expression result = null;

 		EObject target = getExpressionTarget();

-		if (target != null) {

-			Object result = target.eGet( getStructuralFeature());

-			if (result instanceof Expression) {

-				return (Expression) result;

-			}

+		if( target != null ) {

+			Object o = target.eGet( getStructuralFeature());

+			if( o instanceof Expression )

+				result = (Expression) o;

 		}

-		return null;

+

+		return result;

 	}

 

 

-	protected Expression getExpression4Target ( Expression expression ) {

+	/**

+	 * @param expression

+	 * @return

+	 */

+	protected Expression getExpression4Target( Expression expression ) {

 		return expression;

 	}

 

@@ -286,15 +210,17 @@
 	}

 

 

-	/**

-	 * Create the client area. This is just done once.

+	/*

+	 * (non-Javadoc)

+	 * @see org.eclipse.bpel.ui.properties.BPELPropertySection

+	 * #createClient(org.eclipse.swt.widgets.Composite)

 	 */

-

 	@Override

 	protected void createClient( Composite parent ) {

 

 		// The top

-		this.fEditorArea =  createFlatFormComposite( parent );

+		this.fEditorArea = getWidgetFactory().createComposite( parent );

+		this.fEditorArea.setLayout( new GridLayout());

 		if( this.title != null ) {

 

 			// The font

@@ -303,18 +229,51 @@
 			this.boldFont = new Font( parent.getDisplay(), fontData[ 0 ]);

 

 			// The title

-			FlatFormData data;

 			this.titleLabel = this.fWidgetFactory.createLabel( this.fEditorArea, this.title);

 			this.titleLabel.setFont(this.boldFont);

-			data = new FlatFormData();

-			data.left = new FlatFormAttachment(0, 0);

-			data.top = new FlatFormAttachment(0, 0);

-			data.right = new FlatFormAttachment(100, 0);

-			this.titleLabel.setLayoutData(data);

 		}

 

 		// The expression editor

-		this.fEditor.createPartControl( this.fEditorArea );

+		getWidgetFactory().createLabel( this.fEditorArea, "Edit the associated XPath Expression." );

+		Composite editor = getWidgetFactory().createComposite( this.fEditorArea, SWT.BORDER );

+		editor.setLayout( new FillLayout ());

+

+		GridData layoutData = new GridData( GridData.FILL_BOTH );

+		editor.setLayoutData( layoutData );

+

+		int style = SWT.V_SCROLL | SWT.MULTI | SWT.BORDER;

+		final ISourceViewer viewer = new SourceViewer( editor, new VerticalRuler( 0 ), style );

+		ColorManager cManager = new ColorManager ();

+		viewer.configure( new XPathSourceViewerConfiguration( cManager ));

+

+		viewer.getTextWidget().setLayoutData( new GridData( GridData.FILL_BOTH ));

+		IDocument document = new Document( "" );

+		viewer.setDocument( document );

+

+		this.expressionText = viewer.getTextWidget();

+		this.expressionText.addModifyListener( new ModifyListener() {

+			@Override

+			public void modifyText( ModifyEvent e ) {

+				saveExpressionToModel();

+			}

+		});

+	}

+

+

+	/**

+	 * Saves the expression to the model.

+	 */

+	protected void saveExpressionToModel() {

+

+		if( this.modelUpdate.get())

+			return;

+

+		CompoundCommand result = new CompoundCommand();

+		Expression exp = BPELFactory.eINSTANCE.createCondition();

+		exp.setBody( this.expressionText != null ? this.expressionText.getText().trim() : "" );

+		result.add( new SetCommand( getExpressionTarget(), getExpression4Target( exp ) , getStructuralFeature()));

+

+		getCommandFramework().execute( result );

 	}

 

 

@@ -326,34 +285,9 @@
 	@Override

 	public void dispose() {

 

-		this.fEditor.dispose();

 		if( this.boldFont != null && ! this.boldFont.isDisposed())

 			this.boldFont.dispose();

 

 		super.dispose();

 	}

-

-

-	/*

-	 * (non-Javadoc)

-	 * @see org.eclipse.bpel.ui.properties.BPELPropertySection

-	 * #updateMarkers()

-	 */

-	@Override

-	protected void updateMarkers () {

-		// TODO: implement it

-	}

-

-

-	/*

-	 * (non-Javadoc)

-	 * @see org.eclipse.bpel.ui.properties.BPELPropertySection

-	 * #gotoMarker(org.eclipse.core.resources.IMarker)

-	 */

-	@Override

-	public void gotoMarker( IMarker marker ) {

-		IGotoMarker gotoMarker = (IGotoMarker) ((IAdaptable) this.fEditor).getAdapter( IGotoMarker.class );

-		if( gotoMarker != null )

-			gotoMarker.gotoMarker( marker );

-	}

 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/RadioChoiceExpressionSection.java b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/RadioChoiceExpressionSection.java
deleted file mode 100644
index 9eb41b8..0000000
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/RadioChoiceExpressionSection.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*******************************************************************************

- * Copyright (c) 2005, 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials

- * are made available under the terms of the Eclipse Public License v1.0

- * which accompanies this distribution, and is available at

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.bpel.ui.properties;

-

-import org.eclipse.bpel.common.ui.details.IDetailsAreaConstants;

-import org.eclipse.bpel.common.ui.flatui.FlatFormAttachment;

-import org.eclipse.bpel.common.ui.flatui.FlatFormData;

-import org.eclipse.bpel.ui.expressions.IExpressionEditor;

-import org.eclipse.emf.ecore.EObject;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.events.SelectionEvent;

-import org.eclipse.swt.events.SelectionListener;

-import org.eclipse.swt.widgets.Button;

-import org.eclipse.swt.widgets.Composite;

-

-

-/**

- * An abstract ExpressionDetails which supports the selection of one or more

- * radio buttons, and passes the IDs of the selected buttons to the expression

- * editor as context info. 

- */

-public abstract class RadioChoiceExpressionSection extends ExpressionSection {

-

-	protected Composite radioComposite;

-	protected Button[] radioButtons;

-	

-	protected int fButtonCount ;

-	protected int fCurrentButtonIndex;

-	

-	@Override

-	protected String getExpressionType() { 

-		return getButtonExprType(fCurrentButtonIndex); 

-	}

-	

-	protected abstract String[] getButtonLabels();

-	protected abstract String getButtonExprType(int buttonIndex);	

-	

-	protected abstract int getButtonIndexFromModel();

-	

-	/** 

-	 * Change the input.

-	 * 

-	 */

-	

-	@Override

-	protected void basicSetInput(EObject newInput) {

-		

-		super.basicSetInput(newInput);

-		fCurrentButtonIndex = getButtonIndexFromModel();

-		

-		updateWidgets();

-	}

-	

-	// TODO: call this at the proper time

-	protected void calculateEnablement() {

-		

-		IExpressionEditor exEditor = getExpressionEditor();

-		if (exEditor == null) {

-			throw new IllegalStateException();

-		}

-		

-		for (int i = 0; i < radioButtons.length; i++) {

-			String btnType = getButtonExprType(i);			

-			boolean enabled = fEditor.supportsExpressionType(btnType);

-			radioButtons[i].setEnabled(enabled);

-		}

-	}

-	

-	/**

-	 * Update the Radio button widgets according to the state of the model.

-	 *

-	 */

-	

-	protected void updateRadioButtonWidgets() {

-		

-		if (hasEditor() == false) {

-		    radioComposite.setVisible(false);			

-		} else {		

-			radioComposite.setVisible(true);

-    	    FlatFormData data = (FlatFormData) fEditorArea.getLayoutData();

-    	    data.top = new FlatFormAttachment(radioComposite, IDetailsAreaConstants.VSPACE);

-			

-			calculateEnablement();

-			fCurrentButtonIndex = getButtonIndexFromModel();

-			if (fCurrentButtonIndex >= 0) radioButtons[fCurrentButtonIndex].setSelection(true);

-			for (int i = 0; i<radioButtons.length; i++) {

-				if (i != fCurrentButtonIndex) {

-					radioButtons[i].setSelection(false);

-				}

-			}

-			

-		}

-		

-	    fParentComposite.layout(true);

-	}

-	

-	@Override

-	protected void updateWidgets() {

-		super.updateWidgets();

-		updateRadioButtonWidgets();

-	}

-	

-	/**

-	 * Creates the radio button widgets.

-	 * <p>

-	 * NB: There is a dependency on the parent class here that is not obvious. Super classes will

-	 * defined getButtonLabels(), this information is used to create the radio buttons, but prior to

-	 * do that create

-	 * @param parent

-	 */

-	protected void createRadioButtonWidgets(Composite parent) {

-		

-		String[] labels = getButtonLabels();

-		fButtonCount = labels.length;

-		

-		FlatFormData data;

-		radioComposite = createFlatFormComposite(parent);		

-		

-		radioButtons = new Button[ fButtonCount ];

-		

-		FlatFormAttachment lastLeft = new FlatFormAttachment(0, BPELPropertySection.STANDARD_LABEL_WIDTH_LRG);

-		for (int i = 0; i < fButtonCount; i++) {

-			

-			radioButtons[i] = fWidgetFactory.createButton(radioComposite, labels[i], SWT.RADIO);

-			data = new FlatFormData();

-			data.left = lastLeft;

-			data.top = new FlatFormAttachment(0, 0);

-			radioButtons[i].setLayoutData(data);

-			lastLeft = new FlatFormAttachment(radioButtons[i], IDetailsAreaConstants.HSPACE);

-			final int index = i;

-			

-			radioButtons[i].addSelectionListener(new SelectionListener() {

-				public void widgetSelected (SelectionEvent e) {

-					radioButtonSelected(index,radioButtons[index]);

-				}

-				public void widgetDefaultSelected(SelectionEvent e) { }

-			});

-			

-		}

-		

-		data = new FlatFormData();

-		data.left = new FlatFormAttachment(0, 0);

-		data.right = new FlatFormAttachment(100, 0);

-		data.top = new FlatFormAttachment(expressionLanguageViewer.getControl(), IDetailsAreaConstants.VSPACE + 2);

-		radioComposite.setLayoutData(data);

-	}

-

-	protected abstract void radioButtonSelected (int index, Button button) ;

-

-	

-	@Override

-	protected void createClient(Composite parent) {

-		super.createClient(parent);	

-		createRadioButtonWidgets(fParentComposite);

-	}

-	

-	protected boolean showRadioButtons() { 

-		return hasEditor(); 

-	}

-

-    

-	/**

-	 * Allow the editor in the combo if *any* of the radio buttons would be supported

-	 * by that editor.  (calculateEnabled() will decide which radio buttons to actually

-	 * enable for the selected editor).

-	 */

-	@Override

-	protected boolean isEditorSupported(IExpressionEditor exEditor) {

-				

-		for (int i = 0; i< fButtonCount; i++) {

-			

-			String btnType = getButtonExprType(i);			

-			

-			if (exEditor.supportsExpressionType(btnType)) {

-				return true;

-			}

-		}

-		return false;

-	}

-}

diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/WaitConditionSection.java b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/WaitConditionSection.java
index 2aff2e6..c124d01 100644
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/WaitConditionSection.java
+++ b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/WaitConditionSection.java
@@ -22,11 +22,13 @@
 import org.eclipse.bpel.ui.commands.CompoundCommand;

 import org.eclipse.bpel.ui.commands.SetCommand;

 import org.eclipse.bpel.ui.expressions.IEditorConstants;

-import org.eclipse.core.resources.IMarker;

 import org.eclipse.emf.ecore.EClass;

 import org.eclipse.emf.ecore.EObject;

 import org.eclipse.emf.ecore.EStructuralFeature;

-import org.eclipse.gef.commands.Command;

+import org.eclipse.swt.SWT;

+import org.eclipse.swt.events.SelectionEvent;

+import org.eclipse.swt.events.SelectionListener;

+import org.eclipse.swt.layout.GridLayout;

 import org.eclipse.swt.widgets.Button;

 import org.eclipse.swt.widgets.Composite;

 import org.eclipse.ui.PlatformUI;

@@ -36,16 +38,73 @@
  * <p>

  * This is a little more involved, because "until" and "for" are mutually exclusive in the model.

  * </p>

+ * TODO: review and complete this class (VZ)

  */

-public class WaitConditionSection extends RadioChoiceExpressionSection {

+public class WaitConditionSection extends ExpressionSection {

+

+	protected Button[] radioButtons;

+	protected int fButtonCount ;

+	protected int fCurrentButtonIndex;

 

 	@Override

-	protected String[] getButtonLabels() {

-		return gLabels;

+	protected String getExpressionType() {

+		return getButtonExprType(this.fCurrentButtonIndex);

+	}

+

+	/**

+	 * Change the input.

+	 */

+	@Override

+	protected void basicSetInput(EObject newInput) {

+

+		super.basicSetInput(newInput);

+		this.fCurrentButtonIndex = getButtonIndexFromModel();

+		updateRadioButtonWidgets();

 	}

 

 

-	@Override

+	/**

+	 * Update the Radio button widgets according to the state of the model.

+	 */

+	protected void updateRadioButtonWidgets() {

+

+		this.fCurrentButtonIndex = getButtonIndexFromModel();

+		if (this.fCurrentButtonIndex >= 0) this.radioButtons[this.fCurrentButtonIndex].setSelection(true);

+		for (int i = 0; i<this.radioButtons.length; i++) {

+			if (i != this.fCurrentButtonIndex)

+				this.radioButtons[i].setSelection(false);

+		}

+	}

+

+	/**

+	 * Creates the radio button widgets.

+	 * @param parent

+	 */

+	protected void createRadioButtonWidgets(Composite parent) {

+

+		this.fButtonCount = gLabels.length;

+

+		Composite radioComposite = getWidgetFactory().createComposite( parent );

+		radioComposite.setLayout( new GridLayout( 2, true ));

+

+		this.radioButtons = new Button[ this.fButtonCount ];

+		for(int i = 0; i < this.fButtonCount; i++) {

+			this.radioButtons[i] = this.fWidgetFactory.createButton(radioComposite, gLabels[i], SWT.RADIO);

+			this.radioButtons[i].addSelectionListener(new SelectionListener() {

+				public void widgetSelected (SelectionEvent e) {

+					// TODO: store the information

+				}

+				public void widgetDefaultSelected(SelectionEvent e) { }

+			});

+		}

+	}

+

+	protected void createClient(Composite parent) {

+		super.createClient(parent);

+		createRadioButtonWidgets( parent );

+		PlatformUI.getWorkbench().getHelpSystem().setHelp( parent, IHelpContextIds.PROPERTY_PAGE_WAIT );

+	}

+

 	protected String getButtonExprType (int buttonIndex) {

 		if (buttonIndex == 0) {

 			return IEditorConstants.ET_DATETIME;

@@ -57,20 +116,6 @@
 	}

 

 

-	@Override

-	protected void radioButtonSelected (int index, Button button) {

-

-		if (button.getSelection() == false) {

-			return ;

-		}

-

-		/** Mark the current radio button selection */

-		this.fCurrentButtonIndex = index;

-

-		runCommand(newStoreToModelCommand( getDefaultBody(editorLanguage,getButtonExprType(index) ) ) ) ;

-	}

-

-

 	/**

 	 * This is a map between classes (Wait, OnAlarm)

 	 * and the structural features that they support (For and Until).

@@ -89,7 +134,6 @@
 	 * Button 0 is for "until" (date time)

 	 * Button 1 is for "for"   (duration)

 	 */

-

 	static Map<EClass, EStructuralFeature[]> CLASS2FEATURES  = new HashMap<EClass, EStructuralFeature[]>();

 	static {

 		CLASS2FEATURES.put( BPELPackage.eINSTANCE.getWait() ,

@@ -123,8 +167,6 @@
 		return null;

 	}

 

-	@SuppressWarnings("nls")

-	@Override

 	protected int getButtonIndexFromModel() {

 		EObject input = getInput();

 		EStructuralFeature feature = getStructuralFeature(input);

@@ -137,52 +179,31 @@
 		return 1;

 	}

 

-

-	@Override

 	protected boolean isValidClientUseType (String useType) {

 		return IBPELUIConstants.USE_TYPE_DEADLINE_CONDITION.equals(useType)

 			|| IBPELUIConstants.USE_TYPE_DURATION_CONDITION.equals(useType);

 	}

 

-	@Override

-	protected void createClient (Composite parent) {

-		super.createClient(parent);

-

-		PlatformUI.getWorkbench().getHelpSystem().setHelp(

-			this.fParentComposite, IHelpContextIds.PROPERTY_PAGE_WAIT);

-	}

-

-

-	/**

-	 * Return true if the marker is valid for this section.

-	 * @return true if so, false otherwise.

-	 */

-

-	@Override

-	public boolean isValidMarker (IMarker marker ) {

-		return false;

-	}

 

 	/**

 	 * We override this parameter-less method since the feature changes as the button selection changes.

 	 * The target of this structural feature (for the SetCommand model mutation change) is the target itself,

 	 * that is the Wait activity.

 	 */

-

 	@Override

-	protected EStructuralFeature getStructuralFeature (  ) {

+	protected EStructuralFeature getStructuralFeature() {

 		return getStructuralFeature ( this.fCurrentButtonIndex );

 	}

 

-	protected EStructuralFeature getStructuralFeature ( int index ) {

-		EStructuralFeature features []  = CLASS2FEATURES.get( getInput().eClass() );

+	protected EStructuralFeature getStructuralFeature( int index ) {

+		EStructuralFeature features []  = CLASS2FEATURES.get( getInput().eClass());

 		assert (features != null) : "Features cannot be null";

 		return features[ index ];

 	}

 

 

 	@Override

-	protected EStructuralFeature getStructuralFeature ( EObject eObj ) {

+	protected EStructuralFeature getStructuralFeature( EObject eObj ) {

 

 		EStructuralFeature features [] = CLASS2FEATURES.get(eObj.eClass() );

 		for (EStructuralFeature f : features) {

@@ -192,49 +213,33 @@
 			}

 		}

 

-		return super.getStructuralFeature(eObj);

+		return null;

 	}

 

+

 	/**

-	 * Here we have to set the feature that we are setting and unset all

-	 * the other mutually exclusive features.

-	 *

-	 *

+	 * Saves the expression to the model.

 	 */

-	@Override

-	protected Command newStoreToModelCommand (Object body) {

+	protected void saveExpressionToModel() {

 

-		CompoundCommand result = new CompoundCommand();

-		Expression oldExp = getExprFromModel();

+		if( this.modelUpdate.get())

+			return;

 

-		Expression exp = BPELFactory.eINSTANCE.createExpression();

-

-		// Don't set the language, because if the user has changed the

-		// language, a condition would already exist at this point.

-

-		if (oldExp != null) {

-			exp.setExpressionLanguage(oldExp.getExpressionLanguage());

-		}

-		exp.setBody(body);

-

-

-		/** Be nice and unset the features that should not be set. */

-

+		// Usual behavior

 		EStructuralFeature aFeature = getStructuralFeature();

 		EObject target = getExpressionTarget();

 

-		/** Set the feature being edited */

-		result.add (new SetCommand(target, exp, aFeature));

+		CompoundCommand result = new CompoundCommand();

+		Expression exp = BPELFactory.eINSTANCE.createCondition();

+		exp.setBody( this.expressionText != null ? this.expressionText.getText().trim() : "" );

+		result.add( new SetCommand( target, getExpression4Target( exp ) , aFeature ));

 

-		// Unset others, if set

+		// Unset the features that should not be set

 		for (EStructuralFeature feature : CLASS2FEATURES.get( getInput().eClass() ) ) {

-			if (feature.equals(aFeature) || target.eIsSet(feature) == false ) {

-				continue;

-			}

-			result.add( new SetCommand(target,null,feature)) ;

+			if( ! feature.equals( aFeature ) && target.eIsSet(feature))

+				result.add( new SetCommand(target,null,feature)) ;

 		}

 

-		return result;

+		getCommandFramework().execute( result );

 	}

-

 }