| 1 | /******************************************************************************* |
| 2 | * Copyright (c) 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 | |
| 12 | package org.eclipse.ui.internal.tweaklets; |
| 13 | |
| 14 | import org.eclipse.core.runtime.IAdaptable; |
| 15 | import org.eclipse.ui.WorkbenchException; |
| 16 | import org.eclipse.ui.internal.Perspective; |
| 17 | import org.eclipse.ui.internal.WorkbenchPage; |
| 18 | import org.eclipse.ui.internal.WorkbenchWindow; |
| 19 | import org.eclipse.ui.internal.registry.PerspectiveDescriptor; |
| 20 | |
| 21 | /** |
| 22 | * @since 3.4 |
| 23 | * |
| 24 | */ |
| 25 | public class Workbench3xImplementation extends WorkbenchImplementation { |
| 26 | |
| 27 | /* (non-Javadoc) |
| 28 | * @see org.eclipse.ui.internal.tweaklets.WorkbenchImplementation#createWBW(int) |
| 29 | */ |
| 30 | public WorkbenchWindow createWorkbenchWindow(int newWindowNumber) { |
| 31 | return new WorkbenchWindow(newWindowNumber); |
| 32 | } |
| 33 | |
| 34 | /* (non-Javadoc) |
| 35 | * @see org.eclipse.ui.internal.tweaklets.WorkbenchImplementation#createWBPage(org.eclipse.ui.internal.WorkbenchWindow, java.lang.String, org.eclipse.core.runtime.IAdaptable) |
| 36 | */ |
| 37 | public WorkbenchPage createWorkbenchPage(WorkbenchWindow workbenchWindow, |
| 38 | String perspID, IAdaptable input) throws WorkbenchException { |
| 39 | return new WorkbenchPage(workbenchWindow, perspID, input); |
| 40 | } |
| 41 | |
| 42 | /* (non-Javadoc) |
| 43 | * @see org.eclipse.ui.internal.tweaklets.WorkbenchImplementation#createWBPage(org.eclipse.ui.internal.WorkbenchWindow, org.eclipse.core.runtime.IAdaptable) |
| 44 | */ |
| 45 | public WorkbenchPage createWorkbenchPage(WorkbenchWindow workbenchWindow, |
| 46 | IAdaptable finalInput) throws WorkbenchException { |
| 47 | return new WorkbenchPage(workbenchWindow, finalInput); |
| 48 | } |
| 49 | |
| 50 | /* (non-Javadoc) |
| 51 | * @see org.eclipse.ui.internal.tweaklets.WorkbenchImplementation#createPerspective(org.eclipse.ui.internal.registry.PerspectiveDescriptor, org.eclipse.ui.internal.WorkbenchPage) |
| 52 | */ |
| 53 | public Perspective createPerspective(PerspectiveDescriptor desc, |
| 54 | WorkbenchPage workbenchPage) throws WorkbenchException { |
| 55 | return new Perspective(desc, workbenchPage); |
| 56 | } |
| 57 | |
| 58 | } |