Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Keeping beans and BeanInfo classes in different packages in the same project
Keeping beans and BeanInfo classes in different packages in the same project [message #126886] Fri, 23 June 2006 11:40 Go to next message
Eclipse UserFriend
Originally posted by: rashmi_h_r.rediffmail.com

Hi All,
I am trying to seperate my Bean classes(Component classes) from the
Bean-Info classes into different packages in the same project.
According to the tutorial

http://publib.boulder.ibm.com/infocenter/rtnlhelp/v6r0m0/ind ex.jsp?topic=/org.eclipse.ve.doc/topics/tve_beaninfo_diffpkg .html

I tried to set the beaninfo path pointing to the package that contains all
the beaninfo classes. But the Eclipse VE is not picking up any of my
beaninfo classes. Non of my property editors are set and my property
categorisation is also not reflected. Can anybody please help me resolve
this. And tell me how to go about his task.
Thank You and Regards,
Rashmi H.R
Re: Keeping beans and BeanInfo classes in different packages in the same project [message #126924 is a reply to message #126886] Fri, 23 June 2006 16:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

We cache information and we didn't really take into consideration
someone supplying the beaninfo from a project. Must developers are using
the extension article to do this:

http://eclipse.org/articles/Article-VE-Custom-Widget/customw idget.html

It could be that the cache needs to be cleared because you changed the
beaninfo. We don't have checks in for change of beaninfo in a project.
To clear the cache:

1) Open a VE and then close it and all VE's.
2) Hit Porject->Clean...->Clean all, and wait for build to finish.
3) Open your VE. The cache should now be cleared and it should find your
beaninfo now.

Rashmi H.R wrote:
> Hi All,
> I am trying to seperate my Bean classes(Component classes) from the
> Bean-Info classes into different packages in the same project. According
> to the tutorial
> http://publib.boulder.ibm.com/infocenter/rtnlhelp/v6r0m0/ind ex.jsp?topic=/org.eclipse.ve.doc/topics/tve_beaninfo_diffpkg .html
>
>
> I tried to set the beaninfo path pointing to the package that contains
> all the beaninfo classes. But the Eclipse VE is not picking up any of my
> beaninfo classes. Non of my property editors are set and my property
> categorisation is also not reflected. Can anybody please help me resolve
> this. And tell me how to go about his task.
> Thank You and Regards,
> Rashmi H.R
>

