Bug 44035 [formatting] Error in formatting parts of java code snippets in comment
This is for build I20030930. The Java code formatter options are set to Format java code snippets. Taking the following comment: /** * The following is a Java snipet. * * <pre> * while ((size = availableSize(stream, size)) > 0) { * System.out.println("available"); * } * </pre> */ public void test() { } And trying to format it here is what we got: /** * The following is a Java snipet. * * <pre> * while ((size = availableSize(stream, size)) > 0) { * System.out.println("available"); } * </pre> */ public void test() { }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.java
/** 
	 * Preference key used to look up display tab width.
	 * 
	 * @since 2.0
	 */
	public final static String PREFERENCE_TAB_WIDTH= PreferenceConstants.EDITOR_TAB_WIDTH;
	/** 
	 * Preference key for inserting spaces rather than tabs.
	 * 
	 * @since 2.0
	 */
	public final static String SPACES_FOR_TABS= PreferenceConstants.EDITOR_SPACES_FOR_TABS;
	
	private JavaTextTools fJavaTextTools;
	private ITextEditor fTextEditor;
	private String fDocumentPartitioning;
	
	/**
	 * Creates a new Java source viewer configuration for viewers in the given editor 
	 * using the given Java tools and the specified document partitioning.
	 *
	 * @param tools the Java text tools to be used
	 * @param editor the editor in which the configured viewer(s) will reside
	 * @param partitioning the document partitioning for this configuration
	 * @see JavaTextTools
	 * @since 3.0