Bug 111453 [preferences] Improve preview of enum constant formatting
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/LineWrappingTabPage.java
private List fElements= new ArrayList();
	    
	    public void refreshState(IStructuredSelection selection) {
	        Map wrappingStyleMap= new HashMap();
		    Map indentStyleMap= new HashMap();
		    Map forceWrappingMap= new HashMap();
	        fElements.clear();
	        evaluateElements(selection.iterator());
	        evaluateMaps(wrappingStyleMap, indentStyleMap, forceWrappingMap);
	        setPreviewText(getPreviewText(wrappingStyleMap, indentStyleMap, forceWrappingMap));
	        refreshControls(wrappingStyleMap, indentStyleMap, forceWrappingMap);
	    }
	    
	    public List getElements() {
	        return fElements;
	    }
	    
	    private void evaluateElements(Iterator iterator) {
            Category category;
            String value;
            while (iterator.hasNext()) {
                category= (Category) iterator.next();
                value= (String)fWorkingValues.get(category.key);
                if (value != null) {
                    if (!fElements.contains(category))
                        fElements.add(category);