Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 362775

Summary: [type hierarchy] Type hierarchy does not show sub type that exists
Product: [Eclipse Project] JDT Reporter: Eike Stepper <stepper>
Component: CoreAssignee: Jesper Moller <jesper>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: anchakrk, daniel_megert, deepakazad, jarthana, markus.kell.r, maxime.goguillon, raksha.vasisht, srikanth_sankaran
Version: 3.8   
Target Milestone: 4.3 M6   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Screenshot
none
Zipped workspace that reproduces the problem
none
Screenshot of another case none

Description Eike Stepper CLA 2011-11-03 06:38:26 EDT
Created attachment 206395 [details]
Screenshot

Please have a look at the attached screenshot. It's self-explaining.
Comment 1 Deepak Azad CLA 2011-11-03 07:04:01 EDT
- Can you check if this happens in the Type Hierarchy view as well ? (Select interface and press F4)
- Is there anything in the error log?
Comment 2 Dani Megert CLA 2011-11-03 09:09:14 EDT
(In reply to comment #1)
> - Can you check if this happens in the Type Hierarchy view as well ? (Select
> interface and press F4)
> - Is there anything in the error log?

Most likely bug 73957.
Comment 3 Deepak Azad CLA 2011-11-15 06:45:35 EST
(In reply to comment #2)
> Most likely bug 73957.
Eike, can you confirm this? Or provide more info as requested in comment 0.

At the moment, we do not have enough info to take any action.
Comment 4 Eike Stepper CLA 2011-11-15 12:50:25 EST
(In reply to comment #1)
> - Can you check if this happens in the Type Hierarchy view as well ? (Select
> interface and press F4)

Yes, in this regard the problem is "consistent".

> - Is there anything in the error log?

No, I checked it. There's nothing.
Comment 5 Eike Stepper CLA 2011-11-15 12:53:21 EST
(In reply to comment #3)
> (In reply to comment #2)
> > Most likely bug 73957.
> Eike, can you confirm this? 

I've looked at bug 73957 but it reads like a whole book and I fear I'm just too busy right now with customer work to study all the 76 comments on it ;-(

> Or provide more info as requested in comment 0.

You mean comment #2? Please see my comment #4 ;-)

> At the moment, we do not have enough info to take any action.

I fear there's nothing more I can provide now. In case it happens again, what should I check then?
Comment 6 Dani Megert CLA 2011-11-16 03:21:31 EST
(In reply to comment #5)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > Most likely bug 73957.
> > Eike, can you confirm this? 
> 
> I've looked at bug 73957 but it reads like a whole book and I fear I'm just too
> busy right now with customer work to study all the 76 comments on it ;-(
> 
> > Or provide more info as requested in comment 0.
> 
> You mean comment #2? Please see my comment #4 ;-)
> 
> > At the moment, we do not have enough info to take any action.
> 
> I fear there's nothing more I can provide now. In case it happens again, what
> should I check then?

Check whether the missing class is not inside a bundle that is directly required by one of the bundles you have in your workspace.

Please reopen if you see this again.
Comment 7 Eike Stepper CLA 2011-11-16 13:53:08 EST
That was a little quick :P

As you could have seen in the screenshot I've attached the subtype that's missing from the type hierarchy is in the *same* file. There's basically this:

    class LocksChangedEvent implements CDOViewLocksChangedEvent {...}

Opening te type hierarchy on the interface CDOViewLocksChangedEvent should list the implementing class LocksChangedEvent. But it does not.
Comment 8 Dani Megert CLA 2011-11-17 02:23:45 EST
(In reply to comment #7)
> That was a little quick :P
Look, we can't reproduce it and we can't do anything with this bug since it works for us. So, as long as you can't attach a demo workspace or steps that let us reproduce the problem there is nothing we can or will do.

> As you could have seen in the screenshot I've attached the subtype that's
> missing from the type hierarchy is in the *same* file. There's basically this:
Mmh. Maybe you attached a wrong screenshot then. The one from comment 0 does not show that the types are declared in the same file.
Comment 9 Eike Stepper CLA 2011-11-17 23:57:19 EST
Created attachment 207196 [details]
Zipped workspace that reproduces the problem
Comment 10 Eike Stepper CLA 2011-11-18 00:04:40 EST
In comment #9 I attached a zipped workspace that reproduces the problem.

Steps to reproduce: 

- Install Eclipse SDK 3.8.0 (Build id: I20111027-1800)
- Install EMF 2.8 into the target platform
- Switch to the attached workspace
- Open type org.eclipse.emf.internal.cdo.view.CDOViewImpl.LocksChangedEvent
- Place caret on the implements clause (type CDOViewLocksChangedEvent)
- Press CTRL+T or F4

You should now see the problem I've captured in the attached screenshot.
Comment 11 Dani Megert CLA 2011-11-18 02:16:19 EST
Thanks for the steps Eike!

Deepak, please investigate.
Comment 12 Eike Stepper CLA 2011-12-16 02:49:07 EST
Created attachment 208480 [details]
Screenshot of another case

Here I have another case of a "swallowed" sub type ;-(
Comment 13 Eike Stepper CLA 2012-12-29 00:07:38 EST
Deepak, what did your analysis reveal?

We just missed the first anniversary of this bug ;-(
Comment 14 Markus Keller CLA 2013-01-03 15:11:14 EST
I guess the problem is that CDOViewImpl contains more than 10 annotations. This makes it fall into the trap from bug 393192 comment 2.

*** This bug has been marked as a duplicate of bug 393192 ***
Comment 15 Eike Stepper CLA 2013-01-04 09:14:33 EST
I confirm that removing enough annotations (Java and Javadoc) made the type appear in the hierarchy. And I do have a package-info.java file in the containing package.
Comment 16 Dani Megert CLA 2013-01-08 11:25:16 EST
*** Bug 392171 has been marked as a duplicate of this bug. ***
Comment 17 Srikanth Sankaran CLA 2013-03-06 16:38:13 EST
Jesper, Thanks for capturing this scenario in a junit test.
Comment 18 Srikanth Sankaran CLA 2013-03-07 22:00:57 EST
Please confirm this is indeed a duplicate of bug 393192 and that the issue is 
resolved. If there is something unique about the test case, we want to capture
it as a junit.
Comment 19 Eike Stepper CLA 2013-03-08 00:24:08 EST
Will do. Will your fix end up in http://download.eclipse.org/eclipse/updates/3.8 ?
Comment 20 Srikanth Sankaran CLA 2013-03-08 00:54:35 EST
(In reply to comment #19)
> Will do. Will your fix end up in
> http://download.eclipse.org/eclipse/updates/3.8 ?

Comment#18 was a request to Jesper the assignee of this bug. Of course you
are welcome to verify the fix when it becomes available. The earlier GA 
version will be Kepler (4.3) and milestone M6.
Comment 21 Jesper Moller CLA 2013-03-08 06:50:30 EST
I can confirm this as fixed by bug 393192, same pattern, but with the twist that in Eike's example, the package-info.java is the one from the package of the interface being investigated, not the editor's class. This confused me at first, since org.eclipse.emf.internal.cdo.view doesn't have a package-info.java.

*** This bug has been marked as a duplicate of bug 393192 ***
Comment 22 Eike Stepper CLA 2013-03-08 07:07:43 EST
Great! Thank you, guys. I'll try it out when the fix is available in 3.8.
Comment 23 ANIRBAN CHAKRABORTY CLA 2013-03-12 04:53:32 EDT
Verified for build eclipse-SDK-I20130310-2000 M6.