Visual Inheritance: designing a "composite"

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

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

Visual Inheritance: designing a "composite"

Postby jldupont » Thu Nov 11, 2010 1:16 pm

I created a simple GWT "composite" class and I am having trouble editing this widget through the "design" facility.

Every time I try changing the position of a widget through the Design window, I get something along the lines of:

Unable to parse source.
GWT Designer was not able to parse source System.out.println(62.0);



Code: Select all
package x.y.z;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.LayoutPanel;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Style.Unit;

public class System extends Composite {

   private static final AppConstants CONSTANTS = GWT.create(AppConstants.class);
   public System() {
      
      LayoutPanel layoutPanel = new LayoutPanel();
      initWidget(layoutPanel);
      layoutPanel.setSize("594px", "460px");
      
      Label label1 = new Label(CONSTANTS.system_info_text());
      label1.setStyleName("label-center");
      layoutPanel.add(label1);
      layoutPanel.setWidgetTopHeight(label1, 0, Unit.PX, 25.0, Unit.PX);
      layoutPanel.setWidgetLeftRight(label1, 0, Unit.PX, 0, Unit.PX);
      
      LayoutPanel layoutPanel_1 = new LayoutPanel();
      layoutPanel.add(layoutPanel_1);
      layoutPanel.setWidgetLeftWidth(layoutPanel_1, 35.0, Unit.PX, 200.0, Unit.PX);
      layoutPanel.setWidgetTopHeight(layoutPanel_1, 94.0, Unit.PX, 50.0, Unit.PX);
   }
}


NOTE: I am using the latest GWT Designer build on Linux Ubuntu 9.04, Eclipse Galileo.
jldupont
 
Posts: 11
Joined: Thu Jun 26, 2008 12:24 pm

Re: Visual Inheritance: designing a "composite"

Postby jldupont » Thu Nov 11, 2010 1:50 pm

I found what the issue was: the usage of "System" as class name confuses GWT Designer a whole lot.
jldupont
 
Posts: 11
Joined: Thu Jun 26, 2008 12:24 pm

Re: Visual Inheritance: designing a "composite"

Postby Eric Clayberg » Fri Nov 12, 2010 10:11 am

System is a core JDK class that is used by GWT Designer internally.

In general, it is a bad idea to reuse class names from the java.lang package.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 2 guests

cron