use of org.erlide.wrangler.refactoring.backend.IRefactoringRpcMessage in project erlide_eclipse by erlang.
the class FoldRemoteExpressionRefactoring method checkFinalConditions.
@Override
public RefactoringStatus checkFinalConditions(final IProgressMonitor pm) throws CoreException, OperationCanceledException {
final IErlSelection sel = GlobalParameters.getWranglerSelection();
final IRefactoringRpcMessage message = run(sel);
if (message.isSuccessful()) {
changedFiles = message.getRefactoringChangeset();
return new RefactoringStatus();
}
return RefactoringStatus.createFatalErrorStatus(message.getMessageString());
}
use of org.erlide.wrangler.refactoring.backend.IRefactoringRpcMessage in project erlide_eclipse by erlang.
the class MergeLetRefactoring method checkFinalConditions.
@Override
public RefactoringStatus checkFinalConditions(final IProgressMonitor pm) throws CoreException, OperationCanceledException {
final IErlSelection sel = GlobalParameters.getWranglerSelection();
final IRefactoringRpcMessage message = run(sel);
if (message.isSuccessful()) {
changedFiles = message.getRefactoringChangeset();
return new RefactoringStatus();
}
return RefactoringStatus.createFatalErrorStatus(message.getMessageString());
}
use of org.erlide.wrangler.refactoring.backend.IRefactoringRpcMessage in project erlide_eclipse by erlang.
the class RenameFunctionRefactoring method getWorkflowController.
@Override
public RefactoringWorkflowController getWorkflowController(final Shell shell) {
return new RefactoringWorkflowController(shell) {
@Override
public void doRefactoring() {
final IErlSelection sel = GlobalParameters.getWranglerSelection();
IRefactoringRpcMessage message = run(sel);
if (message.isSuccessful()) {
changedFiles = message.getRefactoringChangeset();
status = new RefactoringStatus();
} else if (message.getRefactoringState() == RefactoringState.WARNING) {
if (ask("Warning", message.getMessageString())) {
message = runAlternative(sel);
if (message.getRefactoringState() == RefactoringState.OK) {
status = new RefactoringStatus();
} else {
status = RefactoringStatus.createFatalErrorStatus(message.getMessageString());
}
} else {
stop();
}
} else {
status = RefactoringStatus.createFatalErrorStatus(message.getMessageString());
}
}
};
}
Aggregations