Skip to content
Merged
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
2 changes: 2 additions & 0 deletions debug/org.eclipse.debug.ui/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ BreakpointTypesMenu.label=B&reakpoint Types
VariablesView.name=Variables
VariableTextFontDefinition.label=Variable text font
VariableTextFontDefinition.description=Font to use for the label text of entries in the Variables, Registers, Breakpoints and Expression views as well as the Inspect Popup Dialog.
BreakpointLabelColor.label=Breakpoint label
BreakpointLabelColor.description=Font color used for breakpoints with custom labels in the Breakpoints view.
StringVariablePreferencePage.name=String Substitution
ToggleMemoryMonitorsPaneAction.name = &Toggle Memory Monitors Pane
ToggleMemoryMonitorsPaneAction.tooltip = Toggle Memory Monitors Pane
Expand Down
9 changes: 9 additions & 0 deletions debug/org.eclipse.debug.ui/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3071,6 +3071,15 @@ M4 = Platform-specific fourth key
%VariableTextFontDefinition.description
</description>
</fontDefinition>
<colorDefinition
categoryId="org.eclipse.debug.ui.presentation"
id="org.eclipse.debug.ui.BreakpointLabelColor"
label="%BreakpointLabelColor.label"
value="255,0,0">
<description>
%BreakpointLabelColor.description
</description>
</colorDefinition>
</extension>
<extension
point="org.eclipse.ui.console.consolePageParticipants">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,10 @@ public interface IInternalDebugUIConstants {
*/
String THEME_CONSOLE_COLOR_STD_ERR = "org.eclipse.debug.ui.console.stream.err"; //$NON-NLS-1$

/**
* Theme color definition for the label of breakpoints with a custom label.
*/
String THEME_BREAKPOINT_LABEL_COLOR = "org.eclipse.debug.ui.BreakpointLabelColor"; //$NON-NLS-1$

/**
* Boolean preference indicating if launch action should launch or terminate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import org.eclipse.debug.core.model.Breakpoint;
import org.eclipse.debug.internal.ui.DelegatingModelPresentation;
import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
import org.eclipse.debug.ui.IDebugModelPresentation;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.resource.ImageDescriptor;
Expand Down Expand Up @@ -145,7 +146,8 @@ public static RGB getForeground(Object element, IDebugModelPresentation presenta

if (element instanceof Breakpoint breakpoint) {
if (breakpoint.getBreakpointLabel() != null) {
return new RGB(255, 0, 0);
RGB rgb = JFaceResources.getColorRegistry().getRGB(IInternalDebugUIConstants.THEME_BREAKPOINT_LABEL_COLOR);
return rgb != null ? rgb : new RGB(255, 0, 0);
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.DelegatingModelPresentation;
import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
import org.eclipse.debug.internal.ui.LazyModelPresentation;
import org.eclipse.debug.internal.ui.SWTFactory;
import org.eclipse.debug.internal.ui.VariablesViewModelPresentation;
Expand Down Expand Up @@ -422,6 +423,7 @@ public void dispose() {
getSite().getWorkbenchWindow().removePerspectiveListener(this);
DebugUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
JFaceResources.getFontRegistry().removeListener(this);
JFaceResources.getColorRegistry().removeListener(this);
TreeModelViewer viewer = getVariablesViewer();
if (viewer != null) {
viewer.removeModelChangedListener(this);
Expand Down Expand Up @@ -489,7 +491,8 @@ public void propertyChange(PropertyChangeEvent event) {
String propertyName= event.getProperty();
if (propertyName.equals(IDebugUIConstants.PREF_CHANGED_DEBUG_ELEMENT_COLOR) ||
propertyName.equals(IDebugUIConstants.PREF_CHANGED_VALUE_BACKGROUND) ||
propertyName.equals(IDebugUIConstants.PREF_VARIABLE_TEXT_FONT)) {
propertyName.equals(IDebugUIConstants.PREF_VARIABLE_TEXT_FONT) ||
propertyName.equals(IInternalDebugUIConstants.THEME_BREAKPOINT_LABEL_COLOR)) {
Viewer viewer = getViewer();
if (viewer == variablesViewer) {
setVariablesViewerTreeFont(variablesViewer);
Expand All @@ -510,6 +513,7 @@ public Viewer createViewer(Composite parent) {
getModelPresentation();
DebugUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
JFaceResources.getFontRegistry().addListener(this);
JFaceResources.getColorRegistry().addListener(this);

variablesViewer = createTreeViewer(fSashForm);
fInputService = new ViewerInputService(variablesViewer, fRequester);
Expand Down
Loading