1 11 package org.eclipse.debug.internal.ui.elements.adapters; 12 13 import org.eclipse.debug.internal.ui.viewers.provisional.AbstractColumnPresentation; 14 import org.eclipse.debug.ui.IDebugUIConstants; 15 16 21 public class VariableColumnPresentation extends AbstractColumnPresentation { 22 23 26 public final static String DEFAULT_VARIABLE_COLUMN_PRESENTATION = IDebugUIConstants.PLUGIN_ID + ".VARIALBE_COLUMN_PRESENTATION"; 28 31 public final static String COLUMN_VARIABLE_NAME = DEFAULT_VARIABLE_COLUMN_PRESENTATION + ".COL_VAR_NAME"; public final static String COLUMN_VARIABLE_TYPE = DEFAULT_VARIABLE_COLUMN_PRESENTATION + ".COL_VAR_TYPE"; public final static String COLUMN_VARIABLE_VALUE = DEFAULT_VARIABLE_COLUMN_PRESENTATION + ".COL_VAR_VALUE"; public final static String COLUMN_VALUE_TYPE = DEFAULT_VARIABLE_COLUMN_PRESENTATION + ".COL_VALUE_TYPE"; 36 private static final String [] ALL_COLUMNS = new String []{COLUMN_VARIABLE_NAME, COLUMN_VARIABLE_TYPE, COLUMN_VARIABLE_VALUE, COLUMN_VALUE_TYPE}; 37 private static final String [] INITIAL_COLUMNS = new String []{COLUMN_VARIABLE_NAME, COLUMN_VARIABLE_VALUE}; 38 39 42 public String [] getAvailableColumns() { 43 return ALL_COLUMNS; 44 } 45 46 49 public String getHeader(String id) { 50 if (COLUMN_VARIABLE_TYPE.equals(id)) { 51 return Messages.VariableColumnPresentation_0; 52 } 53 if (COLUMN_VARIABLE_NAME.equals(id)) { 54 return Messages.VariableColumnPresentation_1; 55 } 56 if (COLUMN_VARIABLE_VALUE.equals(id)) { 57 return Messages.VariableColumnPresentation_2; 58 } 59 if (COLUMN_VALUE_TYPE.equals(id)) { 60 return Messages.VariableColumnPresentation_3; 61 } 62 return null; 63 } 64 65 68 public String getId() { 69 return DEFAULT_VARIABLE_COLUMN_PRESENTATION; 70 } 71 72 75 public String [] getInitialColumns() { 76 return INITIAL_COLUMNS; 77 } 78 79 82 public boolean isOptional() { 83 return true; 84 } 85 86 } 87 | Popular Tags |