labels aren't declared as fields anymore [message #45233] |
Wed, 30 June 2004 20:27  |
Eclipse User |
|
|
|
Originally posted by: bugoff.nastyspam.com
Hi.
I just tried the latest stream integration build (S20040628) and noticed
something that will cause problems for my students (we use Eclipse and
the VE to teach Java at a University).
Labels (both swing and AWT) are always declared inside the
getJContentPane method and there is no corresponding getLabel method.
This means that labels are no longer accessible to the rest of the frame.
While I can see that in most cases people don't need labels to be
visible to the entire class there is some cases where you do (in my case
trivial programs for teaching purposes).
This is a recent change - M1 declares labels as fields. Is this
intended behaviour? If so could you please add an option to the
preferences to make labels "global" again?
Regards,
Mark George
|
|
|
Re: labels aren't declared as fields anymore [message #45263 is a reply to message #45233] |
Wed, 30 June 2004 22:39  |
Eclipse User |
|
|
|
Originally posted by: myersj.nospam.us.ibm.com
Hi Mark,
Funny you should mention that, we just fixed that issue today. It'll be
in the next stable build (most likely the M2 build in a couple weeks).
If you'd like to fix it yourself before then, go to the
eclipse\plugins\org.eclipse.ve.jfc_1.0.0\overrides\javax\swi ng directory
and edit the JLabel.override file in a text editor, and remove this line:
<addedEObjects xsi:type="jcm:BeanDecorator" beanLocation="LOCAL"/>
The same goes for the Label.override in the awt directory.
For the fix we compromised by making Labels have a global field, but not
a get method (will be initialized in the parent's method.) For
manipulation of labels after the construction, in events, etc, you can
change the global field directly, rather than the usual get methods
employed by the VE code pattern.
Eventually we hope to have a refactoring so that any given bean can be
promoted to having its own field and get method, or demoted to being
initialized in its parent's method.
- Jeff
Mark George wrote:
> Hi.
>
> I just tried the latest stream integration build (S20040628) and noticed
> something that will cause problems for my students (we use Eclipse and
> the VE to teach Java at a University).
>
> Labels (both swing and AWT) are always declared inside the
> getJContentPane method and there is no corresponding getLabel method.
>
> This means that labels are no longer accessible to the rest of the frame.
>
> While I can see that in most cases people don't need labels to be
> visible to the entire class there is some cases where you do (in my case
> trivial programs for teaching purposes).
>
> This is a recent change - M1 declares labels as fields. Is this
> intended behaviour? If so could you please add an option to the
> preferences to make labels "global" again?
>
> Regards,
>
> Mark George
|
|
|
Re: labels aren't declared as fields anymore [message #593296 is a reply to message #45233] |
Wed, 30 June 2004 22:39  |
Eclipse User |
|
|
|
Hi Mark,
Funny you should mention that, we just fixed that issue today. It'll be
in the next stable build (most likely the M2 build in a couple weeks).
If you'd like to fix it yourself before then, go to the
eclipse\plugins\org.eclipse.ve.jfc_1.0.0\overrides\javax\swi ng directory
and edit the JLabel.override file in a text editor, and remove this line:
<addedEObjects xsi:type="jcm:BeanDecorator" beanLocation="LOCAL"/>
The same goes for the Label.override in the awt directory.
For the fix we compromised by making Labels have a global field, but not
a get method (will be initialized in the parent's method.) For
manipulation of labels after the construction, in events, etc, you can
change the global field directly, rather than the usual get methods
employed by the VE code pattern.
Eventually we hope to have a refactoring so that any given bean can be
promoted to having its own field and get method, or demoted to being
initialized in its parent's method.
- Jeff
Mark George wrote:
> Hi.
>
> I just tried the latest stream integration build (S20040628) and noticed
> something that will cause problems for my students (we use Eclipse and
> the VE to teach Java at a University).
>
> Labels (both swing and AWT) are always declared inside the
> getJContentPane method and there is no corresponding getLabel method.
>
> This means that labels are no longer accessible to the rest of the frame.
>
> While I can see that in most cases people don't need labels to be
> visible to the entire class there is some cases where you do (in my case
> trivial programs for teaching purposes).
>
> This is a recent change - M1 declares labels as fields. Is this
> intended behaviour? If so could you please add an option to the
> preferences to make labels "global" again?
>
> Regards,
>
> Mark George
|
|
|
Powered by
FUDForum. Page generated in 0.07444 seconds