Giter VIP home page Giter VIP logo

Comments (6)

fbricon avatar fbricon commented on June 18, 2024 1

You can try using Intellij, but that feature seems pretty controversial, so much so that people tend to disable it.

It's unlikely such feature will land in vscode-java.

Now if you really really want to get that feature working in vscode-java, I'd suggest you write an extension for vscode-java, that would embed https://marketplace.eclipse.org/content/unnecessary-code-detector, stripped of all its UI dependencies. Then you may be get something working. maybe.

from vscode-java.

fbricon avatar fbricon commented on June 18, 2024

This is what you get today:

Screenshot 2024-03-13 at 16 05 03

from vscode-java.

mamilic avatar mamilic commented on June 18, 2024

Do apologies, didn't know that it works in some cases and in some it doesn't. It is not working in follwoing cases

  • With Enums
  • With public static final fields and public final field
  • With public class methods

Would it be possivle for example in case of Constants class, as it does have any references to be grayed out?
image

from vscode-java.

fbricon avatar fbricon commented on June 18, 2024

public modifier means a 3rd party consumer could actually use your code (eg. you're building a library), so would report false-positive "unused" diagnostics.

from vscode-java.

mamilic avatar mamilic commented on June 18, 2024

Thank you for explanation. Just curious, what would be your approach finding and removing unused public methods, fields, enums from code?

from vscode-java.

mamilic avatar mamilic commented on June 18, 2024

Thnank you for suggestions.

from vscode-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.