1 11 package org.eclipse.jdt.internal.debug.ui.variables; 12 13 import org.eclipse.debug.internal.ui.viewers.provisional.IColumnEditor; 14 import org.eclipse.debug.internal.ui.viewers.provisional.IColumnEditorFactoryAdapter; 15 import org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext; 16 import org.eclipse.debug.ui.IDebugUIConstants; 17 import org.eclipse.jdt.debug.core.IJavaVariable; 18 import org.eclipse.ui.IWorkbenchPart; 19 20 24 public class JavaVariableColumnEditorFactory implements 25 IColumnEditorFactoryAdapter { 26 27 30 public IColumnEditor createColumnEditor(IPresentationContext context, Object element) { 31 IWorkbenchPart part = context.getPart(); 32 if (part != null) { 33 if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(part.getSite().getId())) { 34 if (element instanceof IJavaVariable) { 35 return new JavaVariableColumnEditor(); 36 } 37 } 38 } 39 return null; 40 } 41 42 45 public String getColumnEditorId(IPresentationContext context, Object element) { 46 IWorkbenchPart part = context.getPart(); 47 if (part != null) { 48 if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(part.getSite().getId())) { 49 if (element instanceof IJavaVariable) { 50 return JavaVariableColumnEditor.JAVA_VARIABLE_COLUMN_EDITOR; 51 } 52 } 53 } 54 return null; 55 } 56 57 } 58 | Popular Tags |