SWT Designer & Riena

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

SWT Designer & Riena

Postby fabien » Fri Aug 14, 2009 7:26 am

I'm trying SWT Designer to modify riena's views.

I have a error when I try to open a riena's ViewPart in Design mode:
"Incompatible layout data set.
You are attempting to set FormData layout data for <null>. However Composite thisContentComposite has FillLayout and this Layout expects FillData layout data. Please remove invalid setLayoutData() invocation from your source."

I try to open the riena "HelloWorld" example ViewPart :
org.eclipse.riena.sample.app.client.helloworld.views.HelloWorldSubModuleView :

Code: Select all
* Very simple sub module view, that displays only a label with the text "Hello
* World!".
* @author schenkel
public class HelloWorldSubModuleView extends SubModuleView<HelloWorldSubModuleController> {
   public HelloWorldSubModuleView() {

   public static final String ID = HelloWorldSubModuleView.class.getName();

    * Add a label with the text "Hello World!" to the view.
    * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
   public void basicCreatePartControl(Composite parent) {
      parent.setLayout(new FormLayout());
      final Label helloLabel = new Label(parent, SWT.CENTER);
      helloLabel.setLayoutData(new FormData());

      addUIControl(helloLabel, "labelRidget"); //$NON-NLS-1$

      // layout
      FormData data = new FormData();
      data.height = 20;
      data.width = 90;
      data.top = new FormAttachment(0, 25);
      data.left = new FormAttachment(0, 5);

   protected HelloWorldSubModuleController createController(ISubModuleNode subModuleNode) {
      return new HelloWorldSubModuleController(subModuleNode);


The problem seem to be about LayoutData...
In the basicCreatePartControl method:
- Layout is set for the parent : FormLayout()
- LayoutData is set for the helloLabel : FormData()

The error message say that the parent has a FillLayout, but it's a FormLayout... I don't understand.

Could you help me to fix it?

Posts: 1
Joined: Fri Aug 14, 2009 7:01 am

Re: SWT Designer & Riena

Postby Eric Clayberg » Mon Aug 17, 2009 10:24 am

Please give this a try using the latest SWT Designer v7.1 build.
Eric Clayberg
Software Engineering Manager

Author: "Eclipse Plug-ins"
Eric Clayberg
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Return to SWT Designer

Who is online

Users browsing this forum: Google [Bot] and 2 guests