Community
Participate
Working Groups
In any old API that has shipped for 4 versions, there are methods you wish you hadn't exposed, but are now exposed, and which you need to keep to maintain backward compatibility with existing applications. Code migration costs can be very steep for large companies, and can block upgrades of your products. Filtering based on access restrictions only allows you to filter on a per-package or per-class basis; you cannot hide individual methods in a class and expose other methods in the same class. .NET 1.0+ and Visual Studio .NET 2002+ have the [EditorBrowsable(EditorBrowsableState.Never)] attribute (analogous to JDK 1.5 annotations) with which you can tag individual methods to hide such public internal methods and properties. Java and Eclipse need a similar mechanism. The @deprecated javadoc tag is a good first step, but the method still appears in Eclipse Code Assist. If Eclipse had a feature to simply hide all @deprecated methods and classes from Code Assist (not just crossing them out), that would solve the problem for us. I propose that the Eclipse team add a new "Hide deprecated references" checkbox in the Workspace "Preferences" dialog under "Java" / "Editor" / "Code Assist" / "Sorting and Filtering". Business Objects needs this for Crystal Reports for Eclipse.
+1 See also discussions in bug 106000.
When do you think you could schedule this work? M5 (as a developer, I know that would be asking too much :) ) or M6? Thanks! Francis
This is conditionned by an API change. So if it occurs with 3.2, it must occur by M5, which means this early this week.
Great! So is your answer, "yes, it will be in M5," or "no, it's too late to make it into M5?" The "Target Milestone" is still set to "---".
Fixed and tests added CompletionTests#testDeprecationCheck1() -> testDeprecationCheck16() Added filtering of deprecated types and members. Deprecated types and members aren't filtered if they are defined in the same compilation unit as completion location. eg. /** @deprecated */ class X { X| // X should be proposed in this case } Added a new option CODEASSIST_DEPRECATION_CHECK in JavaCore. * CODEASSIST / Activate Deprecation Sensitive Completion * When active, completion doesn't show deprecated members and types. * - option id: "org.eclipse.jdt.core.codeComplete.deprecationCheck" * - possible values: { "enabled", "disabled" } * - default: "disable"
I open a new bug to request the addition of this option in the Content Assist preference page (bug 127481).
Currently filtering doesn't work correctly for type references (bug 127628). This problem won't be fixed for 3.2M5.
Note that bug 127628 was not fixed for M5 as it needs an additional char in index file and we wanted to measure impact on performances before release this change...
Verified for 3.2 M5 using build I20060215-0010.