Bug 26671 - Convertors should have "update" method to reread state of an object
Convertors should have "update" method to reread state of an object
Status: NEW
Product: platform
Classification: Unclassified
Component: -- Other --
3.x
PC Linux
: P2 (vote)
: TBD
Assigned To: issues@platform
issues@platform
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2002-08-21 08:55 UTC by Jaroslav Tulach
Modified: 2010-04-01 14:43 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
:


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.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo