Object bo = getBusinessObject(pe);
if (bo == null) {
return;
}
ServiceTask serviceTask = (ServiceTask) bo;
String implementationName = serviceTask.getImplementation();
if(StringUtils.isEmpty(serviceTask.getImplementationType()) ||
ImplementationType.IMPLEMENTATION_TYPE_CLASS.equals(serviceTask.getImplementationType())) {
setVisibleClassType(true);
setVisibleExpressionType(false);
setVisibleDelegateExpressionType(false);
classNameText.setText(implementationName == null ? "" : implementationName);
} else if (serviceTask.getImplementationType().equals(ImplementationType.IMPLEMENTATION_TYPE_DELEGATEEXPRESSION)) {
setVisibleClassType(false);
setVisibleExpressionType(false);
setVisibleDelegateExpressionType(true);
delegateExpressionText.setText(implementationName == null ? "" : implementationName);
} else {
setVisibleClassType(false);
setVisibleExpressionType(true);
setVisibleDelegateExpressionType(false);
expressionText.setText(implementationName == null ? "" : implementationName);
}
if(StringUtils.isNotEmpty(serviceTask.getResultVariableName())) {
resultVariableText.setText(serviceTask.getResultVariableName());
} else {
resultVariableText.setText("");
}
fieldEditor.pictogramElement = pe;
fieldEditor.diagramEditor = getDiagramEditor();
fieldEditor.diagram = getDiagram();
fieldEditor.initialize(serviceTask.getFieldExtensions());
expressionText.addFocusListener(listener);
delegateExpressionText.addFocusListener(listener);
resultVariableText.addFocusListener(listener);
}
}