if (classFileBuffer != null) {
buffer.setContents(classFileBuffer.getCharacters());
} else {
// Disassemble
IClassFileReader reader = ToolFactory.createDefaultClassFileReader(this.classFile, IClassFileReader.ALL);
Disassembler disassembler = new Disassembler();
String contents = disassembler.disassemble(reader, Util.getLineSeparator("", getJavaProject()), ClassFileBytesDisassembler.WORKING_COPY); //$NON-NLS-1$
buffer.setContents(contents);
}
// add buffer to buffer cache
BufferManager bufManager = getBufferManager();