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 128359 - duplicate entries from Add existing items from Folders
Summary: duplicate entries from Add existing items from Folders
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Thomas Preisler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-25 21:35 UTC by Thomas Preisler
Modified: 2011-03-31 23:26 UTC (History)
1 user (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 Thomas Preisler 2008-02-25 21:35:37 UTC
From CR 6652651:

I attempted to add /usr/local/lib directory to Projects directories.
"Add existing items from Folders" looked like the right thing to try.
But if I add that, the Projects turner shows
        lib
not /usr/local/lib.  Pretty ambiguous!  I renamed it /usr/local/lib.  I looked in it.
Nothing there.  (Obviously, the IDE and I were on pretty different wavelengths at
this point of my explorations.)  Selected this and from the context menu chose
     "Add existing item..."
 
This produced a window with the contents of /usr/local/lib.
I used left-mouse-click while holding down Ctrl key to select everything, since
Select All didn't seem to be a choice at this point.  Now I browse
/usr/local/lib in Projects again and the files seem to have been added, but I have
3 occurrences
        libpgme-pthread.so.11.6.3
        libpgme-pthread.so.11.6.3
        libpgme-pthread.so.11.6.3
where there should have been
        libpgme-pthread.so
        libpgme-pthread.so.11
        libpgme-pthread.so.11.6.3
which are the actual names of files in the actual directory /usr/local/lib.
*** (#1 of 1): 2008-01-18 15:43:51 PST michael.ingrassia@sun.com
Comment 1 Thomas Preisler 2008-09-30 23:25:59 UTC
Some of the files are soft links and that is causing the problem. It can be reproduced with this folder:

tmp
   xxx1.c -> xxx.c
   xxx2.c -> xxx.c
   xxx.c

It will add three files with identical names: xxx.c. The nodes are actually pointing to the correct files but the labels are incorrect. They should be xxx1.c, xxx2.c, and xxx.c 
respectively.

I tried a to override getName and getDisplayName inViewItemNode and return correct names but that broke renaming and possible also delete.

Will not attempt to fix in 6.5. It is not worth risking regressions because of this bug.


  
Comment 2 Thomas Preisler 2009-04-14 22:24:06 UTC
can't fix until NB switches to Java 6 with isLink support.
Comment 3 Thomas Preisler 2011-03-31 23:26:59 UTC
Seems fixed. Tried scenario with

tmp
   xxx1.c -> xxx.c
   xxx2.c -> xxx.c
   xxx.c

and it works.