Search in sources :

Example 1 with ProcessRpcMessage

use of org.erlide.wrangler.refactoring.backend.internal.ProcessRpcMessage in project erlide_eclipse by erlang.

the class ProcessRelatedRefactoring method checkFinalConditions.

@Override
public RefactoringStatus checkFinalConditions(final IProgressMonitor pm) throws CoreException, OperationCanceledException {
    final IErlSelection sel = GlobalParameters.getWranglerSelection();
    final ProcessRpcMessage msg = checkUndecidables((IErlMemberSelection) sel);
    if (msg.isSuccessful()) {
        changedFiles = msg.getRefactoringChangeset();
        return new RefactoringStatus();
    } else if (msg.hasUndecidables()) {
        undecidables = msg.getMessageString();
        final IRefactoringRpcMessage message = run(sel);
        changedFiles = message.getRefactoringChangeset();
        return RefactoringStatus.createWarningStatus(getUndecidableWarningMessage());
    } else {
        return RefactoringStatus.createFatalErrorStatus(msg.getMessageString());
    }
}
Also used : IRefactoringRpcMessage(org.erlide.wrangler.refactoring.backend.IRefactoringRpcMessage) RefactoringStatus(org.eclipse.ltk.core.refactoring.RefactoringStatus) IErlSelection(org.erlide.wrangler.refactoring.selection.IErlSelection) ProcessRpcMessage(org.erlide.wrangler.refactoring.backend.internal.ProcessRpcMessage)

Aggregations

RefactoringStatus (org.eclipse.ltk.core.refactoring.RefactoringStatus)1 IRefactoringRpcMessage (org.erlide.wrangler.refactoring.backend.IRefactoringRpcMessage)1 ProcessRpcMessage (org.erlide.wrangler.refactoring.backend.internal.ProcessRpcMessage)1 IErlSelection (org.erlide.wrangler.refactoring.selection.IErlSelection)1