Following code is from a sample of playframework-2.0:
/**
* Display the dashboard.
*/
public static Result index() {
return ok(
dashboard.render(
Project.findInvolving(request().username()),
Task.findTodoInvolving(request().username()),
User.find.byId(request().username())
)
);
}
It looks good, but when I use code format of eclipse, it becomes:
/**
* Display the dashboard.
*/
public static Result index() {
return ok(dashboard.render(
Project.findInvolving(request().username()),
Task.findTodoInvolving(request().username()),
User.find.byId(request().username())
));
}
How to configure eclipse to keep to first format style? I tried a lot, but not works.
You have to using
Code Formatterin eclipse. You can find it in following path:windowsmenu and inPreferencesitem.javain left tree.code stylesub-tree ofjava.Formatterleaf.Editbutton and edit your customize formate and save it.I recomend you save your customization environment such as formatter and use it in others place.
Eclipseholdformatterinformation in a xml file. you can specify path of this file.following link is useful: