I have subclassed MasterDetailsBlock and now I would like to add it to my palette and drag'n'drop it on a FormPage. I get an error from WB doing that, I attached the screenshot.
When I use the following code, WB does not recognize I added anything to the form:
private final ReadersMaterDetail masterBlock = new ReadersMaterDetail();
protected void createFormContent(IManagedForm managedForm) {
FormToolkit toolkit = managedForm.getToolkit();
ScrolledForm form = managedForm.getForm();
form.setText("Items");
Composite body = form.getBody();
toolkit.decorateFormHeading(form.getForm());
toolkit.paintBordersFor(body);
{
managedForm.getForm().getBody().setLayout(new TableWrapLayout());
}
masterBlock.createContent(managedForm, body);
}
I played around with @wbp javadoc tags but without success. MasterDetailsBlock is supposed to be top-level, but how can I the concept works in real SWT environment.