@Override
protected Control createDialogArea(Composite parent) {
Control control = super.createDialogArea(parent);
if (bindingContext == null) {
bindingContext = new BindingContext(parent);
}
validationStatus = bindingContext.getStatus();
validationStatus.addChangeListener(new IChangeListener() {
public void handleChange(ChangeEvent event) {
IStatus status = (IStatus) validationStatus.getValue();
setMessage(status.getMessage(), status.getSeverity());
}
});
ClassLoader classLoader = Thread.currentThread()
.getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(
contentCLS.getClassLoader());
HashMap<String, Object> newOptions = new HashMap<String, Object>();
newOptions.put(XWTLoader.CONTAINER_PROPERTY, parent);
Object dataContext = getDataContext();
if (dataContext != null) {
newOptions.put(XWTLoader.DATACONTEXT_PROPERTY, dataContext);
}
BindingContext bindingContext = getBindingContext();
if (bindingContext != null) {
newOptions.put(XWTLoader.BINDING_CONTEXT_PROPERTY,
bindingContext);
}
newOptions.put(XWTLoader.CLASS_PROPERTY, contentCLS);