Bug 66418 Code formatter not obeying prefs
build i0609-1200 I have my code formatter settings set to put 0 lines before field declarations. I set this up a while ago (months). Template is available from the Core team web page. - When I upgraded to today's build and formatted code, it put spaces between field declarations. - I checked the prefs and it was still set to 0 spaces. - I changed it to be 1 space, hit OK then Apply then back to 0 spaces, and OK and Apply. -> formatting from this point worked ok Note that there were other things that didn't take effect until after the 2nd Apply including: - spaces in array element initializers - tabbing for switch/case statements
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileStore.java
} catch (ParserConfigurationException e) {
			throw createException(e, FormatterMessages.getString("CodingStyleConfigurationBlock.error.reading_xml.message"));  
		}
		return handler.getProfiles();
	}
	
	/**
	 * Write the available profiles to the internal XML file.
	 */
	public static void writeProfilesToFile(Collection profiles, File file) throws CoreException {
		final OutputStream writer;
		try {
			writer= new FileOutputStream(file);
			try {
				writeProfilesToStream(profiles, writer);
			} finally {
				try { writer.close(); } catch (IOException e) {  }
			}
		} catch (IOException e) {
			throw createException(e, FormatterMessages.getString("CodingStyleConfigurationBlock.error.serializing_xml.message"));  
		}
	}
	
	/**
	 * Save profiles to an XML stream
	 */
	private static void writeProfilesToStream(Collection profiles, OutputStream stream) throws CoreException {
		try {
			final DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
			final DocumentBuilder builder= factory.newDocumentBuilder();