Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,14 @@
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.console.ConsolePlugin;
import org.eclipse.ui.console.IConsoleConstants;
import org.eclipse.ui.dialogs.PreferencesUtil;

/**
* A page to set the preferences for the console
Expand Down Expand Up @@ -127,7 +130,7 @@ public void createControl(Composite parent) {
*/
@Override
public void createFieldEditors() {

createHeaderLink();
fWrapEditor = new BooleanFieldEditor2(IDebugPreferenceConstants.CONSOLE_WRAP, DebugPreferencesMessages.ConsolePreferencePage_Wrap_text_1, SWT.NONE, getFieldEditorParent());
addField(fWrapEditor);

Expand Down Expand Up @@ -401,4 +404,24 @@ private String processElapsedTimeFormat(String format) {
elapsedTime.toSecondsPart(), elapsedTime.toMillisPart());
return elapsedString;
}

private void createHeaderLink() {
final Shell shell = getFieldEditorParent().getShell();
String text = DebugPreferencesMessages.ConsoleFontSettingsLink;
Link link = new Link(getFieldEditorParent(), SWT.NONE);
link.setText(text);
link.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
if ("org.eclipse.ui.preferencePages.ColorsAndFonts".equals(e.text)) { //$NON-NLS-1$
PreferencesUtil.createPreferenceDialogOn(shell, e.text, null,
"selectFont:org.eclipse.debug.ui.consoleFont"); //$NON-NLS-1$
}
}
});
GridData gridData = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
gridData.horizontalSpan = 4;
link.setLayoutData(gridData);
SWTFactory.createVerticalSpacer(getFieldEditorParent(), 2);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -228,4 +228,6 @@ public class DebugPreferencesMessages extends NLS {

public static Object ConsoleDisableElapsedTime;

public static String ConsoleFontSettingsLink;

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ ConsoleElapsedTimeLabel=Elapsed Time Format (Choose 'None' to disable)
ConsoleDefaultElapsedTimeFormat=%d:%02d:%02d
ConsoleElapsedTimeToolTip=Supports formats like: 'H:MM:SS.mmm', 'MMm SSs', 'H:MM:SS' \nYou can also use positional parameters \n%1$ = (H)hours\n%2$ = (M)minutes\n%3$ = (S)seconds\n%4$ = (mmm)milliseconds
ConsoleDisableElapsedTime=None
ConsoleFontSettingsLink=To configure font style settings, see <a href=\"org.eclipse.ui.preferencePages.ColorsAndFonts\">'Font Styles'</a> preferences

DebugPreferencePage_1=General Settings for Running and Debugging.
DebugPreferencePage_2=Re&use editor when displaying source code
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2007 IBM Corporation and others.
* Copyright (c) 2000, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -33,6 +33,7 @@ public void init(IViewPart view) {}
private static final String PREF_PAGE_NAME = "org.eclipse.debug.ui.ConsolePreferencePage"; //$NON-NLS-1$
private static final String[] PREFS_PAGES_TO_SHOW = {
PREF_PAGE_NAME,
"org.eclipse.ui.preferencePages.ColorsAndFonts", //$NON-NLS-1$
"org.eclipse.debug.ui.DebugPreferencePage", //$NON-NLS-1$
"org.eclipse.ui.internal.console.ansi.preferences.AnsiConsolePreferencePage" //$NON-NLS-1$
};
Expand Down
Loading