Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Clearing out the bean info caches
Clearing out the bean info caches [message #123855] Wed, 26 April 2006 13:34 Go to next message
Darren Hurt is currently offline Darren HurtFriend
Messages: 91
Registered: July 2009
Member
After making changes in the bean info of a project, the changes do not take
effect, even if I shutdown and restart eclipse.

After reading around a bit I found the following:

'Bring up a ve at least once and close it. (The following won't work
until there has been at least one VE opened in a session). Then close
all open editors, select Project->Clean...->Clean All. This will clear
out all Beaninfo caches.
For now it is important that all VE's are closed when you do this
because there is a bug that if a VE is open you would get some errors'

This does work, but I have a lot of large projects in my workspace, and
rebuilding is a time consuming process.
Often I have only made a small change to one bean info class, but still have
to go through
this process in order to test this small change.
My question is

Is there any quicker or more finer grained way of getting the bean info
caches to update?
Re: Clearing out the bean info caches [message #123869 is a reply to message #123855] Wed, 26 April 2006 13:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jefmyers.us.ibm.com

Darren,

The quick and dirty way to do this is to go to your workspace's
..metadata/.plugins/org.eclipse.jem.beaninfo directory and delete the
..cache directory. It'll be recreated next time you open the VE.

- Jeff
Re: Clearing out the bean info caches [message #123881 is a reply to message #123869] Wed, 26 April 2006 13:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jefmyers.us.ibm.com

Oh, and if you are changing beaninfo in your own project, you may need
to remove the .cache folder in
..metadata\.plugins\org.eclipse.core.resources\.projects\<your
project>\org.eclipse.jem.beaninfo too.

- Jeff
Re: Clearing out the bean info caches [message #123892 is a reply to message #123881] Wed, 26 April 2006 13:53 Go to previous messageGo to next message
Darren Hurt is currently offline Darren HurtFriend
Messages: 91
Registered: July 2009
Member
Thanks for the rapid response.
This sounds like just the thing I need.
Quick and dirty certainly beats slow and clean in this example.

Darren



"Jeff Myers" <jefmyers@us.ibm.com> wrote in message
news:e2ntev$dqi$1@utils.eclipse.org...
> Oh, and if you are changing beaninfo in your own project, you may need to
> remove the .cache folder in
> .metadata\.plugins\org.eclipse.core.resources\.projects\<your
> project>\org.eclipse.jem.beaninfo too.
>
> - Jeff
Re: Clearing out the bean info caches [message #123929 is a reply to message #123855] Wed, 26 April 2006 14:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Actually I'm interested in finding out why it didn't detect the changes.
Are the BeanInfo classes in your project itself instead of in a jar
through the BeanInfo contribution extension point?

If it is, then that is one hole we have. We don't know when those
beaninfo changes. We only know if the class the Beaninfo is for is
changed or the contribution point's jar changes.

--
Thanks,
Rich Kulp
Re: Clearing out the bean info caches [message #123981 is a reply to message #123929] Thu, 27 April 2006 09:23 Go to previous messageGo to next message
Darren Hurt is currently offline Darren HurtFriend
Messages: 91
Registered: July 2009
Member
Hi Rich.

The case I have is a little complicated I suppose, and it relates to
our previous conversations on asked you previously on the ve-dev
mailing list.

The bean-info classes reside in a Java project in the workspace (let's call
it MyProject).
I have created a classpath container in a plug-in that also contributes all
other custom design
time behaviour via XMI files.
This classpath container contains MyProject in its classpath entries.

All projects that wish to use the visual components I have will include this
container in their dependencies (straight java dependencies rather than bean
info of course).
I currently make the assumption that users have MyProject loaded.

When I change the bean info classes, the Visual editor certainly doesn't
update the bean info information,
even if I restart eclipse.
Ideally I would expect the changes to be picked up, and any open editors to
restart their vm's etc.

At present, it seems that I have to clear the caches (Jeff's quick and dirty
method), and then restart eclipse.
This is still quicker than rebuilding all of my projects (there are many).









"Rich Kulp" <richkulp@us.NO_SPAM.ibm.com> wrote in message
news:e2nutm$mav$2@utils.eclipse.org...
> Actually I'm interested in finding out why it didn't detect the changes.
> Are the BeanInfo classes in your project itself instead of in a jar
> through the BeanInfo contribution extension point?
>
> If it is, then that is one hole we have. We don't know when those beaninfo
> changes. We only know if the class the Beaninfo is for is changed or the
> contribution point's jar changes.
>
> --
> Thanks,
> Rich Kulp
Re: Clearing out the bean info caches [message #124369 is a reply to message #123981] Fri, 05 May 2006 15:47 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

In your case we don't know they changed. Currently the timestamps of the
beaninfo classes themselves are not maintained in the cache. Only the
timestamps of the classes that the beaninfo is for (i.e. if you have a
XYZabcBeanInfo class, and an XYZabc class, we check the timestamp for
XYZabc, not for XYZabcBeanInfo class). This is because our current way
of doing most beaninfo contributions is from the plugin.xml file. So if
the eclipse configuration is changed we clear the beaninfo cache (except
if the timestamp of the class as noted above changes). but changing the
beaninfo for a file a project is not detected.

This tells me what more we need to check in the future to see if the
cache is stale.

Thanks,
Rich

--
Thanks,
Rich Kulp
Re: Clearing out the bean info caches [message #612756 is a reply to message #123855] Wed, 26 April 2006 13:40 Go to previous message
Jeff Myers is currently offline Jeff MyersFriend
Messages: 396
Registered: July 2009
Senior Member
Darren,

The quick and dirty way to do this is to go to your workspace's
..metadata/.plugins/org.eclipse.jem.beaninfo directory and delete the
..cache directory. It'll be recreated next time you open the VE.

- Jeff
Re: Clearing out the bean info caches [message #612758 is a reply to message #123869] Wed, 26 April 2006 13:43 Go to previous message
Jeff Myers is currently offline Jeff MyersFriend
Messages: 396
Registered: July 2009
Senior Member
Oh, and if you are changing beaninfo in your own project, you may need
to remove the .cache folder in
..metadata\.plugins\org.eclipse.core.resources\.projects\<your
project>\org.eclipse.jem.beaninfo too.

- Jeff
Re: Clearing out the bean info caches [message #612760 is a reply to message #123881] Wed, 26 April 2006 13:53 Go to previous message
Darren Hurt is currently offline Darren HurtFriend
Messages: 91
Registered: July 2009
Member
Thanks for the rapid response.
This sounds like just the thing I need.
Quick and dirty certainly beats slow and clean in this example.

Darren



"Jeff Myers" <jefmyers@us.ibm.com> wrote in message
news:e2ntev$dqi$1@utils.eclipse.org...
> Oh, and if you are changing beaninfo in your own project, you may need to
> remove the .cache folder in
> .metadata\.plugins\org.eclipse.core.resources\.projects\<your
> project>\org.eclipse.jem.beaninfo too.
>
> - Jeff
Re: Clearing out the bean info caches [message #612765 is a reply to message #123855] Wed, 26 April 2006 14:08 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Actually I'm interested in finding out why it didn't detect the changes.
Are the BeanInfo classes in your project itself instead of in a jar
through the BeanInfo contribution extension point?

If it is, then that is one hole we have. We don't know when those
beaninfo changes. We only know if the class the Beaninfo is for is
changed or the contribution point's jar changes.

--
Thanks,
Rich Kulp
Re: Clearing out the bean info caches [message #612772 is a reply to message #123929] Thu, 27 April 2006 09:23 Go to previous message
Darren Hurt is currently offline Darren HurtFriend
Messages: 91
Registered: July 2009
Member
Hi Rich.

The case I have is a little complicated I suppose, and it relates to
our previous conversations on asked you previously on the ve-dev
mailing list.

The bean-info classes reside in a Java project in the workspace (let's call
it MyProject).
I have created a classpath container in a plug-in that also contributes all
other custom design
time behaviour via XMI files.
This classpath container contains MyProject in its classpath entries.

All projects that wish to use the visual components I have will include this
container in their dependencies (straight java dependencies rather than bean
info of course).
I currently make the assumption that users have MyProject loaded.

When I change the bean info classes, the Visual editor certainly doesn't
update the bean info information,
even if I restart eclipse.
Ideally I would expect the changes to be picked up, and any open editors to
restart their vm's etc.

At present, it seems that I have to clear the caches (Jeff's quick and dirty
method), and then restart eclipse.
This is still quicker than rebuilding all of my projects (there are many).









"Rich Kulp" <richkulp@us.NO_SPAM.ibm.com> wrote in message
news:e2nutm$mav$2@utils.eclipse.org...
> Actually I'm interested in finding out why it didn't detect the changes.
> Are the BeanInfo classes in your project itself instead of in a jar
> through the BeanInfo contribution extension point?
>
> If it is, then that is one hole we have. We don't know when those beaninfo
> changes. We only know if the class the Beaninfo is for is changed or the
> contribution point's jar changes.
>
> --
> Thanks,
> Rich Kulp
Re: Clearing out the bean info caches [message #612832 is a reply to message #123981] Fri, 05 May 2006 15:47 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

In your case we don't know they changed. Currently the timestamps of the
beaninfo classes themselves are not maintained in the cache. Only the
timestamps of the classes that the beaninfo is for (i.e. if you have a
XYZabcBeanInfo class, and an XYZabc class, we check the timestamp for
XYZabc, not for XYZabcBeanInfo class). This is because our current way
of doing most beaninfo contributions is from the plugin.xml file. So if
the eclipse configuration is changed we clear the beaninfo cache (except
if the timestamp of the class as noted above changes). but changing the
beaninfo for a file a project is not detected.

This tells me what more we need to check in the future to see if the
cache is stale.

Thanks,
Rich

--
Thanks,
Rich Kulp
Previous Topic:Eclipse VE and .NET VE
Next Topic:Allow hiding system generated code
Goto Forum:
  


Current Time: Thu Apr 25 17:44:44 GMT 2024

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

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

Back to the top