Search in sources :

Example 1 with ReorgRefactoringSession

use of org.eclipse.che.plugin.java.server.refactoring.session.ReorgRefactoringSession in project che by eclipse.

the class RefactoringManager method setRefactoringDestination.

public RefactoringStatus setRefactoringDestination(ReorgDestination destination) throws RefactoringException, JavaModelException {
    RefactoringSession session = getRefactoringSession(destination.getSessionId());
    if (!(session instanceof ReorgRefactoringSession)) {
        throw new RefactoringException("Can't set destination on none reorg refactoring session.");
    }
    ReorgRefactoringSession rs = ((ReorgRefactoringSession) session);
    Object dest = getDestination(destination.getProjectPath(), destination.getType(), destination.getDestination());
    org.eclipse.ltk.core.refactoring.RefactoringStatus refactoringStatus = rs.verifyDestination(dest);
    return DtoConverter.toRefactoringStatusDto(refactoringStatus);
}
Also used : ReorgRefactoringSession(org.eclipse.che.plugin.java.server.refactoring.session.ReorgRefactoringSession) MoveRefactoringSession(org.eclipse.che.plugin.java.server.refactoring.session.MoveRefactoringSession) RenameLinkedModeRefactoringSession(org.eclipse.che.plugin.java.server.refactoring.session.RenameLinkedModeRefactoringSession) ReorgRefactoringSession(org.eclipse.che.plugin.java.server.refactoring.session.ReorgRefactoringSession) RefactoringSession(org.eclipse.che.plugin.java.server.refactoring.session.RefactoringSession) RenameRefactoringSession(org.eclipse.che.ide.ext.java.shared.dto.refactoring.RenameRefactoringSession)

Aggregations

RenameRefactoringSession (org.eclipse.che.ide.ext.java.shared.dto.refactoring.RenameRefactoringSession)1 MoveRefactoringSession (org.eclipse.che.plugin.java.server.refactoring.session.MoveRefactoringSession)1 RefactoringSession (org.eclipse.che.plugin.java.server.refactoring.session.RefactoringSession)1 RenameLinkedModeRefactoringSession (org.eclipse.che.plugin.java.server.refactoring.session.RenameLinkedModeRefactoringSession)1 ReorgRefactoringSession (org.eclipse.che.plugin.java.server.refactoring.session.ReorgRefactoringSession)1