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

COVERAGE SUMMARY FOR SOURCE FILE [WorkbenchPresentationFactoryClassic.java]

nameclass, %method, %block, %line, %
WorkbenchPresentationFactoryClassic.java0%   (0/1)0%   (0/3)0%   (0/73)0%   (0/24)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class WorkbenchPresentationFactoryClassic0%   (0/1)0%   (0/3)0%   (0/73)0%   (0/24)
<static initializer> 0%   (0/1)0%   (0/5)0%   (0/3)
WorkbenchPresentationFactoryClassic (): void 0%   (0/1)0%   (0/3)0%   (0/1)
createViewPresentation (Composite, IStackPresentationSite): StackPresentation 0%   (0/1)0%   (0/65)0%   (0/21)

1/*******************************************************************************
2 * Copyright (c) 2007, 2008 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 
12package org.eclipse.ui.internal.presentations.classic;
13 
14import org.eclipse.jface.preference.IPreferenceStore;
15import org.eclipse.swt.SWT;
16import org.eclipse.swt.widgets.Composite;
17import org.eclipse.ui.IWorkbenchPreferenceConstants;
18import org.eclipse.ui.PlatformUI;
19import org.eclipse.ui.internal.presentations.defaultpresentation.DefaultSimpleTabListener;
20import org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder;
21import org.eclipse.ui.internal.presentations.defaultpresentation.DefaultThemeListener;
22import org.eclipse.ui.internal.presentations.util.PresentablePartFolder;
23import org.eclipse.ui.internal.presentations.util.StandardViewSystemMenu;
24import org.eclipse.ui.internal.presentations.util.TabbedStackPresentation;
25import org.eclipse.ui.presentations.IStackPresentationSite;
26import org.eclipse.ui.presentations.StackPresentation;
27import org.eclipse.ui.presentations.WorkbenchPresentationFactory;
28 
29/**
30 * The classic presentation factory for the Workbench (the 3.0 look).
31 * 
32 * @since 3.4
33 * 
34 */
35public class WorkbenchPresentationFactoryClassic extends
36                WorkbenchPresentationFactory {
37 
38        private static int viewTabPosition = PlatformUI.getPreferenceStore()
39                        .getInt(IWorkbenchPreferenceConstants.VIEW_TAB_POSITION);
40 
41        /*
42         * (non-Javadoc)
43         * 
44         * @see org.eclipse.ui.presentations.WorkbenchPresentationFactory#createViewPresentation(org.eclipse.swt.widgets.Composite,
45         *      org.eclipse.ui.presentations.IStackPresentationSite)
46         */
47        public StackPresentation createViewPresentation(Composite parent,
48                        IStackPresentationSite site) {
49 
50                DefaultTabFolder folder = new DefaultTabFolder(parent, viewTabPosition
51                                | SWT.BORDER, site
52                                .supportsState(IStackPresentationSite.STATE_MINIMIZED), site
53                                .supportsState(IStackPresentationSite.STATE_MAXIMIZED));
54 
55                final IPreferenceStore store = PlatformUI.getPreferenceStore();
56                final int minimumCharacters = store
57                                .getInt(IWorkbenchPreferenceConstants.VIEW_MINIMUM_CHARACTERS);
58                if (minimumCharacters >= 0) {
59                        folder.setMinimumCharacters(minimumCharacters);
60                }
61 
62                PresentablePartFolder partFolder = new PresentablePartFolder(folder);
63 
64                folder.setUnselectedCloseVisible(false);
65                folder.setUnselectedImageVisible(false);
66 
67                TabbedStackPresentation result = new TabbedStackPresentation(site,
68                                partFolder, new StandardViewSystemMenu(site));
69 
70                DefaultThemeListener themeListener = new DefaultThemeListener(folder,
71                                result.getTheme());
72                result.getTheme().addListener(themeListener);
73 
74                new DefaultSimpleTabListener(result.getApiPreferences(),
75                                IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS,
76                                folder);
77 
78                return result;
79        }
80}

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