|
From: <no...@so...> - 2000-12-23 05:48:34
|
Bug #125840, was updated on 2000-Dec-14 17:14
Here is a current snapshot of the bug.
Project: jEdit
Category: plugins
Status: Open
Resolution: None
Bug Group: normal bug
Priority: 5
Submitted by: dstolerman
Assigned to : nobody
Summary: BufferList doesn't refresh when buffer name changes
Details: BufferList doesn't refresh the "Open Files" pane when a buffer is
saved with a new name, so is left with a row that can not be selected and a
buffer open that does not appear.
jEdit 3.0pre4, BufferList 0.2.1, jdk1.3, win 98
Follow-Ups:
Date: 2000-Dec-22 21:48
By: jgellene
Comment:
This is because the EditBus messages sent by buffer.saveAs() do not cause
BufferList to requery jEdit's list of buffers. A tailored solution would
be to create a new kind of BufferUpdate message, "SAVED_AS" and send it
after the saveAs operation substantially completes. BufferList could then
update its data upon receiving a SAVED_AS without changing the treatment of
other messages.
This would involve three changes, two to the editor core:
(1) In BufferUpdate add the following field:
public static final Object SAVED_AS = "SAVED_AS";
(2) In Buffer.saveAs(), send the message before returning:
boolean ret = save(view,files[0],rename);
EditBus.send(new BufferUpdate(this,BufferUpdate.SAVED_AS));
return ret;
(3) In BufferList.handleMessage(), begin as follows:
public void handleMessage(EBMessage message) {
if (message instanceof BufferUpdate) {
BufferUpdate bu = (BufferUpdate) message;
if ((bu.getWhat() == BufferUpdate.CREATED) ||
bu.getWhat() == BufferUpdate.CLOSED) ||
bu.getWhat() == BufferUpdate.SAVED_AS)) {
setNewModels();
} else if (bu.getWhat() == BufferUpdate.DIRTY_CHANGED) {
refresh();
}
If this is too much hacking to the editor core, then simply call
setNewModels() in response to a DIRTY_CHANGED message.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=125840&group_id=588
|