I want to add an additional formatter in eclipse to format @Autowired annotation in the same line as the Object declaration when I format (Ctrl+Shift+F).
If it is currently,
@Autowired
TestService testService;
After pressing Ctrl+Shift+F I want it to be as
@Autowired TestService testService;
The Code formatter xml file is already existing in my project. But I am not sure how they have added each of the formatter in it. Following are 2 of the many other formatters.
<setting value="end_of_line" id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration"/>
<setting value="do not insert" id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case"/>
How to write additional value in this file for my need?