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

Summary: Convertors should have "update" method to reread state of an object
Product: platform Reporter: Jaroslav Tulach <jtulach>
Component: -- Other --Assignee: issues@platform <issues>
Status: RESOLVED WONTFIX    
Severity: blocker    
Priority: P2    
Version: 3.x   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

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.