blob: 41945b4f990389445ee24336ef87f61d0ae3623b [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2005, 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.pde.internal.ui.editor.product;
import org.eclipse.pde.internal.ui.*;
import org.eclipse.pde.internal.ui.editor.FormLayoutFactory;
import org.eclipse.pde.internal.ui.editor.PDEFormPage;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.ScrolledForm;
public class LaunchingPage extends PDEFormPage {
public static final String PAGE_ID = "launcher"; //$NON-NLS-1$
public LaunchingPage(FormEditor editor) {
super(editor, PAGE_ID, PDEUIMessages.LauncherPage_title);
}
/* (non-Javadoc)
* @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
*/
protected String getHelpResource() {
return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/product_editor/launching.htm"; //$NON-NLS-1$
}
/* (non-Javadoc)
* @see org.eclipse.pde.internal.ui.editor.PDEFormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
*/
protected void createFormContent(IManagedForm managedForm) {
super.createFormContent(managedForm);
ScrolledForm form = managedForm.getForm();
FormToolkit toolkit = managedForm.getToolkit();
form.setImage(PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_PRODUCT_LAUNCHING));
form.setText(PDEUIMessages.LauncherPage_title);
fillBody(managedForm, toolkit);
PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.LAUNCHING_PAGE);
}
private void fillBody(IManagedForm managedForm, FormToolkit toolkit) {
Composite body = managedForm.getForm().getBody();
body.setLayout(FormLayoutFactory.createFormGridLayout(false, 2));
managedForm.addPart(new JRESection(this, body));
managedForm.addPart(new LauncherSection(this, body));
managedForm.addPart(new ArgumentsSection(this, body));
}
}