1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00
David Inglis 2004-04-03 04:19:16 +00:00
parent b761c44c1e
commit 381b012a01

View file

@ -1,13 +1,11 @@
/********************************************************************** /*******************************************************************************
* Copyright (c) 2002,2003,2004 QNX Software Systems and others. * Copyright (c) 2002,2003,2004 QNX Software Systems and others. All rights
* All rights reserved. This program and the accompanying materials * reserved. This program and the accompanying materials are made available
* are made available under the terms of the Common Public License v1.0 * under the terms of the Common Public License v1.0 which accompanies this
* which accompanies this distribution, and is available at * distribution, and is available at http://www.eclipse.org/legal/cpl-v10.html
* http://www.eclipse.org/legal/cpl-v10.html
* *
* Contributors: * Contributors: QNX Software Systems - Initial API and implementation
* QNX Software Systems - Initial API and implementation ******************************************************************************/
***********************************************************************/
package org.eclipse.cdt.internal.ui.buildconsole; package org.eclipse.cdt.internal.ui.buildconsole;
import java.util.ArrayList; import java.util.ArrayList;
@ -191,6 +189,7 @@ public class BuildConsolePage extends Page implements ISelectionListener, IPrope
menu.add(fClearOutputAction); menu.add(fClearOutputAction);
menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
} }
/* /*
* (non-Javadoc) * (non-Javadoc)
* *
@ -199,24 +198,23 @@ public class BuildConsolePage extends Page implements ISelectionListener, IPrope
public void propertyChange(PropertyChangeEvent event) { public void propertyChange(PropertyChangeEvent event) {
final Object source = event.getSource(); final Object source = event.getSource();
final String property = event.getProperty(); final String property = event.getProperty();
Display display = getControl().getDisplay();
display.asyncExec(new Runnable() {
/* (non-Javadoc)
* @see java.lang.Runnable#run()
*/
public void run() {
if (BuildConsole.P_STREAM_COLOR.equals(property) && source instanceof BuildConsoleStream) { if (BuildConsole.P_STREAM_COLOR.equals(property) && source instanceof BuildConsoleStream) {
BuildConsoleStream stream = (BuildConsoleStream) source; BuildConsoleStream stream = (BuildConsoleStream) source;
if (stream.getConsole().equals(getConsole())) { if (stream.getConsole().equals(getConsole()) && getControl() != null) {
Display display = getControl().getDisplay();
display.asyncExec(new Runnable() {
public void run() {
getViewer().getTextWidget().redraw(); getViewer().getTextWidget().redraw();
} }
});
} else if (property.equals(BuildConsolePreferencePage.PREF_BUILDCONSOLE_FONT)) { } else if (property.equals(BuildConsolePreferencePage.PREF_BUILDCONSOLE_FONT)) {
setFont(JFaceResources.getFont(BuildConsolePreferencePage.PREF_BUILDCONSOLE_FONT)); setFont(JFaceResources.getFont(BuildConsolePreferencePage.PREF_BUILDCONSOLE_FONT));
} else if (property.equals(BuildConsolePreferencePage.PREF_BUILDCONSOLE_TAB_WIDTH)) { } else if (property.equals(BuildConsolePreferencePage.PREF_BUILDCONSOLE_TAB_WIDTH)) {
setTabs(CUIPlugin.getDefault().getPluginPreferences().getInt(BuildConsolePreferencePage.PREF_BUILDCONSOLE_TAB_WIDTH)); setTabs(CUIPlugin.getDefault().getPluginPreferences().getInt(BuildConsolePreferencePage.PREF_BUILDCONSOLE_TAB_WIDTH));
} }
} }
});
} }