--
Thanks,
Rich Kulp
Re: Keeping beans and BeanInfo classes in different packages in the same project [message #127022 is a reply to message #126924] Mon, 26 June 2006 09:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rashmi_h_r.rediffmail.com

Hi Rich,
Thanks for the reply. In the tutorial mentioned
" http://www.eclipse.org/articles/Article-VE-Custom-Widget/cus tomwidget.html"

Under the heading "Enumerated values for the type property" it says

"The Bean Info specification allows for a class with the same name as
its Java peer to exist that describes the edit time behavior of the class.
For example, the tutorial class is named MyCustomPrompter so there would
be a class MyCustomPrompterBeanInfo that implements the interface
java.beans.BeanInfo associated with it. The simplest way to create this
class is to put it in the same package as the class it describes (e.g.
org.eclipse.ve.example.customwidget) . Strictly speaking this isn't good
physical separation of behaviors as the BeanInfo classes should be kept
apart from the runtime in a separate package and separate jar so they
don't become part of the end user's actual deployment configuration. The
Visual Editor does support scenarios where the BeanInfo is in separate
packages and separate jars, however for the purpose of this tutorial the
class org.eclipse.ve.examples.customwidget.MyCustomPrompterBeanInf o will
be created that extends the abstract superclass java.beans.SimpleBeanInfo."

Accordingly I have separated my beaninfos into one package and my bean
classes into another package in the same project Like
'MyCustomPrompterBeanInfo' in one package called 'com.beanInfo' and
'MyCustomPrompter.java' in to 'com.bean' package.

I have cleared all caches as suggested by you. Also I have cleaned the
metadata folder too for both the workspace and the runtime workbench.
I have set the bean info path also in the project properties as mentioned
in the tutorial and help of V.E.
The V.E is still not able to recognize the bean-info and render the bean
properties accordingly.
Can you please advise what are the steps to be taken?

Thanks in advance,
Regards,
Rashmi H.R
Re: Keeping beans and BeanInfo classes in different packages in the same project [message #127048 is a reply to message #127022] Mon, 26 June 2006 14:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Are you trying to create a VE plugin for your class, like the custom
widget tutorial is doing? If you are then using the beaninfo tab on the
properties page is not going to work. When creating a custom VE plugin
for a widget you need to use the plugin.xml extension as detailed in the
customization tutorial.


--
Thanks,
Rich Kulp
Re: Keeping beans and BeanInfo classes in different packages in the same project [message #127076 is a reply to message #127048] Tue, 27 June 2006 08:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rashmi_h_r.rediffmail.com

Hi Rich,
Thanks for the reply. I tried the customization tutorial given in the
Eclipse Help under the heading 'Controlling BeanInfo information for
plug-in developers'

The above tutorial gives the example as

<extension point="org.eclipse.jem.beaninfo.registrations">
<variable path="MY_JAVABEANS">
<beaninfos>
<beaninfo kind="plugin" path="/com.mycompany/myjavabeans.jar">
<searchpath package="com.mycompany.beaninfopackage"/>
</beaninfo>
</beaninfos>
</variable>
</extension>

But, using the above gave a warning that 'Element variable is not a legal
child of Element extension' .And the beanInfos were not recognized.
I tried one more example given under the extension point description for
'BeanInfo Extension Registrations', which is as below

<extension point="org.eclipse.jem.beaninfo.registration">
<registration container="VE_CONTAINER">
<beaninfo path="xyzbeaninfo.jar">
<searchpath package="com.xyz.beaninfo"/>
<searchpath package="com.xyz.qxr.beaninfo"/>
</beaninfo>
</registration>
</extension>

The above extension point example worked.

Thanks You,
Regards
Rashmi H.R
Re: Keeping beans and BeanInfo classes in different packages in the same project [message #127103 is a reply to message #127076] Tue, 27 June 2006 14:43 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

AHH! That tutorial is so old I didn't realize it was still out there! :-(

This is the latest tutorial:

http://eclipse.org/articles/Article-VE-Custom-Widget/customw idget.html

--
Thanks,
Rich Kulp
Re: Keeping beans and BeanInfo classes in different packages in the same project [message #613403 is a reply to message #126886] Fri, 23 June 2006 16:07 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

We cache information and we didn't really take into consideration
someone supplying the beaninfo from a project. Must developers are using
the extension article to do this:

http://eclipse.org/articles/Article-VE-Custom-Widget/customw idget.html

It could be that the cache needs to be cleared because you changed the
beaninfo. We don't have checks in for change of beaninfo in a project.
To clear the cache:

1) Open a VE and then close it and all VE's.
2) Hit Porject->Clean...->Clean all, and wait for build to finish.
3) Open your VE. The cache should now be cleared and it should find your
beaninfo now.

Rashmi H.R wrote:
> Hi All,
> I am trying to seperate my Bean classes(Component classes) from the
> Bean-Info classes into different packages in the same project. According
> to the tutorial
> http://publib.boulder.ibm.com/infocenter/rtnlhelp/v6r0m0/ind ex.jsp?topic=/org.eclipse.ve.doc/topics/tve_beaninfo_diffpkg .html
>
>
> I tried to set the beaninfo path pointing to the package that contains
> all the beaninfo classes. But the Eclipse VE is not picking up any of my
> beaninfo classes. Non of my property editors are set and my property
> categorisation is also not reflected. Can anybody please help me resolve
> this. And tell me how to go about his task.
> Thank You and Regards,
> Rashmi H.R
>

--
Thanks,
Rich Kulp
Re: Keeping beans and BeanInfo classes in different packages in the same project [message #613411 is a reply to message #126924] Mon, 26 June 2006 09:26 Go to previous message
Eclipse UserFriend
Originally posted by: rashmi_h_r.rediffmail.com

Hi Rich,
Thanks for the reply. In the tutorial mentioned
" http://www.eclipse.org/articles/Article-VE-Custom-Widget/cus tomwidget.html"

Under the heading "Enumerated values for the type property" it says

"The Bean Info specification allows for a class with the same name as
its Java peer to exist that describes the edit time behavior of the class.
For example, the tutorial class is named MyCustomPrompter so there would
be a class MyCustomPrompterBeanInfo that implements the interface
java.beans.BeanInfo associated with it. The simplest way to create this
class is to put it in the same package as the class it describes (e.g.
org.eclipse.ve.example.customwidget) . Strictly speaking this isn't good
physical separation of behaviors as the BeanInfo classes should be kept
apart from the runtime in a separate package and separate jar so they
don't become part of the end user's actual deployment configuration. The
Visual Editor does support scenarios where the BeanInfo is in separate
packages and separate jars, however for the purpose of this tutorial the
class org.eclipse.ve.examples.customwidget.MyCustomPrompterBeanInf o will
be created that extends the abstract superclass java.beans.SimpleBeanInfo."

Accordingly I have separated my beaninfos into one package and my bean
classes into another package in the same project Like
'MyCustomPrompterBeanInfo' in one package called 'com.beanInfo' and
'MyCustomPrompter.java' in to 'com.bean' package.

I have cleared all caches as suggested by you. Also I have cleaned the
metadata folder too for both the workspace and the runtime workbench.
I have set the bean info path also in the project properties as mentioned
in the tutorial and help of V.E.
The V.E is still not able to recognize the bean-info and render the bean
properties accordingly.
Can you please advise what are the steps to be taken?

Thanks in advance,
Regards,
Rashmi H.R
Re: Keeping beans and BeanInfo classes in different packages in the same project [message #613413 is a reply to message #127022] Mon, 26 June 2006 14:07 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Are you trying to create a VE plugin for your class, like the custom
widget tutorial is doing? If you are then using the beaninfo tab on the
properties page is not going to work. When creating a custom VE plugin
for a widget you need to use the plugin.xml extension as detailed in the
customization tutorial.


--
Thanks,
Rich Kulp
Re: Keeping beans and BeanInfo classes in different packages in the same project [message #613415 is a reply to message #127048] Tue, 27 June 2006 08:52 Go to previous message
Eclipse UserFriend
Originally posted by: rashmi_h_r.rediffmail.com

Hi Rich,
Thanks for the reply. I tried the customization tutorial given in the
Eclipse Help under the heading 'Controlling BeanInfo information for
plug-in developers'

The above tutorial gives the example as

<extension point="org.eclipse.jem.beaninfo.registrations">
<variable path="MY_JAVABEANS">
<beaninfos>
<beaninfo kind="plugin" path="/com.mycompany/myjavabeans.jar">
<searchpath package="com.mycompany.beaninfopackage"/>
</beaninfo>
</beaninfos>
</variable>
</extension>

But, using the above gave a warning that 'Element variable is not a legal
child of Element extension' .And the beanInfos were not recognized.
I tried one more example given under the extension point description for
'BeanInfo Extension Registrations', which is as below

<extension point="org.eclipse.jem.beaninfo.registration">
<registration container="VE_CONTAINER">
<beaninfo path="xyzbeaninfo.jar">
<searchpath package="com.xyz.beaninfo"/>
<searchpath package="com.xyz.qxr.beaninfo"/>
</beaninfo>
</registration>
</extension>

The above extension point example worked.

Thanks You,
Regards
Rashmi H.R
Re: Keeping beans and BeanInfo classes in different packages in the same project [message #613417 is a reply to message #127076] Tue, 27 June 2006 14:43 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

AHH! That tutorial is so old I didn't realize it was still out there! :-(

This is the latest tutorial:

http://eclipse.org/articles/Article-VE-Custom-Widget/customw idget.html

--
Thanks,
Rich Kulp
Previous Topic:How to know which visual class is opened by visual editor currently
Next Topic:ButtonGroup, how to add a button
Goto Forum:
  


Current Time: Sat Sep 21 15:49:58 GMT 2024

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

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

Back to the top