protected void toStringInfo(int tab, StringBuffer buffer, Object info, boolean showResolvedInfo) { buffer.append(tabString(tab)); if (info != NO_INFO) { buffer.append(Signature.toString(getTypeSignature())); buffer.append(" "); // $NON-NLS-1$ } toStringName(buffer); }
private String getValue(Object[] objects) { StringBuffer buffer = new StringBuffer(); for (Object object : objects) { IPackageFragment fragment = (IPackageFragment) object; if (buffer.length() > 0) buffer.append("," + getLineDelimiter() + " "); // $NON-NLS-1$ //$NON-NLS-2$ buffer.append(fragment.getElementName()); } return buffer.toString(); }
public String toString() { StringBuffer buffer = new StringBuffer("Queue:\n"); // $NON-NLS-1$ for (int i = this.start; i <= this.end; i++) { buffer.append(this.names[i]).append('\n'); } return buffer.toString(); }
protected void assertTypeBindingsEqual(String message, String expected, ITypeBinding[] types) { StringBuffer buffer = new StringBuffer(); if (types == null) { buffer.append("<null>"); } else { for (int i = 0, length = types.length; i < length; i++) { buffer.append(types[i].getQualifiedName()); if (i != length - 1) { buffer.append("\n"); } } } if (!expected.equals(buffer.toString())) { System.out.println(org.eclipse.jdt.core.tests.util.Util.displayString(buffer.toString(), 2)); } assertEquals(message, expected, buffer.toString()); }
/* * @see JavaElement#getHandleMemento(StringBuffer) */ protected void getHandleMemento(StringBuffer buff) { ((JavaElement) getParent()).getHandleMemento(buff); buff.append(getHandleMementoDelimiter()); buff.append(this.name); buff.append(JEM_COUNT); buff.append(this.declarationSourceStart); buff.append(JEM_COUNT); buff.append(this.declarationSourceEnd); buff.append(JEM_COUNT); buff.append(this.nameStart); buff.append(JEM_COUNT); buff.append(this.nameEnd); buff.append(JEM_COUNT); escapeMementoName(buff, this.typeSignature); if (this.occurrenceCount > 1) { buff.append(JEM_COUNT); buff.append(this.occurrenceCount); } }