Comments (3)
@jjohnstn Please kindly have a look at the issue and the solution. Thanks.
from eclipse.jdt.ui.
Hi @DongChunHao I think this change is very specific to a scenario you experienced but I don't feel it adds functionality to Eclipse JDT that would be useful to general users. For example, hitting CTRL+1 on B1 using your change:
public class TestRenaming {
public int A1;
public int A2;
public int B1;
}
it recommends renaming B1 to AB1. That doesn't really make any sense. This clearly isn't a case of a naming convention. It is just a coincidence that most fields start with A.
Each quick-fix/assist needs to do calculations to determine if it is relevant and if a change can be created and this takes resources that ultimately adds up. Thus, we want quick-fixes/assists to provide value to general users, not just for a one-off scenario. A project-specific naming convention is just that: project-specific and doesn't apply to other projects/users. If a particular project wants all fields to be prefixed with a special prefix it can add scripts to verify code check-ins (e.g. github actions) or the project could run verification scripts occasionally that are published to the development team. To infer a naming convention by looking at code is a leap and isn't really feasible using frequency as shown by my simple example above.
from eclipse.jdt.ui.
I could forsee a situation where a particular coding convention were set in a .settings file or property page, and then the quick fix only needs to check if this feature is enabled or not. This would certainly speed up the calculations for users who don't want to use the feature (a simple property check on the file) while allowing the logic to run for those who want it. A discussion on whether thats even advisable is at least worth something.
But I agree that in its current form it provides limited utility with a possible performance hit.
from eclipse.jdt.ui.
Related Issues (20)
- Moving methods to interfaces causes syntax errors
- Move method dependency type conversion call causes syntax errors HOT 1
- Inconsistent behavior caused by refactoring extraction methods HOT 1
- Extraction method causes syntax errors
- Inconsistent behavior caused by extraction methods
- Inline method refactoring leads to syntax errors
- Inline method refactoring leads to syntax errors HOT 2
- Inline method refactoring leads to changes in refactoring access permissions
- Renaming method refactoring leads to changes in code behavior
- [23] Remove String Template preview feature from JDT UI
- add a "sticky scroll" feature HOT 2
- Fix string concat to MessageFormat and String.format quick-fixes to escape necessary characters
- Refactor remove overridden assignment clean-up to jdt.core.manipulation for jdt.ls use
- Code formatter: Suboptimal intent of method arguments HOT 1
- Refactor elseif cleanup to jdt.core.manipulation for use by jdt.ls
- [23] Add AST level 23 to AST view
- Code completion feature error HOT 4
- Refactor MultiCatchCleanUp to jdt.core.manipulation for jdt.ls usage
- Don't use text block when converting a single line concat to MessageFormat or String.format
- Javadoc tooltips (hovering labels) are sometimes too small HOT 3
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 eclipse.jdt.ui.