diff -r 615035072f7e -r 844b047e260d sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.perfcounters/src/com/nokia/carbide/cpp/pi/internal/perfcounters/PecLegendContentProvider.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.perfcounters/src/com/nokia/carbide/cpp/pi/internal/perfcounters/PecLegendContentProvider.java Wed Apr 21 15:14:16 2010 +0300 @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.carbide.cpp.pi.internal.perfcounters; + +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.Viewer; + +/** + * Performance Counter Legend: ContentProvider for TableViewer + */ +public class PecLegendContentProvider implements IStructuredContentProvider { + + private PecTrace trace; + + + /** + * SimpleListContentProvider constructor comment. + * @param trace The trace model + */ + public PecLegendContentProvider(PecTrace trace) { + super(); + this.trace = trace; + } + + /* (non-Javadoc) + * @see org.eclipse.jface.viewers.IContentProvider#dispose() + */ + public void dispose() { + //Do nothing when disposing, + } + + /* (non-Javadoc) + * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object) + */ + public Object[] getElements(Object inputElement) { + return trace.getLegendElements(); + } + + + /* (non-Javadoc) + * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) + */ + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + //we don't expect the input to change during the lifetime of this object + } + + +} +