Comments (6)
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.
This is what you get today:
from vscode-java.
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?
from vscode-java.
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.
Thank you for explanation. Just curious, what would be your approach finding and removing unused public methods, fields, enums from code?
from vscode-java.
Thnank you for suggestions.
from vscode-java.
Related Issues (20)
- Move method refactoring causes syntax errors due to dependency on constructors HOT 2
- Moving methods to interfaces causes syntax errors HOT 1
- Moving method to enumeration class causes syntax error HOT 1
- Move method dependency type conversion causes syntax errors HOT 1
- Renaming a field causes a change in code behavior
- Renaming a field results in naming conflicts with other fields HOT 1
- Renaming fields causes conflicts with parameter naming, resulting in changes in code behavior
- Renaming fields causes conflicts with variable naming, resulting in changes in code behavior HOT 2
- Renaming the f method causes naming conflicts HOT 1
- Renaming the f method causes naming conflicts HOT 2
- Renaming the f method causes naming conflicts HOT 2
- Renaming method causes naming conflicts HOT 2
- Renaming method causes behavior change HOT 1
- Renaming method causes behavior change HOT 2
- Renaming method causes behavior change HOT 2
- Renaming method causes behavior change HOT 2
- Renaming local variables causes naming conflicts HOT 1
- Renaming local variables causes naming conflicts HOT 2
- Renaming local variables causes naming conflicts HOT 2
- JUnit testing is not working in vscode-java 1.30.0 version HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-java.