author | ryall |
Tue, 12 Jan 2010 07:49:28 -0600 | |
changeset 129 | 723898599d35 |
parent 37 | c2bce6dd59e7 |
permissions | -rw-r--r-- |
37 | 1 |
/******************************************************************************* |
2 |
* Copyright (c) 2006, 2008 Wind River Systems and others. |
|
3 |
* All rights reserved. This program and the accompanying materials |
|
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
|
5 |
* which accompanies this distribution, and is available at |
|
6 |
* http://www.eclipse.org/legal/epl-v10.html |
|
7 |
* |
|
8 |
* Contributors: |
|
9 |
* Wind River Systems - initial API and implementation |
|
10 |
*******************************************************************************/ |
|
11 |
package org.eclipse.cdt.dsf.debug.ui.viewmodel.variable; |
|
12 |
||
13 |
import org.eclipse.cdt.dsf.debug.ui.viewmodel.IDebugVMConstants; |
|
14 |
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin; |
|
15 |
import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation; |
|
16 |
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext; |
|
17 |
import org.eclipse.jface.resource.ImageDescriptor; |
|
18 |
||
19 |
/** |
|
20 |
* |
|
21 |
*/ |
|
22 |
public class VariableColumnPresentation implements IColumnPresentation { |
|
23 |
public static final String ID = DsfUIPlugin.PLUGIN_ID + ".VARIABLES_COLUMN_PRESENTATION_ID"; //$NON-NLS-1$ |
|
24 |
||
25 |
// @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#init(org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext) |
|
26 |
public void init(IPresentationContext context) {} |
|
27 |
||
28 |
// @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#dispose() |
|
29 |
public void dispose() {} |
|
30 |
||
31 |
// @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getAvailableColumns() |
|
32 |
public String[] getAvailableColumns() { |
|
33 |
return new String[] { IDebugVMConstants.COLUMN_ID__NAME, IDebugVMConstants.COLUMN_ID__TYPE, IDebugVMConstants.COLUMN_ID__VALUE, IDebugVMConstants.COLUMN_ID__ADDRESS }; |
|
34 |
} |
|
35 |
||
36 |
// @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getHeader(java.lang.String) |
|
37 |
public String getHeader(String id) { |
|
38 |
if (IDebugVMConstants.COLUMN_ID__NAME.equals(id)) { |
|
39 |
return MessagesForVariablesVM.VariableColumnPresentation_name; |
|
40 |
} else if (IDebugVMConstants.COLUMN_ID__TYPE.equals(id)) { |
|
41 |
return MessagesForVariablesVM.VariableColumnPresentation_type; |
|
42 |
} else if (IDebugVMConstants.COLUMN_ID__VALUE.equals(id)) { |
|
43 |
return MessagesForVariablesVM.VariableColumnPresentation_value; |
|
44 |
} else if (IDebugVMConstants.COLUMN_ID__ADDRESS.equals(id)) { |
|
129
723898599d35
Bug 299167, turn the Variable View's Address column into a Location column.
ryall
parents:
37
diff
changeset
|
45 |
return MessagesForVariablesVM.VariableColumnPresentation_location; |
37 | 46 |
} |
47 |
return null; |
|
48 |
} |
|
49 |
||
50 |
// @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getId() |
|
51 |
public String getId() { |
|
52 |
return ID; |
|
53 |
} |
|
54 |
||
55 |
// @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getImageDescriptor(java.lang.String) |
|
56 |
public ImageDescriptor getImageDescriptor(String id) { |
|
57 |
return null; |
|
58 |
} |
|
59 |
||
60 |
// @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getInitialColumns() |
|
61 |
public String[] getInitialColumns() { |
|
62 |
return new String[] { IDebugVMConstants.COLUMN_ID__NAME, IDebugVMConstants.COLUMN_ID__TYPE, IDebugVMConstants.COLUMN_ID__VALUE }; |
|
63 |
} |
|
64 |
||
65 |
// @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#isOptional() |
|
66 |
public boolean isOptional() { |
|
67 |
return true; |
|
68 |
} |
|
69 |
||
70 |
} |