EMMA Coverage Report (generated Mon Sep 29 15:05:28 EDT 2008)
[all classes][org.eclipse.ui.internal.ide.model]

COVERAGE SUMMARY FOR SOURCE FILE [WorkbenchFolder.java]

nameclass, %method, %block, %line, %
WorkbenchFolder.java100% (1/1)100% (3/3)80%  (12/15)67%  (4/6)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class WorkbenchFolder100% (1/1)100% (3/3)80%  (12/15)67%  (4/6)
getChildren (Object): Object [] 100% (1/1)57%  (4/7)33%  (1/3)
WorkbenchFolder (): void 100% (1/1)100% (3/3)100% (1/1)
getBaseImage (IResource): ImageDescriptor 100% (1/1)100% (5/5)100% (2/2)

1/*******************************************************************************
2 * Copyright (c) 2000, 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 *******************************************************************************/
11package org.eclipse.ui.internal.ide.model;
12 
13import org.eclipse.core.resources.IContainer;
14import org.eclipse.core.resources.IResource;
15import org.eclipse.core.runtime.CoreException;
16import org.eclipse.jface.resource.ImageDescriptor;
17import org.eclipse.ui.ISharedImages;
18import org.eclipse.ui.PlatformUI;
19 
20/**
21 * An IWorkbenchAdapter that represents IFolders.
22 */
23public class WorkbenchFolder extends WorkbenchResource {
24    /**
25     *        Answer the appropriate base image to use for the passed resource, optionally
26     *        considering the passed open status as well iff appropriate for the type of
27     *        passed resource
28     */
29    protected ImageDescriptor getBaseImage(IResource resource) {
30        return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(
31                ISharedImages.IMG_OBJ_FOLDER);
32    }
33 
34    /**
35     * Returns the children of this container.
36     */
37    public Object[] getChildren(Object o) {
38        try {
39            return ((IContainer) o).members();
40        } catch (CoreException e) {
41            return NO_CHILDREN;
42        }
43    }
44}

[all classes][org.eclipse.ui.internal.ide.model]
EMMA 2.0.5312 EclEmma Fix 1 (C) Vladimir Roubtsov