Bug 468427 - Blank item in Project Explorer after adding a resource to a newly generated folder
Summary: Blank item in Project Explorer after adding a resource to a newly generated f...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.5   Edit
Hardware: PC Linux
: P3 minor with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2015-05-27 02:45 EDT by Jan Richter CLA
Modified: 2019-11-27 01:14 EST (History)
5 users (show)

See Also:


Attachments
screenhot of the result (15.88 KB, image/png)
2015-05-27 02:45 EDT, Jan Richter CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Richter CLA 2015-05-27 02:45:28 EDT
Created attachment 253814 [details]
screenhot of the result

The project explorer creates an additional blank item when I add a new file into an empty folder that was just generated.

The trick is that when the folder is generated it also has the 'unfold' arrow even when it's empty. Trying to unfold it and them creating a new file in it will result in an additional empty item being created in the explorer.

Collapsing the tree seems to solve this.

To reproduce:
 - create a new project (Java for example)
 - try to unfold the src folder (make sure you leave it empty when creating the project)
 - create a new class in the src folder with some arbitrary package
Comment 1 Andrey Loskutov CLA 2015-05-27 02:55:50 EDT
Which build id? This was in early 4.5 builds (M4 or M5) but should be fixed in RC. If not, it's not a minor issue.
Comment 2 Jan Richter CLA 2015-05-27 03:03:06 EDT
I'm using M7, build id 20150507-1842.
Comment 3 Andrey Loskutov CLA 2015-05-27 03:04:51 EDT
(In reply to Jan Richter from comment #2)
> I'm using M7, build id 20150507-1842.

Please revalidate with RC2.
Comment 4 Jan Richter CLA 2015-05-27 05:36:29 EDT
(In reply to Andrey Loskutov from comment #3)
> (In reply to Jan Richter from comment #2)
> > I'm using M7, build id 20150507-1842.
> 
> Please revalidate with RC2.

Still the same.
Comment 5 Vasili Gulevich CLA 2019-05-14 03:09:29 EDT
We occasionally observe this in 2018-12 when a resource is created by a background process.
Comment 6 Eric Williams CLA 2019-05-14 13:37:58 EDT
(In reply to Vasili Gulevich from comment #5)
> We occasionally observe this in 2018-12 when a resource is created by a
> background process.

Do you have a snippet which reproduces this issue?
Comment 7 Eric Williams CLA 2019-09-26 13:45:53 EDT
I can't reproduce this issue on Fedora 30, GTK3.24, and SWT master as of today.
Comment 8 Vasili Gulevich CLA 2019-10-12 04:10:36 EDT
Suspiciously similar symptoms are described in bug 489418.
Comment 9 Eric Williams CLA 2019-10-12 11:11:34 EDT
(In reply to Vasili Gulevich from comment #8)
> Suspiciously similar symptoms are described in bug 489418.

What is your GTK3 version, and Linux distribution?
Comment 10 Vasili Gulevich CLA 2019-11-27 01:14:09 EST
(In reply to Eric Williams from comment #9)
> (In reply to Vasili Gulevich from comment #8)
> > Suspiciously similar symptoms are described in bug 489418.
> 
> What is your GTK3 version, and Linux distribution?

GTK3: 3.22.30
Linux: Ubuntu 18.04.3 LTS

Here are test steps:

1. Download a vanilla Neon or Oxygen for Committers.
2. Launch in a fresh workspace
3. Close Java perspective
4. Open Resources perspective (to avoid JDT interference)
5. Create a following  workspace structure:
-------------------------
Project (General project, no natures)
  folder1
    file1.txt (empty file)
  folder2
-------------------------
6. Move file1.txt from folder1 to folder2 via drag and drop
7. Move file2.txt from folder2 to folder1 via drag and drop
8. Repeat 6-7 a few times (usually one time is enough)

Expected:
Original workspace hierarchy is shown

Actual:
An extra empty row is added to the tree:
-------------------------
Project
  folder1
    
    file1.txt
  folder2
-------------------------