Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 122038 - "Last Edit" button dangerously duplicates buffer of html files
"Last Edit" button dangerously duplicates buffer of html files
Status: RESOLVED FIXED
Product: web
Classification: Unclassified
Component: HTML Editor
6.x
All All
: P2 (vote)
: 6.x
Assigned To: issues@web
Jindrich Sedek
release60_fixes_candidate1, release60...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-15 17:06 UTC by _ rkusterer
Modified: 2009-05-18 10:47 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
"last change" button causes, duplicated buffers, broken icons. (37.17 KB, image/png)
2007-11-15 17:10 UTC, _ rkusterer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkusterer 2007-11-15 17:06:04 UTC
I have several files open (most of the HTML files under CVS). I edit one of the open files, and move the caret around in
it. I have not yet saved my changes. When I now click the "Last Edit" button, I get a NEW buffer of the file, and the
caret jumps to the edited line in the new buffer. (two buffers with same title are visible in screenshot)

But the file is already open, it should not be duplicated! Having two buffers with the same file is dangerous, because
they do not appear to be in sync. If I make changes in both, and then close one of them, will they overwrite each other?

Then when I use this button several times in a row, and jump from file to file, some files end up with the "Go
back/Forward" editor buttons broken. The buttons show as text in one buffer, while they are icons in other buffers.
(also visible in screenshot)

Sometimes I end up in a state where a file is marked as modified (asterisk in title), but I cannot save any changes
(Save menu item is disabled), because I already saved (and closed) the duplicate buffer, and the second buffer is in an
inconsistent state now.

I noticed that with Java files this bug never happened, but with HTML it happens so often that I no longer use the
button anymore. The bug is still there in RC1.
Comment 1 _ rkusterer 2007-11-15 17:10:51 UTC
Created attachment 53066 [details]
"last change" button causes, duplicated buffers, broken icons.
Comment 2 Vitezslav Stejskal 2007-11-15 17:36:08 UTC
I'm not sure who implements support for wsdl files, but whoever they are they should fixed their DataObject's lookup.
I'm pretty sure their Lookup is missing an EditorCookie. This would explain both the broken visual appearance of the
buttons and broken navigation. The navigation actions are the same for all file types (and work for most of the file
types) and rely on EditorCookie.
Comment 3 Lukas Jungmann 2007-11-15 18:11:04 UTC
=>xml/wsdl
Comment 4 Shivanand Kini 2007-11-15 18:31:12 UTC
For wsdl files, it works fine.

The bug description cleary mentions that this occurs for html files. Assigning to the html component.
Comment 5 David Konecny 2007-11-19 11:49:18 UTC
Checking in src/org/netbeans/modules/html/HtmlDataObject.java
new revision: 1.34; previous revision: 1.33
Comment 6 _ rkusterer 2007-11-21 19:19:21 UTC
I just tried the RC2
- OK the icons are no longer broken
- It still opens a second buffer for an already open file. (reproducibly)
Comment 7 David Konecny 2007-11-22 08:05:13 UTC
Target Milestone = Dev that means it was fixed only in trunk and not in NB6. I afraid it is too late to get this fix
into NB6. Although it has higher priority then P3.
Comment 8 pgebauer 2007-12-03 14:46:28 UTC
The fix has been ported into the release60_fixes branch.

Checking in HtmlDataObject.java;
/cvs/html/src/org/netbeans/modules/html/HtmlDataObject.java,v  <--  HtmlDataObject.java
new revision: 1.33.4.1; previous revision: 1.33
done


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