blob: 3be0cc8b89395b73b7651e3092dad79837d56c6d [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.debug.internal.ui.views.expression;
import org.eclipse.debug.core.model.IExpression;
import org.eclipse.debug.internal.ui.elements.adapters.DeferredExpressionLogicalStructure;
import org.eclipse.debug.internal.ui.views.RemoteTreeViewer;
import org.eclipse.debug.internal.ui.views.variables.RemoteVariableContentManager;
import org.eclipse.debug.internal.ui.views.variables.VariablesView;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
/**
* Remote content manager for variables. Creates an appropriate adapter for
* logical structures.
*/
public class RemoteExpressionContentManager extends RemoteVariableContentManager {
private IDeferredWorkbenchAdapter fExpressionLogicalStructureAdapter = new DeferredExpressionLogicalStructure();
/**
* Constructs a remote content manager for a variables view.
*/
public RemoteExpressionContentManager(ITreeContentProvider provider, RemoteTreeViewer viewer, IWorkbenchPartSite site, VariablesView view) {
super(provider, viewer, site, view);
}
/* (non-Javadoc)
* @see org.eclipse.ui.progress.DeferredTreeContentManager#getAdapter(java.lang.Object)
*/
protected IDeferredWorkbenchAdapter getAdapter(Object element) {
if (element instanceof IExpression && fView !=null && fView.isShowLogicalStructure()) {
return fExpressionLogicalStructureAdapter;
}
return super.getAdapter(element);
}
}