Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Problem importing existing code (Newbie)
Problem importing existing code (Newbie) [message #106869] Sat, 17 September 2005 06:51 Go to next message
Eclipse UserFriend
Originally posted by: HGSandhagen.web.de

Hello,

I am using Eclipse 3.1 and VE for some weeks and have a problem
importing existing code into a project. Example: I have a class derived
from JDialog. I imported it to my Ecplise project. All work fine, but
when I open the editor, I don't get the VE display. Generating a new
"Visual class" works fine.

I think VE needs a certain kind of code (Constructor without parameters,
"initialize" method, etc.). Where can I find information, what code is
necessary for VE to recognize a class as "Visual class"?

Hans-Gerd Sandhagen
Re: Problem importing existing code (Newbie) [message #106939 is a reply to message #106869] Sat, 17 September 2005 14:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

There is no specific pattern. We try to accept as much as possible. But
the least is that there is a method called initialize() which
initializes the class.

As an example of what it understands, create a subclass of JDialog
through the Visual Class wizard.

We want to try to handle as much as possible, so maybe you could send us
an example of your class that doesn't work so we can see if we maybe
could adapt our parsing to include it?

Hans-Gerd Sandhagen wrote:
> Hello,
>
> I am using Eclipse 3.1 and VE for some weeks and have a problem
> importing existing code into a project. Example: I have a class derived
> from JDialog. I imported it to my Ecplise project. All work fine, but
> when I open the editor, I don't get the VE display. Generating a new
> "Visual class" works fine.
>
> I think VE needs a certain kind of code (Constructor without parameters,
> "initialize" method, etc.). Where can I find information, what code is
> necessary for VE to recognize a class as "Visual class"?
>
> Hans-Gerd Sandhagen

--
Thanks,
Rich Kulp
Re: Problem importing existing code (Newbie) [message #106994 is a reply to message #106869] Sat, 17 September 2005 17:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

Hans-Gerd Sandhagen wrote:
> Hello,
>
> I am using Eclipse 3.1 and VE for some weeks and have a problem
> importing existing code into a project. Example: I have a class derived
> from JDialog. I imported it to my Ecplise project. All work fine, but
> when I open the editor, I don't get the VE display. Generating a new
> "Visual class" works fine.
>
> I think VE needs a certain kind of code (Constructor without parameters,
> "initialize" method, etc.). Where can I find information, what code is
> necessary for VE to recognize a class as "Visual class"?
>
> Hans-Gerd Sandhagen
It might be using the default .java editor when opening the file. Have
you tried right clicking on the class and selecting Open With->Visual
Editor?
Re: Problem importing existing code (Newbie) [message #107024 is a reply to message #106939] Sun, 18 September 2005 08:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: HGSandhagen.web.de

Thank you for help. It works with some little problems.
All this problems are not critical, but maybe you are interested.

1. I started the visual editor by right click/ Open with... -> it works
2. I created a content pane by context menu in VE, set border layout
and added the other panels -> it works

but:

- when I open another file and then select this class again, only the
Java editor is displayed. I have to open VE again with "Open with..." menu.

- Often an empty context pane is displayed when opening VE, but in the
"Java Beans" tree all controls are displayed. Pause and reload VE helps.

- I get the same problem with already working classes since I updated
for VE 1.1 to 1.1.0.1. Maybe this is the problem.

- I created a JComboBox and initializes it in constructor:

String text[] = {"text1", "text2",...};
combo = new JComboBox(text);

It was not displayed in VE (too complicated)

So I changed the code like this:

combo = new JComboBox();
for (int i=0; i<12;i++) {
comco.add(text[i],null);
}

It always says "combo = new JComboBox(text) too complicated"

I had to start Eclipse again to solve this problem.





Rich Kulp schrieb:
> There is no specific pattern. We try to accept as much as possible. But
> the least is that there is a method called initialize() which
> initializes the class.
>
> As an example of what it understands, create a subclass of JDialog
> through the Visual Class wizard.
>
> We want to try to handle as much as possible, so maybe you could send us
> an example of your class that doesn't work so we can see if we maybe
> could adapt our parsing to include it?
>
> Hans-Gerd Sandhagen wrote:
>
>> Hello,
>>
>> I am using Eclipse 3.1 and VE for some weeks and have a problem
>> importing existing code into a project. Example: I have a class
>> derived from JDialog. I imported it to my Ecplise project. All work
>> fine, but when I open the editor, I don't get the VE display.
>> Generating a new "Visual class" works fine.
>>
>> I think VE needs a certain kind of code (Constructor without
>> parameters, "initialize" method, etc.). Where can I find information,
>> what code is necessary for VE to recognize a class as "Visual class"?
>>
>> Hans-Gerd Sandhagen
>
>
Re: Problem importing existing code (Newbie) [message #107107 is a reply to message #107024] Mon, 19 September 2005 13:53 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Are there any errors in the .log file?

Do you have any other code installed other that Eclipse SDk 3.1, GEF
3.1, EMF 2.1, and VE 1.1.0.1?

--
Thanks,
Rich Kulp
Re: Problem importing existing code (Newbie) [message #610789 is a reply to message #106869] Sat, 17 September 2005 14:44 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

There is no specific pattern. We try to accept as much as possible. But
the least is that there is a method called initialize() which
initializes the class.

As an example of what it understands, create a subclass of JDialog
through the Visual Class wizard.

We want to try to handle as much as possible, so maybe you could send us
an example of your class that doesn't work so we can see if we maybe
could adapt our parsing to include it?

Hans-Gerd Sandhagen wrote:
> Hello,
>
> I am using Eclipse 3.1 and VE for some weeks and have a problem
> importing existing code into a project. Example: I have a class derived
> from JDialog. I imported it to my Ecplise project. All work fine, but
> when I open the editor, I don't get the VE display. Generating a new
> "Visual class" works fine.
>
> I think VE needs a certain kind of code (Constructor without parameters,
> "initialize" method, etc.). Where can I find information, what code is
> necessary for VE to recognize a class as "Visual class"?
>
> Hans-Gerd Sandhagen

--
Thanks,
Rich Kulp
Re: Problem importing existing code (Newbie) [message #610793 is a reply to message #106869] Sat, 17 September 2005 17:17 Go to previous message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
Hans-Gerd Sandhagen wrote:
> Hello,
>
> I am using Eclipse 3.1 and VE for some weeks and have a problem
> importing existing code into a project. Example: I have a class derived
> from JDialog. I imported it to my Ecplise project. All work fine, but
> when I open the editor, I don't get the VE display. Generating a new
> "Visual class" works fine.
>
> I think VE needs a certain kind of code (Constructor without parameters,
> "initialize" method, etc.). Where can I find information, what code is
> necessary for VE to recognize a class as "Visual class"?
>
> Hans-Gerd Sandhagen
It might be using the default .java editor when opening the file. Have
you tried right clicking on the class and selecting Open With->Visual
Editor?
Re: Problem importing existing code (Newbie) [message #610795 is a reply to message #106939] Sun, 18 September 2005 08:42 Go to previous message
Eclipse UserFriend
Originally posted by: HGSandhagen.web.de

Thank you for help. It works with some little problems.
All this problems are not critical, but maybe you are interested.

1. I started the visual editor by right click/ Open with... -> it works
2. I created a content pane by context menu in VE, set border layout
and added the other panels -> it works

but:

- when I open another file and then select this class again, only the
Java editor is displayed. I have to open VE again with "Open with..." menu.

- Often an empty context pane is displayed when opening VE, but in the
"Java Beans" tree all controls are displayed. Pause and reload VE helps.

- I get the same problem with already working classes since I updated
for VE 1.1 to 1.1.0.1. Maybe this is the problem.

- I created a JComboBox and initializes it in constructor:

String text[] = {"text1", "text2",...};
combo = new JComboBox(text);

It was not displayed in VE (too complicated)

So I changed the code like this:

combo = new JComboBox();
for (int i=0; i<12;i++) {
comco.add(text[i],null);
}

It always says "combo = new JComboBox(text) too complicated"

I had to start Eclipse again to solve this problem.





Rich Kulp schrieb:
> There is no specific pattern. We try to accept as much as possible. But
> the least is that there is a method called initialize() which
> initializes the class.
>
> As an example of what it understands, create a subclass of JDialog
> through the Visual Class wizard.
>
> We want to try to handle as much as possible, so maybe you could send us
> an example of your class that doesn't work so we can see if we maybe
> could adapt our parsing to include it?
>
> Hans-Gerd Sandhagen wrote:
>
>> Hello,
>>
>> I am using Eclipse 3.1 and VE for some weeks and have a problem
>> importing existing code into a project. Example: I have a class
>> derived from JDialog. I imported it to my Ecplise project. All work
>> fine, but when I open the editor, I don't get the VE display.
>> Generating a new "Visual class" works fine.
>>
>> I think VE needs a certain kind of code (Constructor without
>> parameters, "initialize" method, etc.). Where can I find information,
>> what code is necessary for VE to recognize a class as "Visual class"?
>>
>> Hans-Gerd Sandhagen
>
>
Re: Problem importing existing code (Newbie) [message #610801 is a reply to message #107024] Mon, 19 September 2005 13:53 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Are there any errors in the .log file?

Do you have any other code installed other that Eclipse SDk 3.1, GEF
3.1, EMF 2.1, and VE 1.1.0.1?

--
Thanks,
Rich Kulp
Previous Topic:VE framework for MDA - UI specific PIM (is it possible!)
Next Topic:xswt persistence
Goto Forum:
  


Current Time: Thu Apr 25 05:33:48 GMT 2024

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

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

Back to the top