Home » Archived » Visual Editor (VE) » Problem importing existing code (Newbie)
Problem importing existing code (Newbie) [message #106869] |
Sat, 17 September 2005 06:51 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 #610789 is a reply to message #106869] |
Sat, 17 September 2005 14:44 |
Eclipse User |
|
|
|
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 #610795 is a reply to message #106939] |
Sun, 18 September 2005 08:42 |
Eclipse User |
|
|
|
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
>
>
|
|
| |
Goto Forum:
Current Time: Thu Apr 25 05:33:48 GMT 2024
Powered by FUDForum. Page generated in 0.04073 seconds
|