Menu

#6 Force linebreaks

open
nobody
None
5
2012-10-08
2007-01-10
No

It would be nice to have an option to force linebreaks (using // comments) instead having the Eclipse code formatter split long lines, e.g.

/*
* @see java.lang.Object#equals(Object)
/
public boolean equals(final Object object) {
if (!(object instanceof MyObject)) {
return false;
}
MyObject rhs = (MyObject) object;
return new EqualsBuilder() //
.appendSuper(super.equals(object)) //
.append(this.id, rhs.id) //
.append(this.name, rhs.name) //
.isEquals();
}

Also, a second option to use $NON-NLS-1$ in the toString method (to avoid non-externalized string warnings) would be appreciated, e.g.

/*
* @see java.lang.Object#toString()
/
public String toString() {
return new ToStringBuilder(this) //
.appendSuper(super.toString()) //
.append("id", this.id) //$NON-NLS-1$
.append("name", this.name) //$NON-NLS-1$
.toString();
}

Discussion


Log in to post a comment.