Examples of RpcResult


Examples of org.erlide.runtime.rpc.RpcResult

                    "Search for long functions", "Number of lines:",
                    "Search in the project", "", new IntegerInputValidator());
            if (Window.OK == dialog.open()) {
                final int linesVal = Integer.parseInt(dialog.getValue());
                final boolean inProject = dialog.isCheckBoxChecked();
                RpcResult res = null;
                if (inProject) {
                    res = WranglerBackendManager.getRefactoringBackend().callInspection(
                            "long_functions_in_dirs_eclipse", "ixi", linesVal,
                            wranglerSelection.getSearchPath(),
                            GlobalParameters.getTabWidth());
View Full Code Here

Examples of org.erlide.runtime.rpc.RpcResult

                    "Search for nested expression", "Nest level:",
                    "Search in the project", "", new IntegerInputValidator());
            if (Window.OK == dialog.open()) {
                final int nestedVal = Integer.parseInt(dialog.getValue());
                final boolean inProject = dialog.isCheckBoxChecked();
                RpcResult res = null;
                if (inProject) {
                    res = WranglerBackendManager.getRefactoringBackend().callInspection(
                            "nested_exprs_in_dirs_eclipse", "iaxi", nestedVal, type,
                            wranglerSelection.getSearchPath(),
                            GlobalParameters.getTabWidth());
View Full Code Here

Examples of org.erlide.runtime.rpc.RpcResult

        CodeInspectionViewsManager.hideView(NOT_FLUSH_UNKNOWN_MESSAGES);
        final Boolean answer = MessageDialog.openQuestion(shell,
                "Find incomplete receive patterns",
                "Would you like to run the scan in the whole project?");
        try {
            RpcResult result = null;
            String function = "";
            if (answer) {
                function = inProject;
                result = WranglerBackendManager.getRefactoringBackend().callInspection(
                        function, "xi", wranglerSelection.getSearchPath(),
View Full Code Here

Examples of org.erlide.runtime.rpc.RpcResult

            final String inProject = "non_tail_recursive_servers_in_dirs_eclipse";
            final Boolean answer = MessageDialog.openQuestion(shell,
                    "Find non tail recursive servers",
                    "Would you like to run the scan in the whole project?");
            String function = "";
            RpcResult res = null;
            if (!answer) {
                function = inFile;
                res = WranglerBackendManager.getRefactoringBackend()
                        .callInspection(function, "sxi", wranglerSelection.getFilePath(),
                                wranglerSelection.getSearchPath(),
View Full Code Here

Examples of org.erlide.runtime.rpc.RpcResult

        CodeInspectionViewsManager.hideView(
                CodeInspectionViewsManager.CODE_INSPECTION_VIEW, DEPENECIES_2_VIEW_ID);

        // run the rpc
        try {
            final RpcResult res = WranglerBackendManager.getRefactoringBackend()
                    .callInspection("dependencies_of_a_module_eclipse", "sx",
                            wranglerSelection.getFilePath(),
                            wranglerSelection.getSearchPath());

            ArrayList<IErlElement> modules1 = new ArrayList<IErlElement>();
            ArrayList<IErlElement> modules2 = new ArrayList<IErlElement>();

            final OtpErlangObject obj = res.getValue();
            final OtpErlangTuple restuple = (OtpErlangTuple) obj;
            final OtpErlangAtom resindicator = (OtpErlangAtom) restuple.elementAt(0);
            if (resindicator.atomValue().equals("ok")) {
                final OtpErlangTuple listtuple = (OtpErlangTuple) restuple.elementAt(1);
                final OtpErlangList modList1 = (OtpErlangList) listtuple.elementAt(0);
View Full Code Here

Examples of org.erlide.runtime.rpc.RpcResult

        final int ret = dialog.open();
        if (ret == Window.CANCEL) {
            return;
        }
        final int lines = Integer.parseInt(dialog.getValue());
        final RpcResult res = WranglerBackendManager
                .getRefactoringBackend()
                .callInspection("large_modules_eclipse", "ixi", lines,
                        wranglerSelection.getSearchPath(), GlobalParameters.getTabWidth());

        ArrayList<IErlElement> modules = new ArrayList<IErlElement>();
        try {
            final OtpErlangObject obj = res.getValue();
            final OtpErlangTuple restuple = (OtpErlangTuple) obj;
            final OtpErlangAtom resindicator = (OtpErlangAtom) restuple.elementAt(0);
            if (resindicator.atomValue().equals("ok")) {

                final OtpErlangList modList = (OtpErlangList) restuple.elementAt(1);
View Full Code Here

Examples of org.erlide.runtime.rpc.RpcResult

     * @return parsed RPC message
     * @noreference This method is not intended to be referenced by clients.
     */
    public AbstractRefactoringRpcMessage call(final String functionName,
            final String signature, final Object... parameters) {
        final RpcResult res = callWithoutParser(functionName, signature, parameters);
        final AbstractRefactoringRpcMessage message = new RefactoringRpcMessage();
        message.parse(res);
        return message;
    }
View Full Code Here

Examples of org.erlide.runtime.rpc.RpcResult

     * @return RpcResultImpl object
     */
    public RpcResult callWithoutParser(final int timeout, final String functionName,
            final String signature, final Object... parameters) {
        ErlLogger.info("Wrangler call: " + makeLogStr(functionName, parameters));
        RpcResult res;
        if (timeout < 0) {
            res = backend.call_noexception(MODULE, functionName, signature, parameters);
        } else {
            res = backend.call_noexception(timeout, MODULE, functionName, signature,
                    parameters);
View Full Code Here

Examples of org.erlide.runtime.rpc.RpcResult

     */
    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(UNLIMITED_TIMEOUT, INSPECTION_MODULE,
                functionName, signature, parameters);
        try {
            if (res.isOk()) {
                final OtpErlangAtom b = (OtpErlangAtom) res.getValue();
                return b.atomValue().equals("true") || b.atomValue().equals("ok");
            }
        } catch (final Exception e) {
            ErlLogger.error(e);
        }
View Full Code Here

Examples of org.erlide.runtime.rpc.RpcResult

     */
    public RpcResult callInspection(final String functionName, final String signature,
            final Object... parameters) {
        ErlLogger.info("Wrangler inspection call: "
                + makeLogStr(functionName, parameters));
        RpcResult res;
        res = backend.call_noexception(UNLIMITED_TIMEOUT, INSPECTION_MODULE,
                functionName, signature, parameters);
        return res;

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.