Skip to content

[Debug ]Removal of Deprecated Constants #1784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006, 2013 IBM Corporation and others.
* Copyright (c) 2006, 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 All @@ -18,17 +18,17 @@
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.DefaultLabelProvider;
import org.eclipse.debug.internal.ui.actions.variables.details.DetailPaneAssignValueAction;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.viewers.ICellModifier;

/**
* @since 3.2
*/
@SuppressWarnings("deprecation")
public class DefaultVariableCellModifier implements ICellModifier {

@Override
public boolean canModify(Object element, String property) {
if (VariableColumnPresentation.COLUMN_VARIABLE_VALUE.equals(property)) {
if (IDebugUIConstants.COLUMN_ID_VARIABLE_VALUE.equals(property)) {
if (element instanceof IVariable) {
return ((IVariable) element).supportsValueModification();
}
Expand All @@ -38,7 +38,7 @@ public boolean canModify(Object element, String property) {

@Override
public Object getValue(Object element, String property) {
if (VariableColumnPresentation.COLUMN_VARIABLE_VALUE.equals(property)) {
if (IDebugUIConstants.COLUMN_ID_VARIABLE_VALUE.equals(property)) {
if (element instanceof IVariable) {
IVariable variable = (IVariable) element;
try {
Expand All @@ -55,7 +55,7 @@ public Object getValue(Object element, String property) {
public void modify(Object element, String property, Object value) {
Object oldValue = getValue(element, property);
if (!value.equals(oldValue)) {
if (VariableColumnPresentation.COLUMN_VARIABLE_VALUE.equals(property)) {
if (IDebugUIConstants.COLUMN_ID_VARIABLE_VALUE.equals(property)) {
if (element instanceof IVariable) {
if (value instanceof String) {
// The value column displays special characters escaped, so encode the string with any special characters escaped properly
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006, 2013 IBM Corporation and others.
* Copyright (c) 2006, 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 All @@ -23,35 +23,6 @@
*/
public class VariableColumnPresentation extends AbstractColumnPresentation {

/**
* Constant identifier for the default variable column presentation.
* @deprecated Replaced by {@link IDebugUIConstants#COLUMN_PRESENTATION_ID_VARIABLE}
*/
@Deprecated
public final static String DEFAULT_VARIABLE_COLUMN_PRESENTATION = IDebugUIConstants.COLUMN_PRESENTATION_ID_VARIABLE;

/**
* Default column identifiers
* @deprecated Replaced by {@link IDebugUIConstants#COLUMN_ID_VARIABLE_NAME}
*/
@Deprecated
public final static String COLUMN_VARIABLE_NAME = IDebugUIConstants.COLUMN_ID_VARIABLE_NAME;
/**
* @deprecated Replaced by {@link IDebugUIConstants#COLUMN_ID_VARIABLE_TYPE}
*/
@Deprecated
public final static String COLUMN_VARIABLE_TYPE = IDebugUIConstants.COLUMN_ID_VARIABLE_TYPE;
/**
* @deprecated Replaced by {@link IDebugUIConstants#COLUMN_ID_VARIABLE_VALUE}
*/
@Deprecated
public final static String COLUMN_VARIABLE_VALUE = IDebugUIConstants.COLUMN_ID_VARIABLE_VALUE;
/**
* @deprecated Replaced by {@link IDebugUIConstants#COLUMN_ID_VARIABLE_VALUE_TYPE}
*/
@Deprecated
public final static String COLUMN_VALUE_TYPE = IDebugUIConstants.COLUMN_ID_VARIABLE_VALUE_TYPE;

private static final String[] ALL_COLUMNS = new String[]{IDebugUIConstants.COLUMN_ID_VARIABLE_NAME,
IDebugUIConstants.COLUMN_ID_VARIABLE_TYPE, IDebugUIConstants.COLUMN_ID_VARIABLE_VALUE, IDebugUIConstants.COLUMN_ID_VARIABLE_VALUE_TYPE};
private static final String[] INITIAL_COLUMNS = new String[]{IDebugUIConstants.COLUMN_ID_VARIABLE_NAME,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2010, 2013 Wind River Systems and others.
* Copyright (c) 2010, 2025 Wind River Systems and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand All @@ -17,27 +17,27 @@
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.model.IWatchExpression;
import org.eclipse.debug.internal.ui.DefaultLabelProvider;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.viewers.ICellModifier;

/**
* Watch expressions modifier can change the expression name but not its value.
*
* @since 3.6
*/
@SuppressWarnings("deprecation")
public class WatchExpressionCellModifier implements ICellModifier {

@Override
public boolean canModify(Object element, String property) {
if (VariableColumnPresentation.COLUMN_VARIABLE_NAME.equals(property)) {
if (IDebugUIConstants.COLUMN_ID_VARIABLE_NAME.equals(property)) {
return element instanceof IWatchExpression;
}
return false;
}

@Override
public Object getValue(Object element, String property) {
if (VariableColumnPresentation.COLUMN_VARIABLE_NAME.equals(property)) {
if (IDebugUIConstants.COLUMN_ID_VARIABLE_NAME.equals(property)) {
return DefaultLabelProvider.escapeSpecialChars( ((IWatchExpression)element).getExpressionText() );
}
return null;
Expand All @@ -47,7 +47,7 @@ public Object getValue(Object element, String property) {
public void modify(Object element, String property, Object value) {
Object oldValue = getValue(element, property);
if (!value.equals(oldValue)) {
if (VariableColumnPresentation.COLUMN_VARIABLE_NAME.equals(property)) {
if (IDebugUIConstants.COLUMN_ID_VARIABLE_NAME.equals(property)) {
if (element instanceof IWatchExpression) {
if (value instanceof String) {
// The value column displays special characters
Expand Down
Loading