01: /*******************************************************************************
02: * Copyright (c) 2005, 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.product;
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.PDEFormPage;
19: import org.eclipse.swt.widgets.Composite;
20: import org.eclipse.ui.PlatformUI;
21: import org.eclipse.ui.forms.IManagedForm;
22: import org.eclipse.ui.forms.editor.FormEditor;
23: import org.eclipse.ui.forms.widgets.FormToolkit;
24: import org.eclipse.ui.forms.widgets.ScrolledForm;
25:
26: public class LaunchingPage extends PDEFormPage {
27:
28: public static final String PAGE_ID = "launcher"; //$NON-NLS-1$
29:
30: public LaunchingPage(FormEditor editor) {
31: super (editor, PAGE_ID, PDEUIMessages.LauncherPage_title);
32: }
33:
34: /* (non-Javadoc)
35: * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
36: */
37: protected String getHelpResource() {
38: return IPDEUIConstants.PLUGIN_DOC_ROOT
39: + "guide/tools/editors/product_editor/launching.htm"; //$NON-NLS-1$
40: }
41:
42: /* (non-Javadoc)
43: * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
44: */
45: protected void createFormContent(IManagedForm managedForm) {
46: super .createFormContent(managedForm);
47: ScrolledForm form = managedForm.getForm();
48: FormToolkit toolkit = managedForm.getToolkit();
49: form.setImage(PDEPlugin.getDefault().getLabelProvider().get(
50: PDEPluginImages.DESC_PRODUCT_LAUNCHING));
51: form.setText(PDEUIMessages.LauncherPage_title);
52: fillBody(managedForm, toolkit);
53: PlatformUI.getWorkbench().getHelpSystem().setHelp(
54: form.getBody(), IHelpContextIds.LAUNCHING_PAGE);
55: }
56:
57: private void fillBody(IManagedForm managedForm, FormToolkit toolkit) {
58: Composite body = managedForm.getForm().getBody();
59: body
60: .setLayout(FormLayoutFactory.createFormGridLayout(
61: false, 2));
62:
63: managedForm.addPart(new JRESection(this , body));
64: managedForm.addPart(new LauncherSection(this , body));
65: managedForm.addPart(new ArgumentsSection(this, body));
66: }
67:
68: }
|