Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulk accessor generation should ignore static fields #902

Closed
fbricon opened this issue Dec 13, 2018 · 4 comments
Closed

Bulk accessor generation should ignore static fields #902

fbricon opened this issue Dec 13, 2018 · 4 comments

Comments

@fbricon
Copy link
Contributor

fbricon commented Dec 13, 2018

Given a private static field:

private static String DEFAULT_NAME = "World"; 

calling the generate getters and setters command generate its accessors:

	/**
	 * @return the dEFAULT_NAME
	 */
	public static String getDEFAULT_NAME() {
		return DEFAULT_NAME;
	}

	/**
	 * @param dEFAULT_NAME the dEFAULT_NAME to set
	 */
	public static void setDEFAULT_NAME(String dEFAULT_NAME) {
		DEFAULT_NAME = dEFAULT_NAME;
	}

I'm pretty confident that's wrong in 99.99% of the cases

@fbricon
Copy link
Contributor Author

fbricon commented Dec 13, 2018

@testforstephen any chance you can fix it before we release on Monday?

@testforstephen
Copy link
Contributor

will submit a PR today.

@yaohaizh
Copy link
Contributor

Well, the eclipse does provide the option to generate getter/setter for this situation.

Given this, one improvement that we can do is similar to this #900 that we provide two phases code assist.

@fbricon fbricon added this to the Mid December 2018 milestone Dec 14, 2018
@fbricon
Copy link
Contributor Author

fbricon commented Dec 14, 2018

Given this, one improvement that we can do is similar to this #900 that we provide two phases code assist.

please open a separate ticket for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants