Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Inglis2005-07-06 14:36:50 -0400
committerDavid Inglis2005-07-06 14:36:50 -0400
commit8d3bd00d1ced817313a29a164c05064896fc0950 (patch)
tree389db45593c89a453c09392d8c53ae3906e625a5
parent3ed18af344126fd366de08cc2524d5d6ac99d9f4 (diff)
downloadorg.eclipse.cdt-8d3bd00d1ced817313a29a164c05064896fc0950.tar.gz
org.eclipse.cdt-8d3bd00d1ced817313a29a164c05064896fc0950.tar.xz
org.eclipse.cdt-8d3bd00d1ced817313a29a164c05064896fc0950.zip
2005-07-06 David Inglis - fixed bug#102546
-rw-r--r--core/org.eclipse.cdt.core/ChangeLog7
-rw-r--r--core/org.eclipse.cdt.core/plugin.xml6
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java7
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/SystemBuildConsole.java56
4 files changed, 73 insertions, 3 deletions
diff --git a/core/org.eclipse.cdt.core/ChangeLog b/core/org.eclipse.cdt.core/ChangeLog
index dcf50b4798..a7a5d7a599 100644
--- a/core/org.eclipse.cdt.core/ChangeLog
+++ b/core/org.eclipse.cdt.core/ChangeLog
@@ -1,3 +1,10 @@
+2005-07-06 David Inglis
+ fixed bug#102546
+
+ * src/org/eclipse/cdt/core/CCorePlugin.java
+ * src/org/eclipse/cdt/internal/core/SystemBuildConsole.java
+ * plugins.xml
+
2005-07-05 Alain Magloire
Fix for PR 102327: ContentType framework.
* model/org/eclipse/cdt/core/model/CoreModel.java
diff --git a/core/org.eclipse.cdt.core/plugin.xml b/core/org.eclipse.cdt.core/plugin.xml
index 421d68c91a..b8a60c3da7 100644
--- a/core/org.eclipse.cdt.core/plugin.xml
+++ b/core/org.eclipse.cdt.core/plugin.xml
@@ -588,6 +588,12 @@
description="%cdt_pathentry_var.description">
</variable>
</extension>
+ <extension
+ point="org.eclipse.cdt.core.CBuildConsole">
+ <CBuildConsole
+ class="org.eclipse.cdt.internal.core.SystemBuildConsole"
+ id="org.eclipse.cdt.core.systemConsole"/>
+ </extension>
<!-- =================================================================================== -->
<!-- Dynamic Variables -->
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java
index 95d55bb1ab..2e4206cf56 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java
@@ -477,8 +477,8 @@ public class CCorePlugin extends Plugin {
for (int i = 0; i < extensions.length; i++) {
IConfigurationElement[] configElements = extensions[i].getConfigurationElements();
for (int j = 0; j < configElements.length; j++) {
- String builderID = configElements[j].getAttribute("id"); //$NON-NLS-1$
- if ((id == null && builderID == null) || (id != null && id.equals(builderID))) {
+ String consoleID = configElements[j].getAttribute("id"); //$NON-NLS-1$
+ if ((id == null && consoleID == null) || (id != null && id.equals(consoleID))) {
return (IConsole) configElements[j].createExecutableExtension("class"); //$NON-NLS-1$
}
}
@@ -513,7 +513,8 @@ public class CCorePlugin extends Plugin {
}
public IConsole getConsole() {
- return getConsole(null);
+ String consoleID = System.getProperty("org.eclipse.cdt.core.console"); //$NON-NLS-1$
+ return getConsole(consoleID);
}
public ICExtensionReference[] getBinaryParserExtensions(IProject project) throws CoreException {
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/SystemBuildConsole.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/SystemBuildConsole.java
new file mode 100644
index 0000000000..530be65340
--- /dev/null
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/SystemBuildConsole.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2004 QNX Software Systems and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Common Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors: QNX Software Systems - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.cdt.internal.core;
+
+import org.eclipse.cdt.core.ConsoleOutputStream;
+import org.eclipse.cdt.core.resources.IConsole;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+
+
+public class SystemBuildConsole implements IConsole {
+ final ConsoleOutputStream out;
+ final ConsoleOutputStream err;
+
+ public SystemBuildConsole() {
+ out = new ConsoleOutputStream() {
+ public synchronized void write(byte[] b, int off, int len) throws java.io.IOException {
+ System.out.write(b, off, len);
+ }
+
+ public synchronized void write(int c) throws java.io.IOException {
+ System.out.write(c);
+ }
+ };
+ err = new ConsoleOutputStream() {
+ public synchronized void write(byte[] b, int off, int len) throws java.io.IOException {
+ System.err.write(b, off, len);
+ }
+
+ public synchronized void write(int c) throws java.io.IOException {
+ System.err.write(c);
+ }
+ };
+ }
+
+ public void start(IProject project) {
+ }
+
+ public ConsoleOutputStream getOutputStream() throws CoreException {
+ return out;
+ }
+
+ public ConsoleOutputStream getInfoStream() throws CoreException {
+ return out;
+ }
+
+ public ConsoleOutputStream getErrorStream() throws CoreException {
+ return err;
+ }
+}

Back to the top