示例#1
0
 @Test
 public void testBothClean_2() throws Exception {
   try {
     refactoringPreferences.setSaveAllBeforeRefactoring(true);
     renameFooToFooBar(fooEditor);
     assertFalse(fooEditor.isDirty());
     assertFalse(barEditor.isDirty());
   } finally {
     refactoringPreferences.setSaveAllBeforeRefactoring(false);
   }
 }
示例#2
0
 @Test
 public void testCleanDirty_1() throws Exception {
   assertFalse(refactoringPreferences.isSaveAllBeforeRefactoring());
   renameFooToFooBar(barEditor);
   assertFalse(fooEditor.isDirty());
   assertFalse(barEditor.isDirty());
 }
示例#3
0
 @Test
 public void testReferrerDirty_0() throws Exception {
   assertFalse(refactoringPreferences.isSaveAllBeforeRefactoring());
   smudge(barEditor);
   renameFooToFooBar(fooEditor);
   assertFalse(fooEditor.isDirty());
   assertTrue(barEditor.isDirty());
 }
示例#4
0
 @Override
 public void setUp() throws Exception {
   super.setUp();
   IJavaProject project = JavaProjectSetupUtil.createJavaProject(TEST_PROJECT);
   addNature(project.getProject(), XtextProjectHelper.NATURE_ID);
   Injector injector = Activator.getInstance().getInjector(getEditorId());
   injector.injectMembers(this);
   IFile fooFile =
       IResourcesSetupUtil.createFile(TEST_PROJECT + "/foo.refactoringtestlanguage", "foo");
   IFile barFile =
       IResourcesSetupUtil.createFile(
           TEST_PROJECT + "/bar.refactoringtestlanguage", "bar { ref foo }");
   waitForAutoBuild();
   fooEditor = openEditor(fooFile);
   barEditor = openEditor(barFile);
   assertTrue(refactoringPreferences.useInlineRefactoring());
 }