Skip to main content



      Home
Home » Archived » Visual Editor (VE) » initialize() method not updated when components are added
initialize() method not updated when components are added [message #73563] Thu, 02 December 2004 19:28 Go to next message
Eclipse UserFriend
Originally posted by: rossetantispam-1.yahoo.com

Hello,
I have Eclipse 3.0.1 and Visual Editor 1.0.1. I have read the tutorial at:
http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /vep-home/WebContent/docs/demos/custom_field/FieldBean.html

I can create visual classes, I can see the code being generated, the visual
editor and the palette. I can add visual components. Getter methods are
generated. So far so good. The initialize() method is generated, but
nothings gets added to the initialize() method when a component is added.

E.g. if I add a JList, I would expect the generated code to be something
like:
private void initialize() {
this.setSize(300,200);
this.add(getJList());
}
private JList getJList() {
if (jList == null) {
jList = new JList();
jList.setSize(205, 141);
}
return jList;
}

Instead, the generated initialize() method is:
private void initialize() {
this.setSize(300,200);
}

If I save and close the visual class, then reopen it, no component is
displayed in the visual editor, even if I manually add the
this.add(getJList()); line in the initialize method.
I get the same result with Eclipse 3.1 and visual editor 1.0.1
Thanks for your help.
Re: initialize() method not updated when components are added [message #73581 is a reply to message #73563] Thu, 02 December 2004 19:40 Go to previous message
Eclipse UserFriend
Originally posted by: rossetantispam-1.yahoo.com

Never mind. I found the issue. I need to remove the EMF example plugin and
now things work fine.

Thanks.

"Sebastien Rosset" <rossetantispam-1@yahoo.com> wrote in message
news:cooc17$tmj$1@www.eclipse.org...
> Hello,
> I have Eclipse 3.0.1 and Visual Editor 1.0.1. I have read the tutorial at:
> http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /vep-home/WebContent/docs/demos/custom_field/FieldBean.html
>
> I can create visual classes, I can see the code being generated, the
> visual editor and the palette. I can add visual components. Getter methods
> are generated. So far so good. The initialize() method is generated, but
> nothings gets added to the initialize() method when a component is added.
>
> E.g. if I add a JList, I would expect the generated code to be something
> like:
> private void initialize() {
> this.setSize(300,200);
> this.add(getJList());
> }
> private JList getJList() {
> if (jList == null) {
> jList = new JList();
> jList.setSize(205, 141);
> }
> return jList;
> }
>
> Instead, the generated initialize() method is:
> private void initialize() {
> this.setSize(300,200);
> }
>
> If I save and close the visual class, then reopen it, no component is
> displayed in the visual editor, even if I manually add the
> this.add(getJList()); line in the initialize method.
> I get the same result with Eclipse 3.1 and visual editor 1.0.1
> Thanks for your help.
>
Re: initialize() method not updated when components are added [message #603618 is a reply to message #73563] Thu, 02 December 2004 19:40 Go to previous message
Eclipse UserFriend
Originally posted by: rossetantispam-1.yahoo.com

Never mind. I found the issue. I need to remove the EMF example plugin and
now things work fine.

Thanks.

"Sebastien Rosset" <rossetantispam-1@yahoo.com> wrote in message
news:cooc17$tmj$1@www.eclipse.org...
> Hello,
> I have Eclipse 3.0.1 and Visual Editor 1.0.1. I have read the tutorial at:
> http://dev.eclipse.org/viewcvs/indextools.cgi/%7Echeckout%7E /vep-home/WebContent/docs/demos/custom_field/FieldBean.html
>
> I can create visual classes, I can see the code being generated, the
> visual editor and the palette. I can add visual components. Getter methods
> are generated. So far so good. The initialize() method is generated, but
> nothings gets added to the initialize() method when a component is added.
>
> E.g. if I add a JList, I would expect the generated code to be something
> like:
> private void initialize() {
> this.setSize(300,200);
> this.add(getJList());
> }
> private JList getJList() {
> if (jList == null) {
> jList = new JList();
> jList.setSize(205, 141);
> }
> return jList;
> }
>
> Instead, the generated initialize() method is:
> private void initialize() {
> this.setSize(300,200);
> }
>
> If I save and close the visual class, then reopen it, no component is
> displayed in the visual editor, even if I manually add the
> this.add(getJList()); line in the initialize method.
> I get the same result with Eclipse 3.1 and visual editor 1.0.1
> Thanks for your help.
>
Previous Topic:Enhance VE or start with GEF?
Next Topic:Error trying to set new file into editor
Goto Forum:
  


Current Time: Sun Aug 31 06:08:47 EDT 2025

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

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

Back to the top