The following line of code causes SWT-Designer to throw an exception:
- Code: Select all
for( int i = listCount, j = 0 ; (i < 3) && (j < items.length) ; i++, j++ )
This is in a widget selected method in response to clicking a button. Looking at the error screen it looks like the actual code in the method is being compared to code that has all of the formatting stripped out. However the ',' between the ++i and ++j is missing so the two versions of the source are not seen as being equal.
To recreate the exception - create a JFace Dialog and add the following in the createDialogArea method. Then try to change anything in the dialog and the error will occur.
- Code: Select all
for( int i = 1, j = 0 ; (i < 3) && (j <2) ; i++, j++ )
;
I also get an error dialog a lot of times with the following message when I am editing code in the source pane:
super.createDialogArea(parent) expected in createDialogArea, but empty block found.
When this happens eclipse takes 95-99% of the cpu time and I end up having to kill the process. I now pretty much always open the file with the Java editor to edit the source code instead of using Designer to avoid killing Eclipse and losing work.
It would be good to know if there are any specific rules that Designer uses so manually editing the source instead of using Designer doesn't cause the system to hang as a result.
Jim