01: /*******************************************************************************
02: * Copyright (c) 2000, 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.ui.editor.site;
11:
12: import org.eclipse.pde.internal.ui.IHelpContextIds;
13: import org.eclipse.pde.internal.ui.IPDEUIConstants;
14: import org.eclipse.pde.internal.ui.PDEPlugin;
15: import org.eclipse.pde.internal.ui.PDEPluginImages;
16: import org.eclipse.pde.internal.ui.PDEUIMessages;
17: import org.eclipse.pde.internal.ui.editor.FormLayoutFactory;
18: import org.eclipse.pde.internal.ui.editor.PDEFormEditor;
19: import org.eclipse.pde.internal.ui.editor.PDEFormPage;
20: import org.eclipse.ui.PlatformUI;
21: import org.eclipse.ui.forms.IManagedForm;
22: import org.eclipse.ui.forms.widgets.ScrolledForm;
23:
24: /**
25: *
26: * Features page.
27: */
28: public class ArchivePage extends PDEFormPage {
29: public static final String PAGE_ID = "archives"; //$NON-NLS-1$
30: private DescriptionSection fDescSection;
31: private MirrorsSection fMirrorsSection;
32: private ArchiveSection fArchiveSection;
33:
34: public ArchivePage(PDEFormEditor editor) {
35: super (editor, PAGE_ID, PDEUIMessages.ArchivePage_name);
36: }
37:
38: protected void createFormContent(IManagedForm mform) {
39: super .createFormContent(mform);
40: ScrolledForm form = mform.getForm();
41: form.getBody().setLayout(
42: FormLayoutFactory.createFormGridLayout(false, 1));
43:
44: fDescSection = new DescriptionSection(this , form.getBody());
45: fArchiveSection = new ArchiveSection(this , form.getBody());
46: fMirrorsSection = new MirrorsSection(this , form.getBody());
47:
48: mform.addPart(fDescSection);
49: mform.addPart(fMirrorsSection);
50: mform.addPart(fArchiveSection);
51:
52: PlatformUI.getWorkbench().getHelpSystem().setHelp(
53: form.getBody(), IHelpContextIds.MANIFEST_SITE_ARCHIVES);
54: form.setText(PDEUIMessages.ArchivePage_title);
55: form.setImage(PDEPlugin.getDefault().getLabelProvider().get(
56: PDEPluginImages.DESC_JAVA_LIB_OBJ));
57: }
58:
59: protected String getHelpResource() {
60: return IPDEUIConstants.PLUGIN_DOC_ROOT
61: + "guide/tools/editors/site_editor/archives.htm"; //$NON-NLS-1$
62: }
63: }
|