This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 26671 - Convertors should have "update" method to reread state of an object
Summary: Convertors should have "update" method to reread state of an object
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: issues@platform
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-21 08:55 UTC by Jaroslav Tulach
Modified: 2016-05-25 05:59 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2002-08-21 08:55:04 UTC
Right now, if a .settings file is changed, the
object produced by its IDO is recreated. There is
probably no other way for objects that are
java.io.Serializable, but for those that are
java.io.Externalizable or have their own convertor
we should offer a way to just update the state of
the old instance and don't recreate new one.

Usecase for accessing options: A module wants to
access its settings:
setting = (MySetting1)new
javax.naming.InitialContext ().lookup
("Settings/org/nb/modules/mymodule/Settings1");
setting.addPropertyChangeListener (...);

This seems like the easiest way to be notified
about changes of settings, but it requires the
"settings" object to be updated if content of
.settings file changes.


Suggestion:
Let's add a method like "Object update (Object
previous, Reader r)" to convertors that by default
calls read (r), but could be overriden to do keep
and update the old instance.
Comment 1 Antonin Nebuzelsky 2008-04-15 17:15:57 UTC
Reassigning to new module owner jskrivanek.