Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/prov/ui/admin/rcp/ProvisioningRCPPerspective.java')
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/prov/ui/admin/rcp/ProvisioningRCPPerspective.java48
1 files changed, 48 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/prov/ui/admin/rcp/ProvisioningRCPPerspective.java b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/prov/ui/admin/rcp/ProvisioningRCPPerspective.java
new file mode 100644
index 000000000..80498e8b9
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/prov/ui/admin/rcp/ProvisioningRCPPerspective.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.equinox.prov.ui.admin.rcp;
+
+import org.eclipse.ui.*;
+
+/**
+ * Perspective which makes the standard provisioning views available.
+ *
+ * @since 3.4
+ *
+ */
+public class ProvisioningRCPPerspective implements IPerspectiveFactory {
+
+ private IPageLayout factory;
+ private static final String METADATA_REPOSITORIES = "org.eclipse.prov.ui.admin.MetadataRepositoriesView"; //$NON-NLS-1$
+ private static final String ARTIFACT_REPOSITORIES = "org.eclipse.prov.ui.admin.ArtifactRepositoriesView"; //$NON-NLS-1$
+ private static final String PROFILES = "org.eclipse.prov.ui.admin.ProfilesView"; //$NON-NLS-1$
+
+ public ProvisioningRCPPerspective() {
+ super();
+ }
+
+ public void createInitialLayout(IPageLayout layout) {
+ this.factory = layout;
+ addViews();
+ }
+
+ private void addViews() {
+ IFolderLayout top = factory.createFolder("top", //$NON-NLS-1$
+ IPageLayout.TOP, 0.5f, factory.getEditorArea());
+ top.addView(METADATA_REPOSITORIES);
+ factory.getViewLayout(METADATA_REPOSITORIES).setCloseable(false);
+ top.addView(ARTIFACT_REPOSITORIES);
+ factory.getViewLayout(ARTIFACT_REPOSITORIES).setCloseable(false);
+ factory.addView(PROFILES, IPageLayout.BOTTOM, 0.65f, "top"); //$NON-NLS-1$
+ factory.getViewLayout(PROFILES).setCloseable(false);
+ factory.setEditorAreaVisible(false);
+ }
+}

Back to the top