Lose ability to graphically edit Jface application window

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

Lose ability to graphically edit Jface application window

Postby rgallen » Sat Nov 01, 2003 9:31 pm

I have some code I worked on a couple of weeks ago, and I have since installed 1.2.1 (and subsequently uninstalled it), so I'm not sure when this ceased to work, but it appears that designer can no longer parse the code and edit the controls in the design pane. This code is a Jface application window with partial Designer generated code, and user generated code.

Now I am a complete newbie so I may have done something incredibly silly, but my understanding is that Designer should be able to parse out what it can deal with, and continue to allow graphical editting of these components in the presence of user modifications to the source.... no ?

How does designer manage mixed code (i.e. code generated by designer, and user created code) ?

btw: I tried to post the code (338 lines, not beyond reasonable for a post) but the BB wouldn't let me (timeout posting).
rgallen
 
Posts: 15
Joined: Sun Oct 12, 2003 7:45 pm

Re: Lose ability to graphically edit Jface application windo

Postby Eric Clayberg » Sun Nov 02, 2003 6:07 am

rgallen wrote:How does designer manage mixed code (i.e. code generated by designer, and user created code) ?

The Designer generates an AST node tree of the entire method - both generated and user written portions. It is designed to maintain user written code whenever possible. If it was working in 1.2.0 and not in the 1.2.1 beta, that is a regression (bug) that we need to fix. The parsing engine underwent a great deal of work in this release to prepare it for handling a much wider range of input and output formats (not just the Designer "block" style). That work is not quite finished which is on one of the reasons 1.2.1 is still in beta.

rgallen wrote:I tried to post the code (338 lines, not beyond reasonable for a post) but the BB wouldn't let me (timeout posting).

You should send long test cases directly to support@swt-designer.com. Once we load it up, we can probably figure out what the problem is and fix it quickly (before the 1.2.1 GA). Also, since you have looked at 1.2.1, we are always interested in feedback on the new FormLayout support.
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

Re: Lose ability to graphically edit Jface application windo

Postby rgallen » Sun Nov 02, 2003 9:10 am

Eric Clayberg wrote:The Designer generates an AST node tree of the entire method - both generated and user written portions. It is designed to maintain user written code whenever possible. If it was working in 1.2.0 and not in the 1.2.1 beta, that is a regression (bug) that we need to fix. The parsing engine underwent a great deal of work in this release to prepare it for handling a much wider range of input and output formats (not just the Designer "block" style). That work is not quite finished which is on one of the reasons 1.2.1 is still in beta.


If converting to 1.2.1 and viewing the class with it some how corrupted the AST (I guess it makes sense that the AST is persisted) then, yes, it could be related to 1.2.1; however, after initially getting the result with 1.2.1 I immediately reverted to 1.2.0, where I obtained the same result.

Eric Clayberg wrote:Also, since you have looked at 1.2.1, we are always interested in feedback on the new FormLayout support.



The only issue I have with FormLayout is I don't completely understand how to control attachment to other widgets. I have been able to successfully attach buttons to other widgets, but only at create time (i.e. when dropping the button near the target widget). I would like to have some way to control attachment to other widgets after creation (there may be, I just haven't found it yet). There is the icon that suggests the ability to do this, but I have'nt been able to get it to do anything yet.

Overall, I was able create a sophisticated form, that lays out exactly the way I want it (in the presence of resizing) in less than a minute (after initial learning curve) - I've worked with a few GUI builders, and this is a record.
rgallen
 
Posts: 15
Joined: Sun Oct 12, 2003 7:45 pm

Re: Lose ability to graphically edit Jface application windo

Postby Eric Clayberg » Sun Nov 02, 2003 8:26 pm

rgallen wrote:after initially getting the result with 1.2.1 I immediately reverted to 1.2.0, where I obtained the same result.

Hmmm. That probably means that it isn't something specific to 1.2.1. You may have made some hand modification that Designer could not parse. We have your example and are investigating.

rgallen wrote:The only issue I have with FormLayout is I don't completely understand how to control attachment to other widgets. I have been able to successfully attach buttons to other widgets, but only at create time (i.e. when dropping the button near the target widget). I would like to have some way to control attachment to other widgets after creation (there may be, I just haven't found it yet). There is the icon that suggests the ability to do this, but I have'nt been able to get it to do anything yet.

Actually, widget attachments are very simple to create at any time. All you need to do is drag a widget near any other widget that is before it in the z-order. For example, drop two buttons into the editor on opposite sides of the window. Grab the top-left quadrant of the right-hand button and drag it over to the left-hand button. When it gets close enough, dynamic snap points should appear at the right edge of the left-hand button (at both the exact edge of the widget and a 5 pixel offset to the right). Stop dragging at that point and a widget attachment will be created. Dynamic snap points appear at the near edge of the target widget, a fixed offset from the near edge, and at the far edge of the target widget.

rgallen wrote:Overall, I was able create a sophisticated form, that lays out exactly the way I want it (in the presence of resizing) in less than a minute (after initial learning curve) - I've worked with a few GUI builders, and this is a record.

I'm glad to hear that. Konstantin (the primary author of the Designer) did a fantastic job putting together the FormLayout support. He has a great feel for ergonomic and aesthetic issues.
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 SWT Designer

Who is online

Users browsing this forum: Google [Bot] and 1 guest