PromoteTempToFieldRefactoring ref= new PromoteTempToFieldRefactoring(cu, selection.getOffset(), selection.getLength());
PromoteTempToFieldRefactoring ref= new PromoteTempToFieldRefactoring(cu, selection.getOffset(), selection.getLength(), JavaPreferencesSettings.getCodeGenerationSettings());
	private void passHelper(int startLine, int startColumn, int endLine, int endColumn, 						  String newName,						  boolean declareStatic,						  boolean declareFinal,						  int initializeIn,						  int accessModifier) throws Exception{						  			ICompilationUnit cu= createCUfromTestFile(getPackageP(), true, true);						  			ISourceRange selection= TextRangeUtil.getSelection(cu, startLine, startColumn, endLine, endColumn);        PromoteTempToFieldRefactoring ref= new PromoteTempToFieldRefactoring(cu, selection.getOffset(), selection.getLength());		RefactoringStatus activationResult= ref.checkActivation(new NullProgressMonitor());			assertTrue("activation was supposed to be successful", activationResult.isOK());        ref.setFieldName(newName);        ref.setDeclareFinal(declareFinal);        ref.setDeclareStatic(declareStatic);        ref.setInitializeIn(initializeIn);        ref.setVisibility(accessModifier);				RefactoringStatus checkInputResult= ref.checkInput(new NullProgressMonitor());		assertTrue("precondition was supposed to pass", checkInputResult.isOK());		performChange(ref.createChange(new NullProgressMonitor()));        				IPackageFragment pack= (IPackageFragment)cu.getParent();		String newCuName= getSimpleTestFileName(true, true);		ICompilationUnit newcu= pack.getCompilationUnit(newCuName);		assertTrue(newCuName + " does not exist", newcu.exists());		assertEquals("incorrect changes", getFileContents(getTestFileName(true, false)), newcu.getSource());		SourceCompareUtil.compare(newcu.getSource(), getFileContents(getTestFileName(true, false)));	}