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 16567 - "Project opened" message truncates project name
Summary: "Project opened" message truncates project name
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: David Strupl
URL:
Keywords:
: 16527 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-10-15 14:57 UTC by _ rgreig
Modified: 2008-12-22 17:34 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Proposed patch (1.33 KB, patch)
2001-10-24 12:40 UTC, David Strupl
Details | Diff
New patch without the # replacement (2.90 KB, patch)
2001-10-25 10:54 UTC, David Strupl
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ rgreig 2001-10-15 14:57:46 UTC
Build 200110091653
Sun JDK 1.3.1 Win NT 4

If you create a new project from the Project Manager called (e.g.) "Transmit 
2.4", the project is created correctly however the text in the status
window (beside the workspace tabs) says "Project Transmit 2 opened."

I guess that it's looking for a "." in the project name.

I realise this might not appear a P3 issue but since it's one of the first
things most people do with the IDE it looks bad if it can't even display the
project name correctly.
Comment 1 Pavel Buzek 2001-10-17 10:14:07 UTC
using display name of node which contains full name, instead of name of data object
Comment 2 Vitezslav Stejskal 2001-10-17 12:14:23 UTC
It is OK for the display, but still will not work for the rename action, last part of the project folder 
name is considered to be an extension, which isn't returned from the getName(). Correctly we should 
rewrite the ProjectDataObject.getName() I think. Your fix is good, but solves the part of problem only.
Comment 3 Pavel Buzek 2001-10-17 16:53:36 UTC
This is actually a problem in DataFolder and possibly in RenameAction.
1. Creating DataFolder with . in name (e.g. foo.bar) creates 2 - foo and foo.bar. This is ok for project.
2. Rename action on foo.bar shows only foo as a name. If you change it in rename, next time rename shows 
already foo.ba2. Same applies to project.
Comment 4 Pavel Buzek 2001-10-19 15:29:03 UTC
second try ;-)
I changed DataFolder.getName() to return the name with extension
Comment 5 Pavel Buzek 2001-10-19 16:41:55 UTC
*** Issue 16527 has been marked as a duplicate of this issue. ***
Comment 6 Jiri Rechtacek 2001-10-19 16:57:47 UTC
The issue is partly fixed. I'm able to create folder a.b I'm able to
rename it to c.d but I'm not able to add new object to folder a.b by
TemplateWizard.
The steps:
1. create folder a.b
I can see: Filesystem --- something
                      --- a.b
2. select a.b a do New|Folder c
I can see: Filesystem --- something
                      --- a
                          --- c
                      --- a.b
Comment 7 David Strupl 2001-10-23 09:25:23 UTC
I will check the template wizard ...
Comment 8 David Strupl 2001-10-23 14:52:16 UTC
Seems rather complicated/risky.
Observation: TemplateWizard and TemplateWizard2 use a '.' delimited
string for storing and sharing file location.
I will try to attach patch for review.
Comment 9 Jan Zajicek 2001-10-23 15:31:38 UTC
Why was an older already started P2 closed as duplicate? Moreover the
duplicated issue is future qbuild stopper. So increasing prio to P2.
Comment 10 David Strupl 2001-10-24 12:40:17 UTC
Created attachment 3121 [details]
Proposed patch
Comment 11 Jaroslav Tulach 2001-10-24 14:43:52 UTC
1. Create a folder 1.2.3
2. Select it
3. Choose New from toolbar
4. Choose any template, select next

The folder 1.2.3 will not be selected. If you repeat these steps with
any other folder without dot in name, the selection will be made.

Comment 12 Jaroslav Tulach 2001-10-24 14:44:41 UTC
UI suggestion - in Directory use real name not # one... My $0.02
Comment 13 Jaroslav Tulach 2001-10-24 16:03:08 UTC
The more I think about it the uglier the # solution seems. Why not
improving just the string -> FileObject conversion?

convert :: FileObject, String Bool -> FileObject
convert fo s _
# r = fo.getFileObject (s);
| r != null = r;
# r = convert fo (s.substring (0, s.lastIndexOf ('.') - 1) false
| r != null = r;
= null;
convert fo s true
= fo.createFolder (s);

I know that this is not perfect, sometimes user cannot make the right
choice, but for common cases it will work ok. The bigger rewrite can
be done later.

Comment 14 David Strupl 2001-10-25 10:54:14 UTC
Created attachment 3131 [details]
New patch without the # replacement
Comment 15 David Strupl 2001-10-25 10:59:53 UTC
Sorry but I didn't understand the functional language you used - but
anyway I tried to get the idea.
With the new patch the file can be created under directory with dots.
The folder 1.2.3 is still not selected - this problem is in
TemplateWizard2.setTargetFolder(...) - I don't know what to do with
this case. Any help appreciated.
Should the new patch go in ???
Comment 16 David Strupl 2001-10-25 14:22:13 UTC
Now new files can be created in a.b.c directories. The only thing
remaining is the preselection of folders containg dots in TemplateWizard2.
Comment 17 David Strupl 2001-10-25 14:37:55 UTC
Marking this as fixed. Althought the TemplateWizard2 dialog might be
improved the main functionality concerning a.b.c directories is solved.
Comment 18 Marian Mirilovic 2001-12-12 12:50:18 UTC
verified in [nb_release330](200112102331)
Comment 19 Quality Engineering 2003-07-01 16:39:53 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.