Bug 81983 [preferences] Disabling and enabling folding on small file takes forever
3.1 M4 Using enable/disable folding on a small CU takes forever. This is caused by the recent change to apply the preference to all Java editors. In another (hidden) window (Debug) I had StyledText open which (understandably) took long to react on the preference change. Non-visible editor's should not react to this change until they become visible.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
public void updatedTitleImage(Image image) {
		setTitleImage(image);
	}
	
	/*
	 * @see AbstractTextEditor#handlePreferenceStoreChanged(PropertyChangeEvent)
	 */
	protected void handlePreferenceStoreChanged(PropertyChangeEvent event) {
		
		if (AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH.equals(event.getProperty())) {
			/*
			 * Ignore tab setting since we rely on the formatter preferences.
			 * We do this outside the try-finally block to avoid that EDITOR_TAB_WIDTH
			 * is handled by the sub-class (AbstractDecoratedTextEditor).
			 */
			return;
		}
		
		try {			
			ISourceViewer sourceViewer= getSourceViewer();
			if (sourceViewer == null)
				return;
				
			String property= event.getProperty();	
			
			if (isJavaEditorHoverProperty(property))
				updateHoverBehavior();
			
			boolean newBooleanValue= Boolean.valueOf(event.getNewValue().toString()).booleanValue();