Search in sources :

Example 6 with IRenameSupport

use of org.eclipse.xtext.ui.refactoring.ui.IRenameSupport in project xtext-eclipse by eclipse.

the class RefactoringTest method testRenameJvmReference.

@Test
public void testRenameJvmReference() throws Exception {
    setLanguageConfig(false, false);
    IRenameSupport renameSupport = createRenameSupportForJvmReference();
    assertNull(renameSupport);
}
Also used : IRenameSupport(org.eclipse.xtext.ui.refactoring.ui.IRenameSupport) Test(org.junit.Test) AbstractEditorTest(org.eclipse.xtext.ui.testing.AbstractEditorTest)

Example 7 with IRenameSupport

use of org.eclipse.xtext.ui.refactoring.ui.IRenameSupport in project xtext-eclipse by eclipse.

the class RefactoringTest method testRenameElement.

@Test
public void testRenameElement() throws Exception {
    setLanguageConfig(false, false);
    IRenameSupport renameSupport = createRenameSupportForElement();
    assertNull(renameSupport);
}
Also used : IRenameSupport(org.eclipse.xtext.ui.refactoring.ui.IRenameSupport) Test(org.junit.Test) AbstractEditorTest(org.eclipse.xtext.ui.testing.AbstractEditorTest)

Example 8 with IRenameSupport

use of org.eclipse.xtext.ui.refactoring.ui.IRenameSupport in project xtext-eclipse by eclipse.

the class RefactoringTest method testRenameJvmReference_2.

@Test
public void testRenameJvmReference_2() throws Exception {
    setLanguageConfig(true, true);
    IRenameSupport renameSupport = createRenameSupportForJvmReference();
    assertNotNull(renameSupport);
    renameSupport.startDirectRefactoring();
    waitForBuild();
    assertXtextJvmRefRefactored();
    assertJavaRefactored();
}
Also used : IRenameSupport(org.eclipse.xtext.ui.refactoring.ui.IRenameSupport) Test(org.junit.Test) AbstractEditorTest(org.eclipse.xtext.ui.testing.AbstractEditorTest)

Aggregations

IRenameSupport (org.eclipse.xtext.ui.refactoring.ui.IRenameSupport)8 AbstractEditorTest (org.eclipse.xtext.ui.testing.AbstractEditorTest)6 Test (org.junit.Test)6 JavaModelException (org.eclipse.jdt.core.JavaModelException)2 Model (org.eclipse.xtext.common.types.xtext.ui.refactoringTestLanguage.Model)2 XtextResource (org.eclipse.xtext.resource.XtextResource)2 IRenameElementContext (org.eclipse.xtext.ui.refactoring.ui.IRenameElementContext)2 JvmType (org.eclipse.xtext.common.types.JvmType)1 ReferenceHolder (org.eclipse.xtext.common.types.xtext.ui.refactoringTestLanguage.ReferenceHolder)1