use of org.eclipse.xtext.xbase.lib.util.ToStringBuilder in project xtext-eclipse by eclipse.
the class EclipseWorkspaceConfig method toString.
@Override
@Pure
public String toString() {
ToStringBuilder b = new ToStringBuilder(this);
b.add("workspaceRoot", this.workspaceRoot);
b.add("projectConfigProvider", this.projectConfigProvider);
return b.toString();
}
use of org.eclipse.xtext.xbase.lib.util.ToStringBuilder in project eclipse.jdt.ls by eclipse.
the class DidChangeWatchedFilesRegistrationOptions method toString.
@Override
@Pure
public String toString() {
ToStringBuilder b = new ToStringBuilder(this);
b.add("watchers", this.watchers);
return b.toString();
}
use of org.eclipse.xtext.xbase.lib.util.ToStringBuilder in project xtext-eclipse by eclipse.
the class JavaSource method toString.
@Override
public String toString() {
ToStringBuilder b = new ToStringBuilder(this);
b.add("fileName", this.fileName);
b.add("code", this.code);
return b.toString();
}
use of org.eclipse.xtext.xbase.lib.util.ToStringBuilder in project xtext-lib by eclipse.
the class ToStringHelperTest method testSkipNulls.
@Test
public void testSkipNulls() {
ToStringHelperTest.MyEntity _myEntity = new ToStringHelperTest.MyEntity();
final ToStringBuilder helper = new ToStringBuilder(_myEntity).skipNulls().addAllFields();
StringConcatenation _builder = new StringConcatenation();
_builder.append("MyEntity [");
_builder.newLine();
_builder.append(" ");
_builder.append("boolProp = true");
_builder.newLine();
_builder.append(" ");
_builder.append("intProp = 42");
_builder.newLine();
_builder.append(" ");
_builder.append("myList = ArrayList (");
_builder.newLine();
_builder.append(" ");
_builder.append("\"foo\",");
_builder.newLine();
_builder.append(" ");
_builder.append("\"bar\",");
_builder.newLine();
_builder.append(" ");
_builder.append("\"baz\"");
_builder.newLine();
_builder.append(" ");
_builder.append(")");
_builder.newLine();
_builder.append(" ");
_builder.append("policy = CLASS");
_builder.newLine();
_builder.append("]");
Assert.assertEquals(ToStringHelperTest.toUnix(_builder.toString()), helper.toString());
}
use of org.eclipse.xtext.xbase.lib.util.ToStringBuilder in project xtext-lib by eclipse.
the class ToStringHelperTest method testSingleLine.
@Test
public void testSingleLine() {
ToStringHelperTest.MyEntity _myEntity = new ToStringHelperTest.MyEntity();
final ToStringBuilder helper = new ToStringBuilder(_myEntity).singleLine().addAllFields();
Assert.assertEquals("MyEntity [boolProp = true, intProp = 42, myList = ArrayList (\"foo\",\"bar\",\"baz\"), friend = null, policy = CLASS]", helper.toString());
}
Aggregations