|
Re: Invalid parsing in VE 1.2RC2 [message #126071 is a reply to message #126057] |
Wed, 14 June 2006 15:01 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
We got a little too aggressive in parsing code in 1.2. :-( We were
missing things before so now we parse everything. Unfortunately
JPanel aPnl = this.getPnlBtns();
aPnl.setBackground(Color.CYAN);
looks to us a lot like:
JPanel aPnl = new JPanel();
aPnl.setBackground(Color.CYAN);
We think it is a new jpanel. And so we rip it out from where it was and
put it on the freeform. We need to put more tests in for this kind of
stuff (or a way to say ignore this piece of code) but it is too late for
1.2. We are basically finished with 1.2.
But there is a kludgy workaround. Change to:
if (false)
;
else {
JPanel aPnl = this.getPnlBtns();
aPnl.setBackground(Color.CYAN);
}
We don't parse the else clause of an if statement. And most compilers
are smart enough to make the if test a no-op because of the primitive false.
--
Thanks,
Rich Kulp
|
|
|
Re: Invalid parsing in VE 1.2RC2 [message #126083 is a reply to message #126071] |
Wed, 14 June 2006 15:12 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Also one other alternative is to put the method into the action listener
itself. We don't parse the contents of the methods of inner classes. But
that would only be of use if it is only called from the inner class
any nowhere else.
--
Thanks,
Rich Kulp
|
|
|
|
Re: Invalid parsing in VE 1.2RC2 [message #613337 is a reply to message #126057] |
Wed, 14 June 2006 15:01 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
We got a little too aggressive in parsing code in 1.2. :-( We were
missing things before so now we parse everything. Unfortunately
JPanel aPnl = this.getPnlBtns();
aPnl.setBackground(Color.CYAN);
looks to us a lot like:
JPanel aPnl = new JPanel();
aPnl.setBackground(Color.CYAN);
We think it is a new jpanel. And so we rip it out from where it was and
put it on the freeform. We need to put more tests in for this kind of
stuff (or a way to say ignore this piece of code) but it is too late for
1.2. We are basically finished with 1.2.
But there is a kludgy workaround. Change to:
if (false)
;
else {
JPanel aPnl = this.getPnlBtns();
aPnl.setBackground(Color.CYAN);
}
We don't parse the else clause of an if statement. And most compilers
are smart enough to make the if test a no-op because of the primitive false.
--
Thanks,
Rich Kulp
|
|
|
Re: Invalid parsing in VE 1.2RC2 [message #613338 is a reply to message #126071] |
Wed, 14 June 2006 15:12 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Also one other alternative is to put the method into the action listener
itself. We don't parse the contents of the methods of inner classes. But
that would only be of use if it is only called from the inner class
any nowhere else.
--
Thanks,
Rich Kulp
|
|
|
|
Powered by
FUDForum. Page generated in 0.02988 seconds