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 152973 - Template rename causes it to disappear
Summary: Template rename causes it to disappear
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Favorites (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks: 153941
  Show dependency tree
 
Reported: 2008-11-11 17:21 UTC by Mikhail Matveev
Modified: 2009-02-19 22:53 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Matveev 2008-11-11 17:21:24 UTC
1. IDE main menu -> Tools -> Templates.
2. Select a template.
3. Rename the template.
4. Close the dialog.
5. Create a project which is able to use the changed template.
6. Right-click Source Packages and select New...
Result: the renamed template doesn't exist anymore.
Comment 1 Jesse Glick 2008-11-11 17:26:00 UTC
Wrong component.
Comment 2 mslama 2008-11-12 07:44:10 UTC
What build?
Comment 3 Mikhail Matveev 2008-11-12 13:53:20 UTC
The last FCS build.

Detailed system info:

Product Version: NetBeans IDE 6.5 (Build 200811100001)
Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)
Comment 4 Jiri Skrivanek 2008-11-14 08:59:19 UTC
Because I had fixed similar issue before, I tried it with java class template and it worked for me. Please, write down
really exact steps how to reproduce. Otherwise I tend to close it as "worksforme".

http://hg.netbeans.org/core-main/diff/7893ff771dee/favorites/src/org/netbeans/modules/favorites/templates/TemplatesPanel.java
Comment 5 Mikhail Matveev 2008-11-28 19:08:38 UTC
It's still reproducible in the last development build.

1. Create a Java Application project.
2. Right-click Source Packages and select the New submenu. Behold that Java Class... menu item is available.
3. IDE main menu -> Tools -> Templates.
4. Select a template: Java -> Java Class.
5. Rename the template (press F2 and type some new name).
6. Close the dialog.
7. Create a Java Application project.
8. Right-click Source Packages and select the New submenu. Now Java Class... menu item is unavailable.
Comment 6 Jiri Skrivanek 2008-12-01 08:00:26 UTC
It is not surprise that if you rename "Java Class" template to something else there is no more "Java Class" in the
submenu. I tried your steps and when I renamed the Java Class template to Class1.java, it is present in Java category in
the new file wizard. In the popup submenu are shown only priviledged templates and last used.
Comment 7 Mikhail Matveev 2008-12-01 13:39:56 UTC
In my opinion, if a template is "privileged", it should continue being privileged after renaming. It still does the
same, doesn't it?
Comment 8 Jiri Rechtacek 2008-12-04 15:22:33 UTC
fixed in core-main/rev/a678bf1ffb1b
Comment 9 Quality Engineering 2008-12-05 06:03:29 UTC
Integrated into 'main-golden', will be available in build *200812050201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a678bf1ffb1b
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #152973: Template rename causes it to disappear
Comment 10 Mikhail Matveev 2008-12-08 15:05:12 UTC
Verified
Comment 11 pgebauer 2009-01-12 13:05:38 UTC
The fix has been ported into the release65_fixes repository.

http://hg.netbeans.org/release65_fixes/rev/7b3faa35c6e9
Comment 12 Tomas Danek 2009-01-16 13:10:00 UTC
verified in 65patch2