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 16234 - EditorCookie should inform that it is going to be invalid
Summary: EditorCookie should inform that it is going to be invalid
Status: VERIFIED DUPLICATE of bug 31101
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: David Konecny
URL:
Keywords: API
Depends on:
Blocks: 23762
  Show dependency tree
 
Reported: 2001-10-04 13:07 UTC by Svata Dedic
Modified: 2008-12-22 21:52 UTC (History)
2 users (show)

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 Svata Dedic 2001-10-04 13:07:11 UTC
Consider a situation when a code obtains a EditorCookie implementation and 
uses OpenAPI calls to manipulate it. It should be able to receive a 
notification when the DataObject goes away, which may be caused by an 
unrelated OpenAPI call. Currently the only supported change notification is 
send when the document open state changes.
If changed, it could support also a notification when the contents become 
modified or unmodified -- not all EditorCookies refer to a whole DataObject 
(so the SaveCookie cannot be used to supplement this change).
Comment 1 Jesse Glick 2001-10-08 11:04:18 UTC
I am setting milestone to 4.0 because this does not seem trivial to do
compatibly--for one thing, EditorCookie is an interface so either it
would need to be changed, or we make e.g. EditorCookie.Stateful or
something a subinterface. Anyway, move back to 3.4 (I guess not 3.3)
if you disagree.

I have noticed for a long time that CloneableEditorSupport has methods
add/removeChangeListener but these are not in EditorCookie! In
practice I have found these methods necessary for all sorts of
purposes. So if you build some support based on an EditorCookie you
need to cast it to CloneableEditorSupport in order to find out about
document reloads and similar things.

Re. Svata's requests--(1) I think if a data object is invalidated (is
this what you are talking about?) then stateChanged should be fired
from to change listeners; (2) if there is no DataObject/SaveCookie,
what precisely does "modified/unmodified" mean? It has to be related
to something outside the editor document itself IMHO.
Comment 2 mslama 2001-10-15 11:04:34 UTC
Reassign to new owner of openide/editor
Comment 3 Marian Mirilovic 2002-12-06 17:17:45 UTC
reassigne to David K., new owner of editor
Comment 4 David Konecny 2003-02-27 16:24:17 UTC
I think I just implemented this one.

*** This issue has been marked as a duplicate of 31101 ***
Comment 5 Marian Mirilovic 2003-07-21 16:14:23 UTC
verified - it's duplicate.