Issue
I want my java formatted with throws, implements, and extends on a new line. Is this possible in Eclipse?
public DataRecord fromFile(File file, InputStream inputStream) throws IOException {
to
public DataRecord fromFile(File file, InputStream inputStream)
throws IOException {
Solution
In Eclipse navigate to:
Window -> Preferences -> Java -> Code Style -> Formatter
Then, to change your formatting preferences, click Edit
.
There navigate to Line Wrapping -> Wrapping Settings
.
For methods:
Open the option for Method Declarations
, where you can select the formatting behavior for throws
.
For class declarations:
Open the option for Class Declarations
, where you can select the formatting behavior for extends
and implements
.
Answered By - maloomeister
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.