1 11 package org.eclipse.debug.internal.ui.elements.adapters; 12 13 import org.eclipse.debug.core.model.IStackFrame; 14 import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation; 15 import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory; 16 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext; 17 import org.eclipse.debug.ui.IDebugUIConstants; 18 19 24 public class VariableColumnFactoryAdapter implements IColumnPresentationFactory { 25 26 29 public IColumnPresentation createColumnPresentation(IPresentationContext context, Object element) { 30 String id = context.getId(); 31 if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(id) || IDebugUIConstants.ID_REGISTER_VIEW.equals(id)) { 32 if (element instanceof IStackFrame) { 33 return new VariableColumnPresentation(); 34 } 35 } 36 return null; 37 } 38 39 42 public String getColumnPresentationId(IPresentationContext context, Object element) { 43 String id = context.getId(); 44 if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(id) || IDebugUIConstants.ID_REGISTER_VIEW.equals(id)) { 45 if (element instanceof IStackFrame) { 46 return VariableColumnPresentation.DEFAULT_VARIABLE_COLUMN_PRESENTATION; 47 } 48 } 49 return null; 50 } 51 52 } 53 | Popular Tags |