Source code gets messed up

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

Source code gets messed up

Postby elil » Sun Sep 07, 2003 10:28 pm

Hi,

While doing some RAD development :D , There are times when the source code gets messed up. :cry:
One example is having a complex Grid Form, and playing with the vertical span and grabing, and the deletion of some labels.
The Design looks great but when going to the code it doesn't compile and there is a mix up in the code, some gridData is put in strange places.
Sorry that I don't have an exact example, but this happened more then once.
Has anyone else experianced this?
Eli
elil
 
Posts: 4
Joined: Sun Sep 07, 2003 6:14 am

Postby admin » Sun Sep 07, 2003 10:39 pm

As you can see, Designer changes both source code and internal control tree. It is possible that there is some bugs in source manipulations, and this can by source of code mess. Only possible solution here is if you can provide scenario, how to reproduce this bug. :-(
admin
Moderator
 
Posts: 166
Joined: Thu Jul 24, 2003 12:25 am

Postby josquin941 » Sun Oct 05, 2003 11:14 pm

I noticed this too. Has there been any progress on identifying a fix? I laid out some controls in a grid, did some horizontal filling and grabbing, and also changed the names of a few of the variables. When I went back to look at the source, it was all screwed up... in about 4 or 5 places, about 1/2 of a line would be missing. An example:

ProgressBar pro

There were also many mismatched {}. I attempted to clean it up, but then I got errors when I switched back to the designer, saying that there could be only one control per block. To my eyes, there was.

To try to workaround, I deleted the offending controls, but it still had compile errors. Finally, I just deleted the class and now need to start again. I'm hesitant.
josquin941
 
Posts: 3
Joined: Sun Oct 05, 2003 11:11 pm

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

admin wrote:As you can see, Designer changes both source code and internal control tree. It is possible that there is some bugs in source manipulations, and this can by source of code mess. Only possible solution here is if you can provide scenario, how to reproduce this bug. :-(


I have had occasional problems too (Professional 1.2.0). I believe I should be able to come up with a reproducible case, stay tuned.

Can I assume that as long as the control tree, and attributes in the design window, look OK that the control tree has not become corrupt ? Assuming that the control tree is intact, then adding an option to "regen source" from control tree, might be useful whilst the problems are being debugged (with a suitable pop-up warning that hand coded changes will be lost) .

I am almost positive that when I had corrupt source that the control tree looked fine.
rgallen
 
Posts: 15
Joined: Sun Oct 12, 2003 7:45 pm

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

rgallen wrote:I have had occasional problems too (Professional 1.2.0). I believe I should be able to come up with a reproducible case, stay tuned.

There were a couple of problems that could have caused this in the 1.2.0 version which we hope we have fixed in the 1.2.1 release.

rgallen wrote:Can I assume that as long as the control tree, and attributes in the design window, look OK that the control tree has not become corrupt ?

The control tree and source both reflect the contents of the AST model that is maintained internally. If that gets corrupted (usually some source position offset isn't updated propery), it degrades quickly from that point on.

Test cases (especially using the 1.2.1 version) would be very helpful. We would be looking for an initial sample class (could be something made up just for the test case) and an exact set of steps (e.g., move this, change this, switch to source view, switch back to design view, etc.).
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], Yahoo [Bot] and 1 guest