Bug 372192 - Implicit constructors should be visible in Outline views
Summary: Implicit constructors should be visible in Outline views
Status: VERIFIED DUPLICATE of bug 37382
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.8   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.0 M3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-22 04:20 EST by Missing name Mising name CLA
Modified: 2012-03-14 07:31 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Missing name Mising name CLA 2012-02-22 04:20:42 EST
Build Identifier: 20110916-0149

When a class has no constructor in its source code, its implicit constructor should be visible
in the Package Explorer, Project Explorer, and Outline views
so that
1. the developer is aware of the constructor,
2. the developer can set an entry breakpoint to the constructor,
3. the developer can search for references to the constructor, including explicit or implicit super() calls from subclasses.

Reproducible: Always

Steps to Reproduce:
Write a class as simple as

public class C {
}

and observe that its constructor is not visible in the outlines.
Comment 1 Ayushman Jain CLA 2012-02-22 06:04:44 EST
The outline view shows elements explicitly defined in the java file in the editor. (In reply to comment #0)
> 1. the developer is aware of the constructor
A java developer will anyway be aware of the c'tor.
> 2. the developer can set an entry breakpoint to the constructor,
And do what? How do we show the action of the object being constructed in the debug perspective? There's nothing  in the editor.
> 3. the developer can search for references to the constructor, including
> explicit or implicit super() calls from subclasses.
That can still be done. Go to Java search, type the class name, select 'search for' - constructor, and 'limit to' - references. This should suffice. 

Anyway, moving to JDT/UI for the decision.
Comment 2 Dani Megert CLA 2012-02-22 06:24:43 EST
The Outline view shows what's in the Java model which doesn't contain the default constructor in case of Java source files. This is correct and won't be changed.

*** This bug has been marked as a duplicate of bug 37382 ***
Comment 3 Jay Arthanareeswaran CLA 2012-03-14 03:11:31 EDT
Verified for 3.8 M6
Comment 4 Missing name Mising name CLA 2012-03-14 07:31:53 EDT
(In reply to comment #1)
> 2. the developer can set an entry breakpoint to the constructor,
> And do what?

Even if there is no source code line to point at, the developer would be able to inspect the process stack in the Debug view to see the context the constructor was called from.