Search in sources :

Example 1 with OtpErlangFloat

use of com.ericsson.otp.erlang.OtpErlangFloat in project erlide_eclipse by erlang.

the class SimilarSearchAction method callRefactoring.

@Override
protected IResultParser callRefactoring() throws WranglerRpcParsingException, CoreException, IOException, WranglerWarningException {
    final IErlMemberSelection sel = (IErlMemberSelection) GlobalParameters.getWranglerSelection();
    final WranglerRefactoringBackend backend = WranglerBackendManager.getRefactoringBackend();
    RpcResult result = null;
    String functionName;
    if (onlyInFile) {
        functionName = "simi_expr_search_in_buffer_eclipse";
    } else {
        functionName = "simi_expr_search_in_dirs_eclipse";
    }
    result = backend.callWithoutParser(WranglerRefactoringBackend.UNLIMITED_TIMEOUT, functionName, "sxxxxi", sel.getFilePath(), sel.getSelectionRange().getStartPos(), sel.getSelectionRange().getEndPos(), new OtpErlangFloat(simScore), sel.getSearchPath(), GlobalParameters.getTabWidth());
    if (result.isOk()) {
        return new SimilarExpressionSearchParser(result.getValue());
    }
    throw new WranglerRpcParsingException("RPC error");
}
Also used : WranglerRefactoringBackend(org.erlide.wrangler.refactoring.backend.internal.WranglerRefactoringBackend) IErlMemberSelection(org.erlide.wrangler.refactoring.selection.IErlMemberSelection) RpcResult(org.erlide.runtime.rpc.RpcResult) OtpErlangFloat(com.ericsson.otp.erlang.OtpErlangFloat) WranglerRpcParsingException(org.erlide.wrangler.refactoring.exception.WranglerRpcParsingException)

Aggregations

OtpErlangFloat (com.ericsson.otp.erlang.OtpErlangFloat)1 RpcResult (org.erlide.runtime.rpc.RpcResult)1 WranglerRefactoringBackend (org.erlide.wrangler.refactoring.backend.internal.WranglerRefactoringBackend)1 WranglerRpcParsingException (org.erlide.wrangler.refactoring.exception.WranglerRpcParsingException)1 IErlMemberSelection (org.erlide.wrangler.refactoring.selection.IErlMemberSelection)1