Examples of IErlangConsole


Examples of org.erlide.ui.console.IErlangConsole

    IErlProject project;

    @Override
    public void run(final ITextSelection selection0) {
        ITextSelection selection = selection0;
        IErlangConsole console = null;
        final IProject workspaceProject = project.getWorkspaceProject();
        if (workspaceProject == null) {
            return;
        }
        console = getConsole(workspaceProject);
        if (console == null) {
            final String message = "There is no runtime launched for this backend. Please start a runtime to send commands to.";
            final Exception x = new Exception("No runtime started");
            ErrorDialog.openError(getShell(), "No runtime", message, new Status(
                    IStatus.ERROR, ErlideUIPlugin.PLUGIN_ID, 0, x.getMessage(), x));
            return;
        }
        console.getShell().removeListener(consoleBackendShellListener);
        // if selection is empty, grab the whole line
        selection = getLineSelection(selection, false);
        // try to make the text a full erlang expression, ending with dot
        String text = selection.getText().trim();
        if (text.endsWith(",") || text.endsWith(";")) { //$NON-NLS-1$ //$NON-NLS-2$
            text = text.substring(0, text.length() - 1);
        }
        if (!text.endsWith(".")) { //$NON-NLS-1$
            text += "."; //$NON-NLS-1$
        }
        text += "\n"; //$NON-NLS-1$
        // send it off to the console
        if (getOutput) {
            consoleBackendShellListener = new ConsoleBackendShellListener(
                    console.getShell(), getLineSelection(selection, true).getOffset());
            console.getShell().addListener(consoleBackendShellListener);
        }

        final IErlangConsolePage consolePage = ErlideUIPlugin.getDefault()
                .getErlConsoleManager().getPage(console);
        consolePage.input(text);
View Full Code Here

Examples of org.erlide.ui.console.IErlangConsole

        final IBackendManager backendManager = BackendCore.getBackendManager();
        final Set<IBackend> executionBackends = backendManager
                .getExecutionBackends(aproject);
        final ErlConsoleManager erlConsoleManager = ErlideUIPlugin.getDefault()
                .getErlConsoleManager();
        IErlangConsole result = null;
        for (final IBackend backend : executionBackends) {
            result = erlConsoleManager.getConsole(backend);
            if (result != null) {
                break;
            }
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.