Bug 54658 Bug in Code Formatter > Line Wrapping
Code Formatter > Line Wrapping: The preview is not shown correctly from the beginning. The "Set line width for preview window" number has to be reset to another OR even THE SAME value to correct the display.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/LineWrappingTabPage.java
private final List fCategoriesList;
		
		private int fIndex= 0;
		
		public CategoryListener(List categoriesTree) {
			fCategoriesList= new ArrayList();
			flatten(fCategoriesList, categoriesTree);
		}
		
		private void flatten(List categoriesList, List categoriesTree) {
			for (final Iterator iter= categoriesTree.iterator(); iter.hasNext(); ) {
				final Category category= (Category) iter.next();
				category.index= fIndex++;
				categoriesList.add(category);
				flatten(categoriesList, category.children);
			}	
		}
		public void add(Category category) {
			category.index= fIndex++;
			fCategoriesList.add(category);
		}
		public void selectionChanged(SelectionChangedEvent event) {
			final IStructuredSelection selection= (IStructuredSelection)event.getSelection();