Skip to main content



      Home
Home » Archived » Visual Editor (VE) » labels aren't declared as fields anymore
labels aren't declared as fields anymore [message #45233] Wed, 30 June 2004 20:27 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:labels aren't declared as fields anymore
Next Topic:Layout question
Goto Forum:
  


Current Time: Thu May 22 08:11:59 EDT 2025

Powered by FUDForum. Page generated in 0.04838 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top