Search in sources :

Example 6 with RenameSupport

use of org.eclipse.jdt.ui.refactoring.RenameSupport in project xtext-xtend by eclipse.

the class RenameJvmOperationTest method renameJavaElement.

public void renameJavaElement(final IType javaElement, final String newName) throws Exception {
    this.syncUtil.totalSync(false);
    final RenameSupport renameSupport = RenameSupport.create(javaElement, newName, RenameSupport.UPDATE_REFERENCES);
    renameSupport.perform(this.workbench.getActiveWorkbenchWindow().getShell(), this.workbench.getActiveWorkbenchWindow());
    this.syncUtil.totalSync(false);
    Assert.assertTrue(this.compositeRefactoringProcessorAccess.isDisposed());
}
Also used : RenameSupport(org.eclipse.jdt.ui.refactoring.RenameSupport)

Example 7 with RenameSupport

use of org.eclipse.jdt.ui.refactoring.RenameSupport in project xtext-xtend by eclipse.

the class XImportSectionUpdateOnRenameTest method renameJavaElement.

public void renameJavaElement(final IMethod javaElement, final String newName) throws Exception {
    this.syncUtil.totalSync(false);
    final RenameSupport renameSupport = RenameSupport.create(javaElement, newName, RenameSupport.UPDATE_REFERENCES);
    renameSupport.perform(this.workbench.getActiveWorkbenchWindow().getShell(), this.workbench.getActiveWorkbenchWindow());
    this.syncUtil.totalSync(false);
    Assert.assertTrue(this.compositeRefactoringProcessorAccess.isDisposed());
}
Also used : RenameSupport(org.eclipse.jdt.ui.refactoring.RenameSupport)

Example 8 with RenameSupport

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

the class RefactoringTest method renameJavaClass.

protected void renameJavaClass() throws Exception {
    RenameSupport renameSupport = RenameSupport.create(javaProject.findType("test.JavaClass"), "NewJavaClass", RenameSupport.UPDATE_REFERENCES);
    renameSupport.perform(activeWorkbenchWindow.getShell(), activeWorkbenchWindow);
    waitForBuild();
}
Also used : IRenameSupport(org.eclipse.xtext.ui.refactoring.ui.IRenameSupport) RenameSupport(org.eclipse.jdt.ui.refactoring.RenameSupport)

Example 9 with RenameSupport

use of org.eclipse.jdt.ui.refactoring.RenameSupport in project xtext-xtend by eclipse.

the class AbstractXtendRenameRefactoringTest method renameJavaElement.

protected void renameJavaElement(IField javaElement, String newName) throws CoreException, InterruptedException, InvocationTargetException {
    syncUtil.totalSync(false);
    RenameSupport renameSupport = RenameSupport.create(javaElement, newName, RenameSupport.UPDATE_REFERENCES);
    renameSupport.perform(workbench.getActiveWorkbenchWindow().getShell(), workbench.getActiveWorkbenchWindow());
    syncUtil.totalSync(false);
    assertTrue(compositeRefactoringProcessorAccess.isDisposed());
}
Also used : RenameSupport(org.eclipse.jdt.ui.refactoring.RenameSupport)

Example 10 with RenameSupport

use of org.eclipse.jdt.ui.refactoring.RenameSupport in project xtext-xtend by eclipse.

the class RenameJvmOperationTest method renameJavaElement.

public void renameJavaElement(final IMethod javaElement, final String newName) throws Exception {
    this.syncUtil.totalSync(false);
    final RenameSupport renameSupport = RenameSupport.create(javaElement, newName, RenameSupport.UPDATE_REFERENCES);
    renameSupport.perform(this.workbench.getActiveWorkbenchWindow().getShell(), this.workbench.getActiveWorkbenchWindow());
    this.syncUtil.totalSync(false);
    Assert.assertTrue(this.compositeRefactoringProcessorAccess.isDisposed());
}
Also used : RenameSupport(org.eclipse.jdt.ui.refactoring.RenameSupport)

Aggregations

RenameSupport (org.eclipse.jdt.ui.refactoring.RenameSupport)17 IPackageFragment (org.eclipse.jdt.core.IPackageFragment)3 CoreException (org.eclipse.core.runtime.CoreException)2 IJavaElement (org.eclipse.jdt.core.IJavaElement)2 IMethod (org.eclipse.jdt.core.IMethod)2 IType (org.eclipse.jdt.core.IType)2 ArrayList (java.util.ArrayList)1 LinkedModeModel (org.eclipse.che.ide.ext.java.shared.dto.LinkedModeModel)1 ChangeInfo (org.eclipse.che.ide.ext.java.shared.dto.refactoring.ChangeInfo)1 RefactoringResult (org.eclipse.che.ide.ext.java.shared.dto.refactoring.RefactoringResult)1 RenameRefactoringSession (org.eclipse.che.ide.ext.java.shared.dto.refactoring.RenameRefactoringSession)1 RenameLinkedModeRefactoringSession (org.eclipse.che.plugin.java.server.refactoring.session.RenameLinkedModeRefactoringSession)1 RenameSession (org.eclipse.che.plugin.java.server.refactoring.session.RenameSession)1 IField (org.eclipse.jdt.core.IField)1 Change (org.eclipse.ltk.core.refactoring.Change)1 CompositeChange (org.eclipse.ltk.core.refactoring.CompositeChange)1 PerformChangeOperation (org.eclipse.ltk.core.refactoring.PerformChangeOperation)1 RefactoringStatus (org.eclipse.ltk.core.refactoring.RefactoringStatus)1 RenameRefactoring (org.eclipse.ltk.core.refactoring.participants.RenameRefactoring)1 IRenameSupport (org.eclipse.xtext.ui.refactoring.ui.IRenameSupport)1