Bug 5295 Segmented view misses field comment
Build 20011025 1. Create the following CU: X.java ------ public class X { String s1 = "s1"; //comment for s1 } 2. Make sure that 'Show Source of Selected Element Only' is selected 3. In the Outline, select field 's1' Observe: The comment doesn't appear near the field declaration.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaParseTreeBuilder.java
/*
 * (c) Copyright IBM Corp. 2000, 2001.
 * All Rights Reserved.
 */
package org.eclipse.jdt.internal.ui.compare;
import java.util.Stack;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jdt.internal.compiler.*;
import org.eclipse.jdt.internal.compiler.env.ICompilationUnit;
class JavaParseTreeBuilder extends SourceElementRequestorAdapter implements ICompilationUnit {
	
	private static final boolean SHOW_COMPILATIONUNIT= true;
	private char[] fBuffer;
	private JavaNode fImportContainer;
	private Stack fStack= new Stack();
	
	/**
	 * Parsing is performed on the given buffer and the resulting tree
	 * (if any) hangs below the given root.
	 */
	JavaParseTreeBuilder(JavaNode root, char[] buffer) {