KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > elements > adapters > VariableColumnEditor


1 /*******************************************************************************
2  * Copyright (c) 2006 IBM Corporation 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  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.debug.internal.ui.elements.adapters;
12
13 import org.eclipse.debug.internal.ui.viewers.provisional.AbstractColumnEditor;
14 import org.eclipse.debug.ui.IDebugUIConstants;
15 import org.eclipse.jface.viewers.CellEditor;
16 import org.eclipse.jface.viewers.ICellModifier;
17 import org.eclipse.jface.viewers.TextCellEditor;
18 import org.eclipse.swt.widgets.Composite;
19
20 /**
21  * Columns for Java variables.
22  *
23  * @since 3.2
24  */

25 public class VariableColumnEditor extends AbstractColumnEditor {
26     
27     /**
28      * Constant identifier for the default variable column presentation.
29      */

30     public final static String JavaDoc DEFAULT_VARIABLE_COLUMN_EDITOR = IDebugUIConstants.PLUGIN_ID + ".VARIALBE_COLUMN_EDITOR"; //$NON-NLS-1$
31

32     private ICellModifier fCellModifier;
33
34     /* (non-Javadoc)
35      * @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnEditor#getCellEditor(java.lang.String, java.lang.Object, org.eclipse.swt.widgets.Composite)
36      */

37     public CellEditor getCellEditor(String JavaDoc id, Object JavaDoc element, Composite parent) {
38         return new TextCellEditor(parent);
39     }
40
41     /* (non-Javadoc)
42      * @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnEditor#getCellModifier()
43      */

44     public ICellModifier getCellModifier() {
45         if (fCellModifier == null) {
46             fCellModifier = new DefaultVariableCellModifier(getPresentationContext());
47         }
48         return fCellModifier;
49     }
50
51     /* (non-Javadoc)
52      * @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnEditor#getId()
53      */

54     public String JavaDoc getId() {
55         return DEFAULT_VARIABLE_COLUMN_EDITOR;
56     }
57
58 }
59
Popular Tags