Bug 49461 [preferences] code formatter not configured with Java project options
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
env.forceInstall();
					
					level.fOffset= offset;
					level.fLength= 2;
			
					
					if (fBracketLevelStack.size() == 1) {
						document.addPositionCategory(CATEGORY);
						document.addPositionUpdater(fUpdater);
					}
					level.fFirstPosition= new Position(offset, 1);
					level.fSecondPosition= new Position(offset + 1, 1);
					document.addPosition(CATEGORY, level.fFirstPosition);
					document.addPosition(CATEGORY, level.fSecondPosition);
					
					level.fEditor= new LinkedUIControl(env, sourceViewer);
					level.fEditor.setPositionListener(new EditorHistoryUpdater());
					level.fEditor.setExitPolicy(new ExitPolicy(closingCharacter, getEscapeCharacter(closingCharacter), fBracketLevelStack));
					level.fEditor.setExitPosition(sourceViewer, offset + 2, 0, Integer.MAX_VALUE);
					level.fEditor.setCyclingMode(LinkedUIControl.CYCLE_NEVER);
					level.fEditor.enter();
					
					
					IRegion newSelection= level.fEditor.getSelectedRegion();
					sourceViewer.setSelectedRange(newSelection.getOffset(), newSelection.getLength());
	
					event.doit= false;
				} catch (BadLocationException e) {
					JavaPlugin.log(e);
				} catch (BadPositionCategoryException e) {