aboutsummaryrefslogtreecommitdiff
path: root/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformanceResultsPerspective.java
blob: eb0b54a1bf69b4bfbbb542d0bdf16bfc32c2d9ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*******************************************************************************
 * Copyright (c) 2000, 2009 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.test.internal.performance.results.ui;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

/**
 *  Defines the 'Performances' perspective.
 */
public class PerformanceResultsPerspective implements IPerspectiveFactory {

	private IPageLayout factory;

/*
 * (non-Javadoc)
 * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
 */
public void createInitialLayout(IPageLayout layout) {
	this.factory = layout;
	addViews();
}

/*
 * Add views to the perspective
 */
private void addViews() {

	// Component results view put on bottom
	IFolderLayout bottom =
		this.factory.createFolder(
			"bottomRight", //NON-NLS-1
			IPageLayout.BOTTOM,
			0.5f,
			this.factory.getEditorArea());
	bottom.addView("org.eclipse.test.internal.performance.results.ui.ComponentsResultsView");

	// Components and Builds view put on perspective top left
	IFolderLayout topLeft =
		this.factory.createFolder(
			"topLeft", //NON-NLS-1
			IPageLayout.LEFT,
			0.5f,
			this.factory.getEditorArea());
	topLeft.addView("org.eclipse.test.internal.performance.results.ui.ComponentsView"); //NON-NLS-1
	topLeft.addView("org.eclipse.test.internal.performance.results.ui.BuildsView"); //NON-NLS-1

	// Properties view put on perspective top right
	IFolderLayout topRight =
		this.factory.createFolder(
			"topRight", //NON-NLS-1
			IPageLayout.RIGHT,
			0.5f,
			this.factory.getEditorArea());
	topRight.addView(IPageLayout.ID_PROP_SHEET); //NON-NLS-1

	this.factory.setEditorAreaVisible(false);
}

}