Search in sources :

Example 1 with StateDataToRecordRpcMessage

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

the class QuickCheckStateRefactoring method checkInitialConditions.

@Override
public RefactoringStatus checkInitialConditions(final IProgressMonitor pm) throws CoreException, OperationCanceledException {
    // FIXME: what kind of preconditions do I need?
    final IErlMemberSelection sel = (IErlMemberSelection) GlobalParameters.getWranglerSelection();
    final StateDataToRecordRpcMessage message = runFirst(sel);
    if (!message.isSuccessful()) {
        return RefactoringStatus.createFatalErrorStatus(message.getMessageString());
    }
    fieldCount = message.getFieldCount();
    stateFuns = message.getStateFuns();
    return new RefactoringStatus();
}
Also used : StateDataToRecordRpcMessage(org.erlide.wrangler.refactoring.backend.internal.StateDataToRecordRpcMessage) IErlMemberSelection(org.erlide.wrangler.refactoring.selection.IErlMemberSelection) RefactoringStatus(org.eclipse.ltk.core.refactoring.RefactoringStatus)

Aggregations

RefactoringStatus (org.eclipse.ltk.core.refactoring.RefactoringStatus)1 StateDataToRecordRpcMessage (org.erlide.wrangler.refactoring.backend.internal.StateDataToRecordRpcMessage)1 IErlMemberSelection (org.erlide.wrangler.refactoring.selection.IErlMemberSelection)1