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 32481 - New submenu showing multiple copies of a last-used template
Summary: New submenu showing multiple copies of a last-used template
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Dialogs&Wizards (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords: SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2003-03-28 17:43 UTC by Jesse Glick
Modified: 2008-12-23 13:41 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot of problem (15.04 KB, image/png)
2003-03-28 17:43 UTC, Jesse Glick
Details
New screenshot - 3.5 Beta (20.08 KB, image/png)
2003-04-20 19:18 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2003-03-28 17:43:20 UTC
See screenshot. dev-030325. Obviously it should
only include a given template in the recently-used
list at most once (in the position corresponding
to the most recent use).
Comment 1 Jesse Glick 2003-03-28 17:43:49 UTC
Created attachment 9590 [details]
Screenshot of problem
Comment 2 Jiri Rechtacek 2003-04-01 16:27:52 UTC
It works for me, NewTemplateAction.isRecent() return if a template is
list ot not. If it contained in recent list that is not added more. It
works also with "API Test Script" template.
What build were you used when you saw it? This code has been changed 2
weeks ago.

Another issue is that recent list is not reordered to the positions
corresponding
to the most recent use. I'm going to file a issue about it.
Comment 3 Jesse Glick 2003-04-02 23:47:03 UTC
030325, as I say. Now I cannot reproduce it. Maybe just a result of
some temporary bad code that is now cleaned up?
Comment 4 Marian Mirilovic 2003-04-03 17:05:46 UTC
Jesse, I have never seen it , too.
Comment 5 Jiri Rechtacek 2003-04-09 13:47:45 UTC
I close as worksforme for now, if it reappears again, pls. reopen. Thanks.
Comment 6 Jesse Glick 2003-04-20 19:16:24 UTC
Happened to me again using NB 3.5 Beta (official download) with a
fresh user dir. Had installed apisupport NBMs, made a new Module JAR
from template, restarted, done it again. See screenshot. Still not
sure exactly how to reproduce.
Comment 7 Jesse Glick 2003-04-20 19:18:02 UTC
Created attachment 10047 [details]
New screenshot - 3.5 Beta
Comment 8 Jesse Glick 2003-06-11 20:30:50 UTC
Happened to us again in 3.5 release with JSP template. Still not sure
what the trigger condition is.
Comment 9 Tomas Brandalik 2003-06-16 11:03:53 UTC
Happened in Nevada final release as well. We need to fix it because
new ME release is based on nevada.
Comment 10 Jesse Glick 2003-06-18 01:09:16 UTC
I think I see it now. Start NB 3.5 w/ a fresh user dir. Expand
sampledir. File -> New, Other -> HTML File, select sampledir and name
"foo". Repeat with name "bar". Now right-click sampledir -> New and
you see "HTML File" listed twice.

NewTemplateAction.isRecent should probably use getRecentList(), not
use the raw variable recentList which may be out of date already. It
is is not cleared or recreated by addRecent for some reason - though
it certainly could be, without even needing to call
getRecentFolder().getChildren(). Using the context menu after adding a
recent item does recreate the list and prevent duplicated from being
added, it seems, but the Ctrl-N or File -> New style does not touch
the cached list.
Comment 11 Jiri Rechtacek 2003-08-25 11:10:34 UTC
fixed in maintrunk.
The recent list is read at first time and a flag recentChanged is
correctlly updated.
Comment 12 Marian Mirilovic 2004-03-19 14:39:25 UTC
verified in NB3.6 RC1