How do I modify the set method signature that Eclipse auto generates?

后端 未结 4 1690
一整个雨季
一整个雨季 2021-02-05 11:22

My current project has the coding convention that instance variables are never referred to with the this. prefix and that parameters should never hide instance variables.

<
4条回答
  •  无人共我
    2021-02-05 12:12

    Very simple...

    1. In your project, under the root project folder, create a folder called .settings (it might already be there).
    2. In this folder, create a text file called org.eclipse.jdt.core.prefs
    3. In this file, include the following line:

    org.eclipse.jdt.core.codeComplete.argumentPrefixes=a

    That's it, your done. It should just work. I couldn't find proper documentation for this, but here are some other options you might set:

    org.eclipse.jdt.core.codeComplete.argumentPrefixes= org.eclipse.jdt.core.codeComplete.argumentSuffixes= org.eclipse.jdt.core.codeComplete.fieldPrefixes= org.eclipse.jdt.core.codeComplete.fieldSuffixes= org.eclipse.jdt.core.codeComplete.localPrefixes= org.eclipse.jdt.core.codeComplete.localSuffixes= org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=

提交回复
热议问题