/*******************************************************************************
* Copyright (c) 2014 Rohde & Schwarz GmbH & Co. KG and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Martin Runge - initial implementation of cmake support
*******************************************************************************/
package org.eclipse.cdt.cmake.ui;
import org.eclipse.cdt.core.ConsoleOutputStream;
import org.eclipse.cdt.core.resources.IConsole;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.ui.IBuildConsoleManager;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
public class CMakeConsole implements IConsole {
IProject project;
IBuildConsoleManager fConsoleManager;
public CMakeConsole() {
fConsoleManager = CUIPlugin.getDefault().getConsoleManager("CMake console", "org.eclipse.cdt.cmake.CMakeConsole");
}
@Override
public void start(IProject project) {
this.project = project;
fConsoleManager.getConsole(project).start(project);
}
@Override
public ConsoleOutputStream getOutputStream() throws CoreException {
return fConsoleManager.getConsole(project).getOutputStream();
}
@Override
public ConsoleOutputStream getInfoStream() throws CoreException {
return fConsoleManager.getConsole(project).getInfoStream();
}
@Override
public ConsoleOutputStream getErrorStream() throws CoreException {
return fConsoleManager.getConsole(project).getErrorStream();
}
}