use of org.erlide.runtime.rpc.RpcResult in project erlide_eclipse by erlang.
the class WranglerRefactoringBackend method callSimpleInspection.
/**
* Call inspection function which returns with boolean values
*
* @param functionName
* function to call
* @param signature
* signature
* @param parameters
* parameters
* @return true if the call was successful, else false
*/
public boolean callSimpleInspection(final String functionName, final String signature, final Object... parameters) {
ErlLogger.info("Wrangler inspection call: " + makeLogStr(functionName, parameters));
RpcResult res;
res = backend.call_noexception(WranglerRefactoringBackend.UNLIMITED_TIMEOUT, WranglerRefactoringBackend.INSPECTION_MODULE, functionName, signature, parameters);
try {
if (res.isOk()) {
final OtpErlangAtom b = (OtpErlangAtom) res.getValue();
return "true".equals(b.atomValue()) || "ok".equals(b.atomValue());
}
} catch (final Exception e) {
ErlLogger.error(e);
}
return false;
}
Aggregations