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 144353 - Project Name in Rename Project dialog should not contain "(jar)" suffix
Summary: Project Name in Rename Project dialog should not contain "(jar)" suffix
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
: 163044 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-19 10:16 UTC by Jaromir Uhrik
Modified: 2009-09-29 16:07 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot attached... (7.68 KB, image/png)
2008-08-19 10:20 UTC, Jaromir Uhrik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaromir Uhrik 2008-08-19 10:16:47 UTC
Product Version: NetBeans IDE Dev (Build 200808190201)
Java: 1.5.0_12; Java HotSpot(TM) Client VM 1.5.0_12-b04
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)

-create new project PRJ1 (Maven > Maven Project > Maven Quickstart Archetype)
-in Projects view invoke popup menu on this project's top node and invoke Rename...
-The Rename Project dialog appears
-->> The Project Name field contains PRJ1(jar) so that when a user wants to rename it to PRJ1_NEW then it is common to
add _NEW to the end. But in this case it is renamed to PRJ1(jar)_NEW. Even if Also Rename Project Folder is checked then
the project folder is renamed from .../PRJ1 to .../PRJ1(jar)_NEW
Comment 1 Jaromir Uhrik 2008-08-19 10:20:06 UTC
Created attachment 67773 [details]
Screenshot attached...
Comment 2 Milos Kleint 2008-08-22 12:14:00 UTC
well, I think I've already checked this one before.

The problem is that the rename infrastructure is making wrong assumptions.
1. The project name is a vaguely defined thing, boils down to ProjectInformation.getDisplayName()
2. then in turn it assumes the displayname equals the folder that the project resides in.

the display name in maven project is not derived from the folder name (as is in j2se project), but from <name> element
in project pom.

The packaging in display name is important, cannot remove it. I could actually avoid the package name in
ProjectInformaiton.getDisplayName() and only use it in the project's root node, but other UI that's using just the
ProjectInformation class will show different info from the projects view.

IMHO more likely an issue with the rename infrastructure and UI. In case of "also rename folder" it makes sense to use
ProjectInformation.getName() rather then getDisplayName().

Alternatively the maven support shall implement it's own version of the rename project UI.


Comment 3 Milos Kleint 2009-04-20 07:49:50 UTC
*** Issue 163044 has been marked as a duplicate of this issue. ***
Comment 4 Milos Kleint 2009-09-29 16:07:18 UTC
fixed by http://hg.netbeans.org/main/rev/6ac8cc588638