private static char[] getMissingTypeString(char[][][] missingTypeNames) { char[] missingTypeString = null; if (missingTypeNames != null) { CharArrayBuffer builder = new CharArrayBuffer(); for (int typeIdx = 0; typeIdx < missingTypeNames.length; typeIdx++) { char[][] next = missingTypeNames[typeIdx]; if (typeIdx != 0) { builder.append(COMMA); } if (next == null) { continue; } for (int segmentIdx = 0; segmentIdx < next.length; segmentIdx++) { char[] segment = next[segmentIdx]; if (segment == null) { continue; } if (segmentIdx != 0) { builder.append(PATH_SEPARATOR); } builder.append(segment); } } missingTypeString = builder.getContents(); } return missingTypeString; }
/** * @see DOMNode#appendFragmentedContents(CharArrayBuffer) */ protected void appendFragmentedContents(CharArrayBuffer buffer) { if (this.fNameRange[0] < 0) { buffer .append("import ") //$NON-NLS-1$ .append(this.fName) .append(';') .append(Util.getLineSeparator(buffer.toString(), null)); } else { buffer.append(this.fDocument, this.fSourceRange[0], this.fNameRange[0] - this.fSourceRange[0]); //buffer.append(fDocument, fNameRange[0], fNameRange[1] - fNameRange[0] + 1); buffer.append(this.fName); buffer.append(this.fDocument, this.fNameRange[1] + 1, this.fSourceRange[1] - this.fNameRange[1]); } } /**
/** * @see IDOMNode#getCharacters() */ @Override public char[] getCharacters() { CharArrayBuffer buffer= new CharArrayBuffer(); appendContents(buffer); return buffer.getContents(); } /**
/** * Appends the given char. Given for convenience. * * @param c - a char which is appended to the end of the buffer. */ public CharArrayBuffer append(char c) { append(new char[] {c}, 0, 1); return this; } /**
public String toString() { try { CharArrayBuffer arrayBuffer = new CharArrayBuffer(); arrayBuffer.append(getSelector()); getGenericSignature(arrayBuffer, true); return arrayBuffer.toString(); } catch (RuntimeException e) { // This is called most often from the debugger, so we want to return something meaningful even // if the code is buggy, the database is corrupt, or we don't have a read lock. return super.toString(); } }
@Override public String toString() { try { CharArrayBuffer result = new CharArrayBuffer(); getSignature(result); return result.toString(); } catch (RuntimeException e) { // This is called most often from the debugger, so we want to return something meaningful even // if the code is buggy, the database is corrupt, or we don't have a read lock. return super.toString(); } } }
/** * Returns the contents of the buffer as a String, or * an empty string if the buffer is empty. */ @Override public String toString() { char[] contents = getContents(); return (contents != null) ? new String(contents) : Util.EMPTY_STRING; } }
/** * @see IDOMNode#getCharacters() */ public char[] getCharacters() { CharArrayBuffer buffer= new CharArrayBuffer(); appendContents(buffer); return buffer.getContents(); } /**
@Override public String toString() { try { CharArrayBuffer arrayBuffer = new CharArrayBuffer(); arrayBuffer.append(getSelector()); getGenericSignature(arrayBuffer, true); return arrayBuffer.toString(); } catch (RuntimeException e) { // This is called most often from the debugger, so we want to return something meaningful even // if the code is buggy, the database is corrupt, or we don't have a read lock. return super.toString(); } }
public String toString() { try { CharArrayBuffer result = new CharArrayBuffer(); getSignature(result); return result.toString(); } catch (RuntimeException e) { // This is called most often from the debugger, so we want to return something meaningful even // if the code is buggy, the database is corrupt, or we don't have a read lock. return super.toString(); } } }
/** * Returns the contents of the buffer as a String, or * an empty string if the buffer is empty. */ public String toString() { char[] contents = getContents(); return (contents != null) ? new String(contents) : Util.EMPTY_STRING; } }
private static char[] getMissingTypeString(char[][][] missingTypeNames) { char[] missingTypeString = null; if (missingTypeNames != null) { CharArrayBuffer builder = new CharArrayBuffer(); for (int typeIdx = 0; typeIdx < missingTypeNames.length; typeIdx++) { char[][] next = missingTypeNames[typeIdx]; if (typeIdx != 0) { builder.append(COMMA); } if (next == null) { continue; } for (int segmentIdx = 0; segmentIdx < next.length; segmentIdx++) { char[] segment = next[segmentIdx]; if (segment == null) { continue; } if (segmentIdx != 0) { builder.append(PATH_SEPARATOR); } builder.append(segment); } } missingTypeString = builder.getContents(); } return missingTypeString; }
/** * @see DOMNode#appendFragmentedContents(CharArrayBuffer) */ protected void appendFragmentedContents(CharArrayBuffer buffer) { if (this.fNameRange[0] < 0) { buffer .append("import ") //$NON-NLS-1$ .append(this.fName) .append(';') .append(Util.getLineSeparator(buffer.toString(), null)); } else { buffer.append(this.fDocument, this.fSourceRange[0], this.fNameRange[0] - this.fSourceRange[0]); //buffer.append(fDocument, fNameRange[0], fNameRange[1] - fNameRange[0] + 1); buffer.append(this.fName); buffer.append(this.fDocument, this.fNameRange[1] + 1, this.fSourceRange[1] - this.fNameRange[1]); } } /**
/** * @see IDOMNode#getCharacters() */ public char[] getCharacters() { CharArrayBuffer buffer= new CharArrayBuffer(); appendContents(buffer); return buffer.getContents(); } /**
/** * @see DOMMember#appendSimpleContents(CharArrayBuffer) */ protected void appendSimpleContents(CharArrayBuffer buffer) { // append eveything before my name buffer.append(this.fDocument, this.fSourceRange[0], this.fNameRange[0] - this.fSourceRange[0]); // append my name buffer.append(this.fName); // append everything after my name buffer.append(this.fDocument, this.fNameRange[1] + 1, this.fSourceRange[1] - this.fNameRange[1]); } /**
public String toString() { try { CharArrayBuffer buf = new CharArrayBuffer(); buf.append(getType().toString()); buf.append(" "); //$NON-NLS-1$ buf.append(getName().toString()); return buf.toString(); } catch (RuntimeException e) { // This is called most often from the debugger, so we want to return something meaningful even // if the code is buggy, the database is corrupt, or we don't have a read lock. return super.toString(); } }
/** * Returns the current contents of this document fragment, * or <code>null</code> if this node has no contents. * * <p>If this node is fragmented, contents must be generated by * using the original document and indicies as a form for the current * attribute values of this node. If this node not fragmented, the * contents can be obtained from the document. * * @see IDOMNode#getContents() */ public String getContents() { CharArrayBuffer buffer= new CharArrayBuffer(); appendContents(buffer); return buffer.toString(); } /**
/** * Returns the contents of the buffer as a String, or * an empty string if the buffer is empty. */ public String toString() { char[] contents = getContents(); return (contents != null) ? new String(contents) : Util.EMPTY_STRING; } }
/** * @see IDOMMethod#setExceptions(String[]) */ public void setExceptions(String[] names) { becomeDetailed(); if (names == null || names.length == 0) { this.fExceptions= null; } else { this.fExceptions= names; CharArrayBuffer buffer = new CharArrayBuffer(); char[] comma = new char[] {',', ' '}; for (int i = 0, length = names.length; i < length; i++) { if (i > 0) buffer.append(comma); buffer.append(names[i]); } this.fExceptionList= buffer.getContents(); } fragment(); } /**