KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > views > expression > ExpressionPopupContentProvider


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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.views.expression;
12
13 import org.eclipse.debug.internal.ui.views.RemoteTreeViewer;
14 import org.eclipse.debug.internal.ui.views.variables.VariablesView;
15 import org.eclipse.jface.viewers.Viewer;
16 import org.eclipse.ui.IWorkbenchPartSite;
17
18
19 public class ExpressionPopupContentProvider extends RemoteExpressionsContentProvider {
20     
21     private Object JavaDoc input = null;
22     
23     public ExpressionPopupContentProvider(RemoteTreeViewer viewer, IWorkbenchPartSite site, VariablesView view) {
24         super(viewer, site, view);
25     }
26     
27     
28     /* (non-Javadoc)
29      * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
30      */

31     public void inputChanged(Viewer viewer, Object JavaDoc oldInput, Object JavaDoc newInput) {
32         super.inputChanged(viewer, oldInput, newInput);
33         input = newInput;
34     }
35     /* (non-Javadoc)
36      * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
37      */

38     public Object JavaDoc[] getElements(Object JavaDoc parent) {
39         if (parent == input) {
40             return (Object JavaDoc[]) input;
41         }
42         return super.getElements(parent);
43     }
44 }
45
Popular Tags