Package org.eclipse.ui.console

Examples of org.eclipse.ui.console.IOConsoleOutputStream


                return 0;
            }
        };

        setName(computeName());
        final IOConsoleOutputStream outputStream = newOutputStream();

        boolean remoteShellEnabled = false;
        try {
            final ILaunchConfiguration configuration = process.getLaunch().getLaunchConfiguration();
            remoteShellEnabled =
View Full Code Here


     * OutputStream interface
     */
    @Override
    public void write(int b) throws IOException {
        if (writeToConsole) {
            IOConsoleOutputStream out = getOutputStream();
            out.write(b);
        }
    }
View Full Code Here

         */
        public void run() {
            try {
                if (canPassPyLint()) {

                    IOConsoleOutputStream out = getConsoleOutputStream();

                    final IDocument doc = document.call();
                    passPyLint(resource, out, doc);

                    new Job("Adding markers") {
View Full Code Here

        }
        ArrayList<String> parametersWithResource = new ArrayList<String>(parameters);
        parametersWithResource.add(0, dir);
        Tuple<String, String> tup = runner.runCodeAndGetOutput(RUN_2_TO_3_CODE,
                parametersWithResource.toArray(new String[0]), workingDir, monitor);
        IOConsoleOutputStream out = MessageConsoles.getConsoleOutputStream("2To3", UIConstants.PY_INTERPRETER_ICON);
        try {
            out.write(tup.o1);
            out.write("\n");
            out.write(tup.o2);
        } catch (IOException e) {
            Log.log(e);
        }
        return 1;
    }
View Full Code Here

    private static Map<String, IOConsoleOutputStream> consoleOutputs = new HashMap<String, IOConsoleOutputStream>();
    private static Object lock = new Object();

    public static IOConsoleOutputStream getConsoleOutputStream(String name, String iconPath) {
        synchronized (lock) {
            IOConsoleOutputStream outputStream = consoleOutputs.get(name);
            if (outputStream == null) {
                MessageConsole console = getConsole(name, iconPath);

                HashMap<IOConsoleOutputStream, String> themeConsoleStreamToColor = new HashMap<IOConsoleOutputStream, String>();
                outputStream = console.newOutputStream();
View Full Code Here

                            return;
                        }

                        //also print to console
                        System.out.println(buffer);
                        IOConsoleOutputStream c = getConsoleOutputStream();
                        c.write(buffer.toString());
                        c.write("\r\n");

                        //                IPath stateLocation = default1.getStateLocation().append("PyDevLog.log");
                        //                String file = stateLocation.toOSString();
                        //                REF.appendStrToFile(buffer+"\r\n", file);
                    } catch (Throwable e) {
View Full Code Here

            //After the command completes, refresh and put message for user.
            final IProcess[] processes = launch.getProcesses();
            ProcessConsoleManager consoleManager = DebugUIPlugin.getDefault().getProcessConsoleManager();
            if (processes.length >= 1) {
                IConsole console = consoleManager.getConsole(processes[0]);
                final IOConsoleOutputStream outputStream = ((IOConsole) console).newOutputStream();

                Job j = new Job("Refresh on finish") {

                    protected IStatus run(IProgressMonitor monitor) {
                        boolean allTerminated = false;
                        while (!allTerminated) {
                            allTerminated = true;
                            for (IProcess p : processes) {
                                if (!p.isTerminated()) {
                                    allTerminated = false;
                                    break;
                                }
                            }
                            synchronized (this) {
                                try {
                                    this.wait(50);
                                } catch (InterruptedException e) {
                                }
                            }

                        }
                        try {
                            outputStream.write(com.aptana.shared_core.string.StringUtils.format("Finished \""
                                    + finalManageDotPy.getLocation().toOSString() + " " + command + "\" execution."));
                        } catch (IOException e1) {
                            Log.log(e1);
                        }

                        try {
                            outputStream.close();
                        } catch (IOException e1) {
                            Log.log(e1);
                        }
                        try {
                            selectedProject.refreshLocal(IResource.DEPTH_INFINITE, null);
View Full Code Here

TOP

Related Classes of org.eclipse.ui.console.IOConsoleOutputStream

Copyright © 2018 www.massapicom. 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.