Skip to content

Commit 18d4b04

Browse files
committed
Removal of Deprecated Constants
This commit removes the deprecated constants in VariableColumnPresentation and updates references in DefaultVariableCellModifier and WatchExpressionCellModifier to use the new constants.
1 parent c0d9a0f commit 18d4b04

File tree

3 files changed

+11
-40
lines changed

3 files changed

+11
-40
lines changed

debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultVariableCellModifier.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2006, 2013 IBM Corporation and others.
2+
* Copyright (c) 2006, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -18,17 +18,17 @@
1818
import org.eclipse.debug.internal.ui.DebugUIPlugin;
1919
import org.eclipse.debug.internal.ui.DefaultLabelProvider;
2020
import org.eclipse.debug.internal.ui.actions.variables.details.DetailPaneAssignValueAction;
21+
import org.eclipse.debug.ui.IDebugUIConstants;
2122
import org.eclipse.jface.viewers.ICellModifier;
2223

2324
/**
2425
* @since 3.2
2526
*/
26-
@SuppressWarnings("deprecation")
2727
public class DefaultVariableCellModifier implements ICellModifier {
2828

2929
@Override
3030
public boolean canModify(Object element, String property) {
31-
if (VariableColumnPresentation.COLUMN_VARIABLE_VALUE.equals(property)) {
31+
if (IDebugUIConstants.COLUMN_ID_VARIABLE_VALUE.equals(property)) {
3232
if (element instanceof IVariable) {
3333
return ((IVariable) element).supportsValueModification();
3434
}
@@ -38,7 +38,7 @@ public boolean canModify(Object element, String property) {
3838

3939
@Override
4040
public Object getValue(Object element, String property) {
41-
if (VariableColumnPresentation.COLUMN_VARIABLE_VALUE.equals(property)) {
41+
if (IDebugUIConstants.COLUMN_ID_VARIABLE_VALUE.equals(property)) {
4242
if (element instanceof IVariable) {
4343
IVariable variable = (IVariable) element;
4444
try {
@@ -55,7 +55,7 @@ public Object getValue(Object element, String property) {
5555
public void modify(Object element, String property, Object value) {
5656
Object oldValue = getValue(element, property);
5757
if (!value.equals(oldValue)) {
58-
if (VariableColumnPresentation.COLUMN_VARIABLE_VALUE.equals(property)) {
58+
if (IDebugUIConstants.COLUMN_ID_VARIABLE_VALUE.equals(property)) {
5959
if (element instanceof IVariable) {
6060
if (value instanceof String) {
6161
// The value column displays special characters escaped, so encode the string with any special characters escaped properly

debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/VariableColumnPresentation.java

+1-30
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2006, 2013 IBM Corporation and others.
2+
* Copyright (c) 2006, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -23,35 +23,6 @@
2323
*/
2424
public class VariableColumnPresentation extends AbstractColumnPresentation {
2525

26-
/**
27-
* Constant identifier for the default variable column presentation.
28-
* @deprecated Replaced by {@link IDebugUIConstants#COLUMN_PRESENTATION_ID_VARIABLE}
29-
*/
30-
@Deprecated
31-
public final static String DEFAULT_VARIABLE_COLUMN_PRESENTATION = IDebugUIConstants.COLUMN_PRESENTATION_ID_VARIABLE;
32-
33-
/**
34-
* Default column identifiers
35-
* @deprecated Replaced by {@link IDebugUIConstants#COLUMN_ID_VARIABLE_NAME}
36-
*/
37-
@Deprecated
38-
public final static String COLUMN_VARIABLE_NAME = IDebugUIConstants.COLUMN_ID_VARIABLE_NAME;
39-
/**
40-
* @deprecated Replaced by {@link IDebugUIConstants#COLUMN_ID_VARIABLE_TYPE}
41-
*/
42-
@Deprecated
43-
public final static String COLUMN_VARIABLE_TYPE = IDebugUIConstants.COLUMN_ID_VARIABLE_TYPE;
44-
/**
45-
* @deprecated Replaced by {@link IDebugUIConstants#COLUMN_ID_VARIABLE_VALUE}
46-
*/
47-
@Deprecated
48-
public final static String COLUMN_VARIABLE_VALUE = IDebugUIConstants.COLUMN_ID_VARIABLE_VALUE;
49-
/**
50-
* @deprecated Replaced by {@link IDebugUIConstants#COLUMN_ID_VARIABLE_VALUE_TYPE}
51-
*/
52-
@Deprecated
53-
public final static String COLUMN_VALUE_TYPE = IDebugUIConstants.COLUMN_ID_VARIABLE_VALUE_TYPE;
54-
5526
private static final String[] ALL_COLUMNS = new String[]{IDebugUIConstants.COLUMN_ID_VARIABLE_NAME,
5627
IDebugUIConstants.COLUMN_ID_VARIABLE_TYPE, IDebugUIConstants.COLUMN_ID_VARIABLE_VALUE, IDebugUIConstants.COLUMN_ID_VARIABLE_VALUE_TYPE};
5728
private static final String[] INITIAL_COLUMNS = new String[]{IDebugUIConstants.COLUMN_ID_VARIABLE_NAME,

debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/WatchExpressionCellModifier.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2010, 2013 Wind River Systems and others.
2+
* Copyright (c) 2010, 2025 Wind River Systems and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -17,27 +17,27 @@
1717
import org.eclipse.debug.core.DebugPlugin;
1818
import org.eclipse.debug.core.model.IWatchExpression;
1919
import org.eclipse.debug.internal.ui.DefaultLabelProvider;
20+
import org.eclipse.debug.ui.IDebugUIConstants;
2021
import org.eclipse.jface.viewers.ICellModifier;
2122

2223
/**
2324
* Watch expressions modifier can change the expression name but not its value.
2425
*
2526
* @since 3.6
2627
*/
27-
@SuppressWarnings("deprecation")
2828
public class WatchExpressionCellModifier implements ICellModifier {
2929

3030
@Override
3131
public boolean canModify(Object element, String property) {
32-
if (VariableColumnPresentation.COLUMN_VARIABLE_NAME.equals(property)) {
32+
if (IDebugUIConstants.COLUMN_ID_VARIABLE_NAME.equals(property)) {
3333
return element instanceof IWatchExpression;
3434
}
3535
return false;
3636
}
3737

3838
@Override
3939
public Object getValue(Object element, String property) {
40-
if (VariableColumnPresentation.COLUMN_VARIABLE_NAME.equals(property)) {
40+
if (IDebugUIConstants.COLUMN_ID_VARIABLE_NAME.equals(property)) {
4141
return DefaultLabelProvider.escapeSpecialChars( ((IWatchExpression)element).getExpressionText() );
4242
}
4343
return null;
@@ -47,7 +47,7 @@ public Object getValue(Object element, String property) {
4747
public void modify(Object element, String property, Object value) {
4848
Object oldValue = getValue(element, property);
4949
if (!value.equals(oldValue)) {
50-
if (VariableColumnPresentation.COLUMN_VARIABLE_NAME.equals(property)) {
50+
if (IDebugUIConstants.COLUMN_ID_VARIABLE_NAME.equals(property)) {
5151
if (element instanceof IWatchExpression) {
5252
if (value instanceof String) {
5353
// The value column displays special characters

0 commit comments

Comments
 (0)