Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2004-10-28 15:23:42 +0000
committerDarin Wright2004-10-28 15:23:42 +0000
commitf2d54ec1a0cc4460d80967a94248824937dced9c (patch)
tree94dfaccf167a181cd73d3746fba56b577a4e193f
parent6f466e71f05c335c2d39d87d3b5928d8be614965 (diff)
downloadeclipse.platform.debug-f2d54ec1a0cc4460d80967a94248824937dced9c.tar.gz
eclipse.platform.debug-f2d54ec1a0cc4460d80967a94248824937dced9c.tar.xz
eclipse.platform.debug-f2d54ec1a0cc4460d80967a94248824937dced9c.zip
74123 - Console font problem
-rw-r--r--org.eclipse.ui.console/plugin.properties3
-rw-r--r--org.eclipse.ui.console/plugin.xml12
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleConstants.java4
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsolePage.java11
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java2
5 files changed, 7 insertions, 25 deletions
diff --git a/org.eclipse.ui.console/plugin.properties b/org.eclipse.ui.console/plugin.properties
index 3bfa3a524..9a93d9b3f 100644
--- a/org.eclipse.ui.console/plugin.properties
+++ b/org.eclipse.ui.console/plugin.properties
@@ -16,9 +16,6 @@ ConsoleView.name=Console
ViewCommand.consoleView.name=Console
ViewCommand.consoleView.description=Show the Console view
-ConsoleFontDefinition.description= The console text font is used by the generic console
-ConsoleFontDefinition.label= Console Text Font
-
ConsolePatternMatchListenerName= Console Pattern Match Listeners
ConsolePageParticipantName= Console Page Participants
diff --git a/org.eclipse.ui.console/plugin.xml b/org.eclipse.ui.console/plugin.xml
index 8c3388fcf..6ed80d45a 100644
--- a/org.eclipse.ui.console/plugin.xml
+++ b/org.eclipse.ui.console/plugin.xml
@@ -57,18 +57,6 @@ M4 = Platform-specific fourth key
</keyBinding>
</extension>
<extension
- point="org.eclipse.ui.themes">
- <fontDefinition
- label="%ConsoleFontDefinition.label"
- defaultsTo="org.eclipse.jface.textfont"
- categoryId="org.eclipse.ui.workbenchMisc"
- id="org.eclipse.ui.console.ConsoleFont">
- <description>
- %ConsoleFontDefinition.description
- </description>
- </fontDefinition>
- </extension>
- <extension
point="org.eclipse.core.expressions.propertyTesters">
<propertyTester
namespace="org.eclipse.ui.console"
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleConstants.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleConstants.java
index 8bc52a53f..28c50cd21 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleConstants.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleConstants.java
@@ -36,6 +36,10 @@ public interface IConsoleConstants {
/**
* The name of the font to use for the Console (value <code>"org.eclipse.ui.console.ConsoleFont"</code>).
+ *
+ * @deprecated When a console is created, its font is set to the default text font as specified
+ * by <code>JFaveResources.TEXT_FONT</code>. Clients must provide their own infrastructure to
+ * manage console specific fonts.
*/
public static final String CONSOLE_FONT= "org.eclipse.ui.console.ConsoleFont"; //$NON-NLS-1$
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsolePage.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsolePage.java
index 3ff077f75..fc2dd5572 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsolePage.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsolePage.java
@@ -34,7 +34,6 @@ import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Menu;
@@ -194,10 +193,6 @@ public class TextConsolePage implements IPageBookViewPage, IPropertyChangeListen
fViewer.getTextWidget().setFocus();
}
- protected void setFont(Font font) {
- fViewer.getTextWidget().setFont(font);
- }
-
/*
* (non-Javadoc)
* @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
@@ -207,7 +202,7 @@ public class TextConsolePage implements IPageBookViewPage, IPropertyChangeListen
String property = event.getProperty();
if (source.equals(fConsole) && IConsoleConstants.P_FONT.equals(property)) {
- setFont(fConsole.getFont());
+ fViewer.setFont(fConsole.getFont());
} else if (IConsoleConstants.P_FONT_STYLE.equals(property)) {
fViewer.getTextWidget().redraw();
} else if (property.equals(IConsoleConstants.P_STREAM_COLOR)) {
@@ -217,9 +212,7 @@ public class TextConsolePage implements IPageBookViewPage, IPropertyChangeListen
fViewer.setTabWidth(tabSize.intValue());
} else if (source.equals(fConsole) && property.equals(IConsoleConstants.P_CONSOLE_WIDTH)) {
fViewer.setConsoleWidth(fConsole.getConsoleWidth());
- } else if (property.equals(IConsoleConstants.CONSOLE_FONT)) {
- fViewer.setFont(JFaceResources.getFont(IConsoleConstants.CONSOLE_FONT));
- }
+ }
}
protected void createActions() {
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java
index 13204416e..52862e940 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java
@@ -72,7 +72,7 @@ public class TextConsoleViewer extends TextViewer implements LineStyleListener,
styledText.addLineStyleListener(this);
styledText.addLineBackgroundListener(this);
styledText.setEditable(true);
- styledText.setFont(JFaceResources.getFont(IConsoleConstants.CONSOLE_FONT));
+ styledText.setFont(JFaceResources.getFont(JFaceResources.TEXT_FONT));
styledText.addMouseTrackListener(this);
styledText.addPaintListener(this);
}

Back to the top