Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 204428 - [CommonNavigator] Project explorer shows new created projects twice
Summary: [CommonNavigator] Project explorer shows new created projects twice
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3.1   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.3.2   Edit
Assignee: Michael D. Elder CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 205961 208337 (view as bug list)
Depends on:
Blocks: 201784 205231
  Show dependency tree
 
Reported: 2007-09-24 06:46 EDT by Teddy Walker CLA
Modified: 2008-02-06 08:06 EST (History)
16 users (show)

See Also:


Attachments
Registers contributions using proper priority (1.84 KB, patch)
2007-10-07 21:35 EDT, Michael D. Elder CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Teddy Walker CLA 2007-09-24 06:46:26 EDT
Build ID: I20070921-0919

Steps To Reproduce:
1. Create a new general project with the wizard
2. The 'Project Explorer' view is not updated correctly

This error occures, if the creation runs 'fast'. E.g., if you debug the wizard, the view is updated correctly.
Comment 1 Anton Leherbauer CLA 2007-10-03 07:41:42 EDT
This also seems to happen with 3.3.1. See bug 204366 and bug 205231.
Comment 2 Michael D. Elder CLA 2007-10-07 21:35:24 EDT
Created attachment 79864 [details]
Registers contributions using proper priority

This addresses the problem of duplicated projects. The root cause is that the source of each contribution for intercepted elements was being remembered using the incorrect prioritization of extensions. This was caused by a regression from the patch for Bug 204428.
Comment 3 Mike Wilson CLA 2007-10-09 11:42:24 EDT
Excellent. Thanks, Michael. If you haven't already done so, please release the fix in the development stream for 3.3.2.
Comment 4 Boris Bokowski CLA 2007-10-10 11:52:12 EDT
Michael, when a project showed up twice, did we have two different objects in the tree, an IProject and an IJavaProject?  How did the incorrect prioritization cause this?
Comment 5 Michael D. Elder CLA 2007-10-10 13:04:29 EDT
Here's what I believe happened:

Resource extension added an IProject [verified]

Now at this point, the framework identified the set of extensions that could contribute IProject, and the first active extension was marked as the contributor. Because of the mis-prioritization, the resource extension was remembered as the source. 

Java extension generated a refresh which created an IProject [verified]

Because the framework knows who gave it content, it *knows* the Java extension contributed this IProject.

The Sorting algorithm identified these two instances as coming from different sources (CommonSorter), and as such sorted then by their user-displayed labels. This meant that they weren't compared for equality of their own means. We might consider addressing this behavior in 3.4 separately. 

The end result is the viewer thought they were different objects. 
Comment 6 Michael D. Elder CLA 2007-10-10 15:26:14 EDT
*** Bug 205961 has been marked as a duplicate of this bug. ***
Comment 7 Philipe Mulet CLA 2007-10-16 07:11:43 EDT
is this the same as bug 201784 ?
Comment 8 Boris Bokowski CLA 2007-10-16 09:35:23 EDT
Michael, we will have an M build towards 3.3.2 tomorrow. The build submission is happening later today. Can you please release this into the maintenance stream?

I am not sure what the rules are at this point, but you have my +1 for putting this into 3.3.2.
Comment 9 Boris Bokowski CLA 2007-10-16 09:36:49 EDT
Please release the fix into HEAD as well, this way it will be used (tested) by a larger group of people.
Comment 10 Michael D. Elder CLA 2007-10-16 12:25:34 EDT
Released to R3_3_maintenance and HEAD.
Comment 11 Philipe Mulet CLA 2007-10-18 07:02:35 EDT
Can you explain how severe this bug is ? Would it motivate an emergency delivery (sooner than 3.3.2?). My reading of the steps is that it is not that bad. I tried naively and wasn't able to reproduce...
Comment 12 Michael D. Elder CLA 2007-10-18 10:56:12 EDT
The issue here occurs with simple projects with the Project Explorer open. I was able to reproduce it without issue.

I do think this is a bug worth release since it's very visible and it's a regression. 
Comment 13 Steve Francisco CLA 2007-10-18 12:12:02 EDT
I agree with Michael - this is very visible and can erode a user's confidence in the IDE, which is very bad.

Philippe, if you were trying in a Java perspective you wouldn't see it.  Try in the Resource perspective.
Comment 14 Boris Bokowski CLA 2007-10-18 13:12:55 EDT
I agree with Michael and Steve.
Comment 15 Boris Bokowski CLA 2007-10-19 23:50:30 EDT
Yes, this is the same issue as bug 201784. We are using bug 201784 to track that the same fix is going into the 3.3.1.1 build.
Comment 16 Michael D. Elder CLA 2007-11-02 14:09:40 EDT
*** Bug 208337 has been marked as a duplicate of this bug. ***
Comment 17 Neeraj Agrawal CLA 2007-11-02 14:52:19 EDT
*** Bug 208462 has been marked as a duplicate of this bug. ***
Comment 18 Tod Creasey CLA 2008-02-06 08:06:15 EST
Verified in  M20080205-1130