mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
This commit is contained in:
parent
b761c44c1e
commit
381b012a01
1 changed files with 28 additions and 30 deletions
|
@ -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;
|
||||||
|
@ -180,7 +178,7 @@ public class BuildConsolePage extends Page implements ISelectionListener, IPrope
|
||||||
* Fill the context menu
|
* Fill the context menu
|
||||||
*
|
*
|
||||||
* @param menu
|
* @param menu
|
||||||
* menu
|
* menu
|
||||||
*/
|
*/
|
||||||
protected void contextMenuAboutToShow(IMenuManager menu) {
|
protected void contextMenuAboutToShow(IMenuManager menu) {
|
||||||
menu.add((IAction) fGlobalActions.get(ActionFactory.COPY.getId()));
|
menu.add((IAction) fGlobalActions.get(ActionFactory.COPY.getId()));
|
||||||
|
@ -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() {
|
if (BuildConsole.P_STREAM_COLOR.equals(property) && source instanceof BuildConsoleStream) {
|
||||||
/* (non-Javadoc)
|
BuildConsoleStream stream = (BuildConsoleStream) source;
|
||||||
* @see java.lang.Runnable#run()
|
if (stream.getConsole().equals(getConsole()) && getControl() != null) {
|
||||||
*/
|
Display display = getControl().getDisplay();
|
||||||
public void run() {
|
display.asyncExec(new Runnable() {
|
||||||
if (BuildConsole.P_STREAM_COLOR.equals(property) && source instanceof BuildConsoleStream) {
|
|
||||||
BuildConsoleStream stream = (BuildConsoleStream) source;
|
public void run() {
|
||||||
if (stream.getConsole().equals(getConsole())) {
|
|
||||||
getViewer().getTextWidget().redraw();
|
getViewer().getTextWidget().redraw();
|
||||||
}
|
}
|
||||||
} else if (property.equals(BuildConsolePreferencePage.PREF_BUILDCONSOLE_FONT)) {
|
});
|
||||||
setFont(JFaceResources.getFont(BuildConsolePreferencePage.PREF_BUILDCONSOLE_FONT));
|
} else if (property.equals(BuildConsolePreferencePage.PREF_BUILDCONSOLE_FONT)) {
|
||||||
} else if (property.equals(BuildConsolePreferencePage.PREF_BUILDCONSOLE_TAB_WIDTH)) {
|
setFont(JFaceResources.getFont(BuildConsolePreferencePage.PREF_BUILDCONSOLE_FONT));
|
||||||
setTabs(CUIPlugin.getDefault().getPluginPreferences().getInt(BuildConsolePreferencePage.PREF_BUILDCONSOLE_TAB_WIDTH));
|
} else if (property.equals(BuildConsolePreferencePage.PREF_BUILDCONSOLE_TAB_WIDTH)) {
|
||||||
}
|
setTabs(CUIPlugin.getDefault().getPluginPreferences().getInt(BuildConsolePreferencePage.PREF_BUILDCONSOLE_TAB_WIDTH));
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -382,7 +380,7 @@ public class BuildConsolePage extends Page implements ISelectionListener, IPrope
|
||||||
* Sets the font for this page.
|
* Sets the font for this page.
|
||||||
*
|
*
|
||||||
* @param font
|
* @param font
|
||||||
* font
|
* font
|
||||||
*/
|
*/
|
||||||
protected void setFont(Font font) {
|
protected void setFont(Font font) {
|
||||||
getViewer().getTextWidget().setFont(font);
|
getViewer().getTextWidget().setFont(font);
|
||||||
|
@ -391,17 +389,17 @@ public class BuildConsolePage extends Page implements ISelectionListener, IPrope
|
||||||
/**
|
/**
|
||||||
* Sets the tab width for this page.
|
* Sets the tab width for this page.
|
||||||
*
|
*
|
||||||
* @param int
|
* @param int
|
||||||
* tab width
|
* tab width
|
||||||
*/
|
*/
|
||||||
protected void setTabs(int tabs) {
|
protected void setTabs(int tabs) {
|
||||||
getViewer().getTextWidget().setTabs(tabs);
|
getViewer().getTextWidget().setTabs(tabs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Refreshes this page
|
* Refreshes this page
|
||||||
*/
|
*/
|
||||||
protected void refresh() {
|
protected void refresh() {
|
||||||
getViewer().refresh();
|
getViewer().refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue