Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 277506 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/pde/internal/ui/IHelpContextIds.java (-10 / +22 lines)
Lines 19-35 Link Here
19
	public static final String BUILD_OPTIONS_PREFERENCE_PAGE = PREFIX + "build_options_preference_page"; //$NON-NLS-1$
19
	public static final String BUILD_OPTIONS_PREFERENCE_PAGE = PREFIX + "build_options_preference_page"; //$NON-NLS-1$
20
	public static final String EDITOR_PREFERENCE_PAGE = PREFIX + "editor_preference_page"; //$NON-NLS-1$
20
	public static final String EDITOR_PREFERENCE_PAGE = PREFIX + "editor_preference_page"; //$NON-NLS-1$
21
	public static final String OSGI_PREFERENCE_PAGE = PREFIX + "osgi_preference_page"; //$NON-NLS-1$
21
	public static final String OSGI_PREFERENCE_PAGE = PREFIX + "osgi_preference_page"; //$NON-NLS-1$
22
	public static final String SOURCE_PREFERENCE_PAGE = PREFIX + "source_preference_page"; //$NON-NLS-1$
22
	//public static final String SOURCE_PREFERENCE_PAGE = PREFIX + "source_preference_page"; //$NON-NLS-1$
23
	public static final String TARGET_PLUGINS_PREFERENCE_PAGE = PREFIX + "target_plugins_preference_page"; //$NON-NLS-1$
23
	//public static final String TARGET_PLUGINS_PREFERENCE_PAGE = PREFIX + "target_plugins_preference_page"; //$NON-NLS-1$
24
	public static final String TARGET_PROVISIONERS_PREFERENCE_PAGE = PREFIX + "target_provisioners_preference_page"; //$NON-NLS-1$
24
	public static final String TARGET_PROVISIONERS_PREFERENCE_PAGE = PREFIX + "target_provisioners_preference_page"; //$NON-NLS-1$
25
	public static final String IMPLICIT_PLUGINS_PREFERENCE_PAGE = PREFIX + "implicit_plugins_preference_page"; //$NON-NLS-1$
25
	//public static final String IMPLICIT_PLUGINS_PREFERENCE_PAGE = PREFIX + "implicit_plugins_preference_page"; //$NON-NLS-1$
26
	public static final String IMPLICIT_PLUGINS_SELECTION_DIALOG = PREFIX + "implicit_plugins_selection_dialog"; //$NON-NLS-1$
26
	//public static final String IMPLICIT_PLUGINS_SELECTION_DIALOG = PREFIX + "implicit_plugins_selection_dialog"; //$NON-NLS-1$
27
	public static final String LAUNCHING_ARGS_PREFERENCE_PAGE = PREFIX + "launching_args_preference_page"; //$NON-NLS-1$
27
	//public static final String LAUNCHING_ARGS_PREFERENCE_PAGE = PREFIX + "launching_args_preference_page"; //$NON-NLS-1$
28
	public static final String COMPILERS_PREFERENCE_PAGE = PREFIX + "compilers_preference_page"; //$NON-NLS-1$
28
	public static final String COMPILERS_PREFERENCE_PAGE = PREFIX + "compilers_preference_page"; //$NON-NLS-1$
29
	public static final String PROJECT_SELECTION_DIALOG = PREFIX + "project_selection_dialog"; //$NON-NLS-1$
29
	public static final String PROJECT_SELECTION_DIALOG = PREFIX + "project_selection_dialog"; //$NON-NLS-1$
30
	public static final String TARGET_ENVIRONMENT_PREFERENCE_PAGE = PREFIX + "target_environment_preference_page"; //$NON-NLS-1$
30
	//public static final String TARGET_ENVIRONMENT_PREFERENCE_PAGE = PREFIX + "target_environment_preference_page"; //$NON-NLS-1$
31
	public static final String TARGET_PLATFORM_PREFERENCE_PAGE = PREFIX + "target_platform_preference_page"; //$NON-NLS-1$
31
	public static final String TARGET_PLATFORM_PREFERENCE_PAGE = PREFIX + "target_platform_preference_page"; //$NON-NLS-1$
32
	public static final String TARGET_SELECTION_DIALOG = PREFIX + "target_selection_dialog"; //$NON-NLS-1$
32
	//public static final String TARGET_SELECTION_DIALOG = PREFIX + "target_selection_dialog"; //$NON-NLS-1$
33
33
34
	// Property Pages
34
	// Property Pages
35
	public static final String SELFHOSTING_PROPERTY_PAGE = PREFIX + "selfhosting_property_page"; //$NON-NLS-1$
35
	public static final String SELFHOSTING_PROPERTY_PAGE = PREFIX + "selfhosting_property_page"; //$NON-NLS-1$
Lines 40-46 Link Here
40
40
41
	public static final String DEPENDENCIES_VIEW = PREFIX + "dependencies_view"; //$NON-NLS-1$
41
	public static final String DEPENDENCIES_VIEW = PREFIX + "dependencies_view"; //$NON-NLS-1$
42
	public static final String HISTORY_ACTION = PREFIX + "history_action"; //$NON-NLS-1$
42
	public static final String HISTORY_ACTION = PREFIX + "history_action"; //$NON-NLS-1$
43
	public static final String TARGET_STATE_VIEW = PREFIX + "target_state_view"; //$NON-NLS-1$
43
	public static final String TARGET_STATE_VIEW = PREFIX + "target_platform_state"; //$NON-NLS-1$
44
	public static final String HISTORY_LIST_ACTION = PREFIX + "history_list_action"; //$NON-NLS-1$
44
	public static final String HISTORY_LIST_ACTION = PREFIX + "history_list_action"; //$NON-NLS-1$
45
	public static final String HISTORY_LIST_DIALOG = PREFIX + "history_list_dialog"; //$NON-NLS-1$
45
	public static final String HISTORY_LIST_DIALOG = PREFIX + "history_list_dialog"; //$NON-NLS-1$
46
46
Lines 116-122 Link Here
116
	public static final String EXTERNALIZE_STRINGS_PAGE = PREFIX + "externalize_strings_page"; //$NON-NLS-1$
116
	public static final String EXTERNALIZE_STRINGS_PAGE = PREFIX + "externalize_strings_page"; //$NON-NLS-1$
117
	public static final String CHEAT_SHEET_PAGE = PREFIX + "cheat_sheet_page"; //$NON-NLS-1$
117
	public static final String CHEAT_SHEET_PAGE = PREFIX + "cheat_sheet_page"; //$NON-NLS-1$
118
	public static final String PRODUCT_FILE_PAGE = PREFIX + "product_file_page"; //$NON-NLS-1$
118
	public static final String PRODUCT_FILE_PAGE = PREFIX + "product_file_page"; //$NON-NLS-1$
119
	//This TARGET_DEFINITION_PAGE points to old target help.
119
	public static final String TARGET_DEFINITION_PAGE = PREFIX + "target_definition_page"; //$NON-NLS-1$
120
	public static final String TARGET_DEFINITION_PAGE = PREFIX + "target_definition_page"; //$NON-NLS-1$
121
	//These are the new target help links
122
	public static final String NEW_TARGET_WIZARD = PREFIX + "new_target_wizard"; //$NON-NLS-1$
123
	public static final String EDIT_TARGET_WIZARD = PREFIX + "edit_target_wizard"; //$NON-NLS-1$
124
	public static final String EDIT_TARGET_WIZARD_LOCATIONS_TAB = PREFIX + "edit_target_wizard_locations_tab"; //$NON-NLS-1$
125
	public static final String EDIT_TARGET_WIZARD_ARGUMENT_TAB = PREFIX + "edit_target_wizard_argument_tab"; //$NON-NLS-1$
126
	public static final String EDIT_TARGET_WIZARD_CONTENT_TAB = PREFIX + "edit_target_wizard_content_tab"; //$NON-NLS-1$
127
	public static final String EDIT_TARGET_WIZARD_ENVIRONMENT_TAB = PREFIX + "edit_target_wizard_environment_tab"; //$NON-NLS-1$
128
	public static final String EDIT_TARGET_WIZARD_IMPLICIT_TAB = PREFIX + "edit_target_wizard_implicit_tab"; //$NON-NLS-1$
129
	public static final String MOVE_TARGET_WIZARD = PREFIX + "move_target_wizard"; //$NON-NLS-1$
120
	public static final String TOC_PAGE = PREFIX + "toc_page"; //$NON-NLS-1$
130
	public static final String TOC_PAGE = PREFIX + "toc_page"; //$NON-NLS-1$
121
131
122
	public static final String XHTML_CONVERSION_PAGE = PREFIX + "xhtml_conversion_page"; //$NON-NLS-1$
132
	public static final String XHTML_CONVERSION_PAGE = PREFIX + "xhtml_conversion_page"; //$NON-NLS-1$
Lines 239-246 Link Here
239
	public static final String OVERVIEW_PAGE = PREFIX + "overview_page"; //$NON-NLS-1$
249
	public static final String OVERVIEW_PAGE = PREFIX + "overview_page"; //$NON-NLS-1$
240
	public static final String LICENSING_PAGE = PREFIX + "licensing_page"; //$NON-NLS-1$
250
	public static final String LICENSING_PAGE = PREFIX + "licensing_page"; //$NON-NLS-1$
241
251
242
	public static final String ENVIRONMENT_PAGE = PREFIX + "environment_page"; //$NON-NLS-1$	
252
	public static final String TARGET_EDITOR = PREFIX + "target_editor"; //$NON-NLS-1$
243
	public static final String TARGET_OVERVIEW_PAGE = PREFIX + "target_overview_page"; //$NON-NLS-1$
253
	public static final String TARGET_EDITOR_ENVIRONMENT_PAGE = PREFIX + "target_editor_environment_page"; //$NON-NLS-1$	
254
	public static final String TARGET_EDITOR_DEFINITION_PAGE = PREFIX + "target_editor_definition_page"; //$NON-NLS-1$
255
	public static final String TARGET_EDITOR_CONTENT_PAGE = PREFIX + "target_editor_content_page"; //$NON-NLS-1$
244
256
245
	// Tools
257
	// Tools
246
	public static final String ORGANIZE_MANIFESTS = PREFIX + "organize_manifest"; //$NON-NLS-1$
258
	public static final String ORGANIZE_MANIFESTS = PREFIX + "organize_manifest"; //$NON-NLS-1$
(-)src/org/eclipse/pde/internal/ui/wizards/target/TargetDefinitionContentPage.java (-3 / +6 lines)
Lines 161-166 Link Here
161
		SWTFactory.createWrapLabel(pluginTabContainer, PDEUIMessages.ContentSection_1, 2, 400);
161
		SWTFactory.createWrapLabel(pluginTabContainer, PDEUIMessages.ContentSection_1, 2, 400);
162
		fLocationTree = TargetLocationsGroup.createInDialog(pluginTabContainer);
162
		fLocationTree = TargetLocationsGroup.createInDialog(pluginTabContainer);
163
		fLocationTab.setControl(pluginTabContainer);
163
		fLocationTab.setControl(pluginTabContainer);
164
		PlatformUI.getWorkbench().getHelpSystem().setHelp(pluginTabContainer, IHelpContextIds.EDIT_TARGET_WIZARD_LOCATIONS_TAB);
164
165
165
		TabItem contentTab = new TabItem(tabs, SWT.NONE);
166
		TabItem contentTab = new TabItem(tabs, SWT.NONE);
166
		contentTab.setText(PDEUIMessages.TargetDefinitionContentPage_6);
167
		contentTab.setText(PDEUIMessages.TargetDefinitionContentPage_6);
Lines 168-173 Link Here
168
		SWTFactory.createWrapLabel(contentTabContainer, PDEUIMessages.ContentSection_1, 2, 400);
169
		SWTFactory.createWrapLabel(contentTabContainer, PDEUIMessages.ContentSection_1, 2, 400);
169
		fContentTree = new TargetContentsGroup(contentTabContainer);
170
		fContentTree = new TargetContentsGroup(contentTabContainer);
170
		contentTab.setControl(contentTabContainer);
171
		contentTab.setControl(contentTabContainer);
172
		PlatformUI.getWorkbench().getHelpSystem().setHelp(contentTabContainer, IHelpContextIds.EDIT_TARGET_WIZARD_CONTENT_TAB);
171
173
172
		TabItem envTab = new TabItem(tabs, SWT.NONE);
174
		TabItem envTab = new TabItem(tabs, SWT.NONE);
173
		envTab.setText(PDEUIMessages.TargetDefinitionEnvironmentPage_3);
175
		envTab.setText(PDEUIMessages.TargetDefinitionEnvironmentPage_3);
Lines 175-189 Link Here
175
		createTargetEnvironmentGroup(envTabContainer);
177
		createTargetEnvironmentGroup(envTabContainer);
176
		createJREGroup(envTabContainer);
178
		createJREGroup(envTabContainer);
177
		envTab.setControl(envTabContainer);
179
		envTab.setControl(envTabContainer);
180
		PlatformUI.getWorkbench().getHelpSystem().setHelp(envTabContainer, IHelpContextIds.EDIT_TARGET_WIZARD_ENVIRONMENT_TAB);
178
181
179
		TabItem argsTab = new TabItem(tabs, SWT.NONE);
182
		TabItem argsTab = new TabItem(tabs, SWT.NONE);
180
		argsTab.setText(PDEUIMessages.TargetDefinitionEnvironmentPage_4);
183
		argsTab.setText(PDEUIMessages.TargetDefinitionEnvironmentPage_4);
181
		argsTab.setControl(createArgumentsGroup(tabs));
184
		argsTab.setControl(createArgumentsGroup(tabs));
185
		PlatformUI.getWorkbench().getHelpSystem().setHelp(argsTab.getControl(), IHelpContextIds.EDIT_TARGET_WIZARD_ARGUMENT_TAB);
182
186
183
		TabItem depTab = new TabItem(tabs, SWT.NONE);
187
		TabItem depTab = new TabItem(tabs, SWT.NONE);
184
		depTab.setText(PDEUIMessages.TargetDefinitionEnvironmentPage_5);
188
		depTab.setText(PDEUIMessages.TargetDefinitionEnvironmentPage_5);
185
		depTab.setControl(createImplicitTabContents(tabs));
189
		depTab.setControl(createImplicitTabContents(tabs));
190
		PlatformUI.getWorkbench().getHelpSystem().setHelp(depTab.getControl(), IHelpContextIds.EDIT_TARGET_WIZARD_IMPLICIT_TAB);
186
191
192
		PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, IHelpContextIds.EDIT_TARGET_WIZARD);
187
		initializeListeners();
193
		initializeListeners();
188
		targetChanged(getTargetDefinition());
194
		targetChanged(getTargetDefinition());
189
		setControl(comp);
195
		setControl(comp);
Lines 361-367 Link Here
361
				getTargetDefinition().setNL(getModelValue(value));
367
				getTargetDefinition().setNL(getModelValue(value));
362
			}
368
			}
363
		});
369
		});
364
365
	}
370
	}
366
371
367
	/**
372
	/**
Lines 541-547 Link Here
541
546
542
		Button vmVars = SWTFactory.createPushButton(buttons, PDEUIMessages.JavaArgumentsTab_vmVariables, null, GridData.HORIZONTAL_ALIGN_END);
547
		Button vmVars = SWTFactory.createPushButton(buttons, PDEUIMessages.JavaArgumentsTab_vmVariables, null, GridData.HORIZONTAL_ALIGN_END);
543
		vmVars.addSelectionListener(getVariablesListener(fVMArgs));
548
		vmVars.addSelectionListener(getVariablesListener(fVMArgs));
544
545
		return container;
549
		return container;
546
	}
550
	}
547
551
Lines 601-607 Link Here
601
		createImpLabel(container);
605
		createImpLabel(container);
602
		createImpTable(container);
606
		createImpTable(container);
603
		createImpButtons(container);
607
		createImpButtons(container);
604
		// TODO: PlatformUI.getWorkbench().getHelpSystem().setHelp(container, IHelpContextIds.IMPLICIT_PLUGINS_PREFERENCE_PAGE);
605
		return container;
608
		return container;
606
	}
609
	}
607
610
(-)src/org/eclipse/pde/internal/ui/wizards/target/MoveTargetDefinitionPage.java (+7 lines)
Lines 14-22 Link Here
14
import org.eclipse.core.runtime.IPath;
14
import org.eclipse.core.runtime.IPath;
15
import org.eclipse.jface.viewers.IStructuredSelection;
15
import org.eclipse.jface.viewers.IStructuredSelection;
16
import org.eclipse.osgi.util.NLS;
16
import org.eclipse.osgi.util.NLS;
17
import org.eclipse.pde.internal.ui.IHelpContextIds;
17
import org.eclipse.pde.internal.ui.PDEUIMessages;
18
import org.eclipse.pde.internal.ui.PDEUIMessages;
18
import org.eclipse.pde.internal.ui.wizards.PDEWizardNewFileCreationPage;
19
import org.eclipse.pde.internal.ui.wizards.PDEWizardNewFileCreationPage;
19
import org.eclipse.swt.widgets.Composite;
20
import org.eclipse.swt.widgets.Composite;
21
import org.eclipse.ui.PlatformUI;
20
22
21
/**
23
/**
22
 * Defines the Page to get the location where the new target file has to be created
24
 * Defines the Page to get the location where the new target file has to be created
Lines 67-70 Link Here
67
		}
69
		}
68
		return super.validatePage();
70
		return super.validatePage();
69
	}
71
	}
72
73
	public void createControl(Composite parent) {
74
		super.createControl(parent);
75
		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.MOVE_TARGET_WIZARD);
76
	}
70
}
77
}
(-)src/org/eclipse/pde/internal/ui/wizards/target/TargetDefinitionWizardPage.java (-1 lines)
Lines 49-55 Link Here
49
49
50
	public void createControl(Composite parent) {
50
	public void createControl(Composite parent) {
51
		super.createControl(parent);
51
		super.createControl(parent);
52
53
		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.TARGET_DEFINITION_PAGE);
52
		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.TARGET_DEFINITION_PAGE);
54
	}
53
	}
55
54
(-)src/org/eclipse/pde/internal/ui/wizards/target/TargetCreationPage.java (-233 / +234 lines)
Lines 1-233 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.pde.internal.ui.wizards.target;
11
package org.eclipse.pde.internal.ui.wizards.target;
12
12
13
import org.eclipse.core.runtime.CoreException;
13
import org.eclipse.core.runtime.CoreException;
14
import org.eclipse.core.runtime.IConfigurationElement;
14
import org.eclipse.core.runtime.IConfigurationElement;
15
import org.eclipse.jface.dialogs.Dialog;
15
import org.eclipse.jface.dialogs.Dialog;
16
import org.eclipse.jface.wizard.IWizardPage;
16
import org.eclipse.jface.wizard.IWizardPage;
17
import org.eclipse.jface.wizard.WizardSelectionPage;
17
import org.eclipse.jface.wizard.WizardSelectionPage;
18
import org.eclipse.pde.internal.core.PDECore;
18
import org.eclipse.pde.internal.core.PDECore;
19
import org.eclipse.pde.internal.core.target.TargetPlatformService;
19
import org.eclipse.pde.internal.core.target.TargetPlatformService;
20
import org.eclipse.pde.internal.core.target.provisional.ITargetDefinition;
20
import org.eclipse.pde.internal.core.target.provisional.ITargetDefinition;
21
import org.eclipse.pde.internal.core.target.provisional.ITargetPlatformService;
21
import org.eclipse.pde.internal.core.target.provisional.ITargetPlatformService;
22
import org.eclipse.pde.internal.ui.PDEUIMessages;
22
import org.eclipse.pde.internal.ui.*;
23
import org.eclipse.pde.internal.ui.SWTFactory;
23
import org.eclipse.swt.SWT;
24
import org.eclipse.swt.SWT;
24
import org.eclipse.swt.events.SelectionAdapter;
25
import org.eclipse.swt.events.SelectionAdapter;
25
import org.eclipse.swt.events.SelectionEvent;
26
import org.eclipse.swt.events.SelectionEvent;
26
import org.eclipse.swt.layout.GridData;
27
import org.eclipse.swt.layout.GridData;
27
import org.eclipse.swt.widgets.*;
28
import org.eclipse.swt.widgets.*;
28
import org.eclipse.ui.PlatformUI;
29
29
30
/**
30
/**
31
 * First wizard page used to create a target definition. Defines the location where
31
 * First wizard page used to create a target definition. Defines the location where
32
 * the definition will be created and how to seed the definition.
32
 * the definition will be created and how to seed the definition.
33
 */
33
 */
34
public class TargetCreationPage extends WizardSelectionPage {
34
public class TargetCreationPage extends WizardSelectionPage {
35
35
36
	protected static final int USE_EMPTY = 0;
36
	protected static final int USE_EMPTY = 0;
37
	protected static final int USE_DEFAULT = 1;
37
	protected static final int USE_DEFAULT = 1;
38
	protected static final int USE_CURRENT_TP = 2;
38
	protected static final int USE_CURRENT_TP = 2;
39
	protected static final int USE_EXISTING_TARGET = 3;
39
	protected static final int USE_EXISTING_TARGET = 3;
40
40
41
	private Button fEmptyButton;
41
	private Button fEmptyButton;
42
	private Button fDefaultButton;
42
	private Button fDefaultButton;
43
	private Button fCurrentTPButton;
43
	private Button fCurrentTPButton;
44
	private Button fExistingTargetButton;
44
	private Button fExistingTargetButton;
45
	private Combo fTargets;
45
	private Combo fTargets;
46
	private String[] fTargetIds;
46
	private String[] fTargetIds;
47
	private String templateTargetId;
47
	private String templateTargetId;
48
	private ITargetDefinition[] fTargetDefs = new ITargetDefinition[4];
48
	private ITargetDefinition[] fTargetDefs = new ITargetDefinition[4];
49
49
50
	public TargetCreationPage(String pageName) {
50
	public TargetCreationPage(String pageName) {
51
		super(pageName);
51
		super(pageName);
52
		setTitle(PDEUIMessages.TargetProfileWizardPage_title);
52
		setTitle(PDEUIMessages.TargetProfileWizardPage_title);
53
		setDescription(PDEUIMessages.TargetProfileWizardPage_description);
53
		setDescription(PDEUIMessages.TargetProfileWizardPage_description);
54
	}
54
	}
55
55
56
	/**
56
	/**
57
	 * Returns the target service or <code>null</code> if none.
57
	 * Returns the target service or <code>null</code> if none.
58
	 * 
58
	 * 
59
	 * @return target service or <code>null</code>
59
	 * @return target service or <code>null</code>
60
	 */
60
	 */
61
	protected ITargetPlatformService getTargetService() {
61
	protected ITargetPlatformService getTargetService() {
62
		return (ITargetPlatformService) PDECore.getDefault().acquireService(ITargetPlatformService.class.getName());
62
		return (ITargetPlatformService) PDECore.getDefault().acquireService(ITargetPlatformService.class.getName());
63
	}
63
	}
64
64
65
	/* (non-Javadoc)
65
	/* (non-Javadoc)
66
	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
66
	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
67
	 */
67
	 */
68
	public void createControl(Composite parent) {
68
	public void createControl(Composite parent) {
69
		Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_BOTH);
69
		Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_BOTH);
70
		SWTFactory.createLabel(comp, PDEUIMessages.TargetCreationPage_0, 3);
70
		SWTFactory.createLabel(comp, PDEUIMessages.TargetCreationPage_0, 3);
71
71
72
		fEmptyButton = SWTFactory.createRadioButton(comp, PDEUIMessages.TargetCreationPage_1, 2);
72
		fEmptyButton = SWTFactory.createRadioButton(comp, PDEUIMessages.TargetCreationPage_1, 2);
73
		fDefaultButton = SWTFactory.createRadioButton(comp, PDEUIMessages.TargetCreationPage_2, 2);
73
		fDefaultButton = SWTFactory.createRadioButton(comp, PDEUIMessages.TargetCreationPage_2, 2);
74
		fCurrentTPButton = SWTFactory.createRadioButton(comp, PDEUIMessages.TargetCreationPage_3, 2);
74
		fCurrentTPButton = SWTFactory.createRadioButton(comp, PDEUIMessages.TargetCreationPage_3, 2);
75
		fExistingTargetButton = SWTFactory.createRadioButton(comp, PDEUIMessages.TargetCreationPage_4, 1);
75
		fExistingTargetButton = SWTFactory.createRadioButton(comp, PDEUIMessages.TargetCreationPage_4, 1);
76
		fExistingTargetButton.addSelectionListener(new SelectionAdapter() {
76
		fExistingTargetButton.addSelectionListener(new SelectionAdapter() {
77
			public void widgetSelected(SelectionEvent e) {
77
			public void widgetSelected(SelectionEvent e) {
78
				boolean enabled = fExistingTargetButton.getSelection();
78
				boolean enabled = fExistingTargetButton.getSelection();
79
				fTargets.setEnabled(enabled);
79
				fTargets.setEnabled(enabled);
80
			}
80
			}
81
		});
81
		});
82
82
83
		fEmptyButton.setSelection(true);
83
		fEmptyButton.setSelection(true);
84
84
85
		fTargets = SWTFactory.createCombo(comp, SWT.SINGLE | SWT.READ_ONLY, 1, GridData.BEGINNING, null);
85
		fTargets = SWTFactory.createCombo(comp, SWT.SINGLE | SWT.READ_ONLY, 1, GridData.BEGINNING, null);
86
		fTargets.setEnabled(false);
86
		fTargets.setEnabled(false);
87
		initializeTargetCombo();
87
		initializeTargetCombo();
88
		fTargets.addSelectionListener(new SelectionAdapter() {
88
		fTargets.addSelectionListener(new SelectionAdapter() {
89
89
90
			public void widgetSelected(SelectionEvent e) {
90
			public void widgetSelected(SelectionEvent e) {
91
				templateTargetId = fTargetIds[fTargets.getSelectionIndex()];
91
				templateTargetId = fTargetIds[fTargets.getSelectionIndex()];
92
92
93
			}
93
			}
94
		});
94
		});
95
95
96
		Dialog.applyDialogFont(comp);
96
		Dialog.applyDialogFont(comp);
97
		setSelectedNode(new EditTargetNode());
97
		setSelectedNode(new EditTargetNode());
98
		setControl(comp);
98
		setControl(comp);
99
		setPageComplete(true);
99
		setPageComplete(true);
100
	}
100
		PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IHelpContextIds.NEW_TARGET_WIZARD);
101
101
	}
102
	protected void initializeTargetCombo() {
102
103
		IConfigurationElement[] elements = PDECore.getDefault().getTargetProfileManager().getSortedTargets();
103
	protected void initializeTargetCombo() {
104
		fTargetIds = new String[elements.length];
104
		IConfigurationElement[] elements = PDECore.getDefault().getTargetProfileManager().getSortedTargets();
105
		for (int i = 0; i < elements.length; i++) {
105
		fTargetIds = new String[elements.length];
106
			String name = elements[i].getAttribute("name"); //$NON-NLS-1$
106
		for (int i = 0; i < elements.length; i++) {
107
			if (fTargets.indexOf(name) == -1)
107
			String name = elements[i].getAttribute("name"); //$NON-NLS-1$
108
				fTargets.add(name);
108
			if (fTargets.indexOf(name) == -1)
109
			fTargetIds[i] = elements[i].getAttribute("id"); //$NON-NLS-1$
109
				fTargets.add(name);
110
		}
110
			fTargetIds[i] = elements[i].getAttribute("id"); //$NON-NLS-1$
111
		if (elements.length > 0) {
111
		}
112
			fTargets.select(0);
112
		if (elements.length > 0) {
113
			setTargetId(fTargetIds[fTargets.getSelectionIndex()]);
113
			fTargets.select(0);
114
		}
114
			setTargetId(fTargetIds[fTargets.getSelectionIndex()]);
115
	}
115
		}
116
116
	}
117
	protected int getInitializationOption() {
117
118
		if (fEmptyButton.getSelection())
118
	protected int getInitializationOption() {
119
			return USE_EMPTY;
119
		if (fEmptyButton.getSelection())
120
		if (fDefaultButton.getSelection())
120
			return USE_EMPTY;
121
			return USE_DEFAULT;
121
		if (fDefaultButton.getSelection())
122
		else if (fCurrentTPButton.getSelection())
122
			return USE_DEFAULT;
123
			return USE_CURRENT_TP;
123
		else if (fCurrentTPButton.getSelection())
124
		return USE_EXISTING_TARGET;
124
			return USE_CURRENT_TP;
125
	}
125
		return USE_EXISTING_TARGET;
126
126
	}
127
	protected String getTargetId() {
127
128
		return templateTargetId;
128
	protected String getTargetId() {
129
	}
129
		return templateTargetId;
130
130
	}
131
	protected void setTargetId(String targetId) {
131
132
		templateTargetId = targetId;
132
	protected void setTargetId(String targetId) {
133
	}
133
		templateTargetId = targetId;
134
134
	}
135
	protected ITargetDefinition createTarget(int targetOption) {
135
136
		ITargetPlatformService service = getTargetService();
136
	protected ITargetDefinition createTarget(int targetOption) {
137
		if (service != null) {
137
		ITargetPlatformService service = getTargetService();
138
			ITargetDefinition definition = service.newTarget();
138
		if (service != null) {
139
			switch (targetOption) {
139
			ITargetDefinition definition = service.newTarget();
140
				case USE_EMPTY :
140
			switch (targetOption) {
141
					definition.setName(PDEUIMessages.TargetCreationPage_6);
141
				case USE_EMPTY :
142
					break;
142
					definition.setName(PDEUIMessages.TargetCreationPage_6);
143
				case USE_DEFAULT :
143
					break;
144
					try {
144
				case USE_DEFAULT :
145
						populateBasicTarget(definition);
145
					try {
146
					} catch (CoreException e) {
146
						populateBasicTarget(definition);
147
						setErrorMessage(e.getMessage());
147
					} catch (CoreException e) {
148
						return null;
148
						setErrorMessage(e.getMessage());
149
					}
149
						return null;
150
					break;
150
					}
151
				case USE_CURRENT_TP :
151
					break;
152
					try {
152
				case USE_CURRENT_TP :
153
						populateFromCurrentTargetPlatform(definition);
153
					try {
154
					} catch (CoreException e) {
154
						populateFromCurrentTargetPlatform(definition);
155
						setErrorMessage(e.getMessage());
155
					} catch (CoreException e) {
156
						return null;
156
						setErrorMessage(e.getMessage());
157
					}
157
						return null;
158
					break;
158
					}
159
				case USE_EXISTING_TARGET :
159
					break;
160
					try {
160
				case USE_EXISTING_TARGET :
161
						populateFromTemplate(definition, getTargetId());
161
					try {
162
					} catch (CoreException e) {
162
						populateFromTemplate(definition, getTargetId());
163
						setErrorMessage(e.getMessage());
163
					} catch (CoreException e) {
164
						return null;
164
						setErrorMessage(e.getMessage());
165
					}
165
						return null;
166
					break;
166
					}
167
			}
167
					break;
168
			return definition;
168
			}
169
		}
169
			return definition;
170
		return null;
170
		}
171
	}
171
		return null;
172
172
	}
173
	/**
173
174
	 * Applies basic target settings to the given target definition.
174
	/**
175
	 * 
175
	 * Applies basic target settings to the given target definition.
176
	 * @param definition
176
	 * 
177
	 * @throws CoreException 
177
	 * @param definition
178
	 */
178
	 * @throws CoreException 
179
	private void populateBasicTarget(ITargetDefinition definition) throws CoreException {
179
	 */
180
		ITargetPlatformService service = getTargetService();
180
	private void populateBasicTarget(ITargetDefinition definition) throws CoreException {
181
		if (service instanceof TargetPlatformService) {
181
		ITargetPlatformService service = getTargetService();
182
			TargetPlatformService ts = (TargetPlatformService) service;
182
		if (service instanceof TargetPlatformService) {
183
			ITargetDefinition def = ts.newDefaultTargetDefinition();
183
			TargetPlatformService ts = (TargetPlatformService) service;
184
			ts.copyTargetDefinition(def, definition);
184
			ITargetDefinition def = ts.newDefaultTargetDefinition();
185
		}
185
			ts.copyTargetDefinition(def, definition);
186
	}
186
		}
187
187
	}
188
	/**
188
189
	 * Populates the given definition from current target platform settings.
189
	/**
190
	 * 
190
	 * Populates the given definition from current target platform settings.
191
	 * @param definition
191
	 * 
192
	 * @throws CoreException 
192
	 * @param definition
193
	 */
193
	 * @throws CoreException 
194
	private void populateFromCurrentTargetPlatform(ITargetDefinition definition) throws CoreException {
194
	 */
195
		ITargetPlatformService service = getTargetService();
195
	private void populateFromCurrentTargetPlatform(ITargetDefinition definition) throws CoreException {
196
		if (service instanceof TargetPlatformService) {
196
		ITargetPlatformService service = getTargetService();
197
			TargetPlatformService ts = (TargetPlatformService) service;
197
		if (service instanceof TargetPlatformService) {
198
			ts.loadTargetDefinitionFromPreferences(definition);
198
			TargetPlatformService ts = (TargetPlatformService) service;
199
		}
199
			ts.loadTargetDefinitionFromPreferences(definition);
200
	}
200
		}
201
201
	}
202
	/**
202
203
	 * Populates the given definition from the specified target template.
203
	/**
204
	 * 
204
	 * Populates the given definition from the specified target template.
205
	 * @param definition
205
	 * 
206
	 * @param id target extension identifier
206
	 * @param definition
207
	 * @exception CoreException if unable to complete
207
	 * @param id target extension identifier
208
	 */
208
	 * @exception CoreException if unable to complete
209
	private void populateFromTemplate(ITargetDefinition definition, String id) throws CoreException {
209
	 */
210
		ITargetPlatformService service = getTargetService();
210
	private void populateFromTemplate(ITargetDefinition definition, String id) throws CoreException {
211
		if (service != null) {
211
		ITargetPlatformService service = getTargetService();
212
			service.loadTargetDefinition(definition, id);
212
		if (service != null) {
213
		}
213
			service.loadTargetDefinition(definition, id);
214
	}
214
		}
215
215
	}
216
	/* (non-Javadoc)
216
217
	 * @see org.eclipse.jface.wizard.WizardSelectionPage#getNextPage()
217
	/* (non-Javadoc)
218
	 */
218
	 * @see org.eclipse.jface.wizard.WizardSelectionPage#getNextPage()
219
	public IWizardPage getNextPage() {
219
	 */
220
		ITargetDefinition target = null;
220
	public IWizardPage getNextPage() {
221
		int option = getInitializationOption();
221
		ITargetDefinition target = null;
222
		if (fTargetDefs[option] == null) {
222
		int option = getInitializationOption();
223
			fTargetDefs[option] = createTarget(option);
223
		if (fTargetDefs[option] == null) {
224
		}
224
			fTargetDefs[option] = createTarget(option);
225
		target = fTargetDefs[option];
225
		}
226
		if (target != null) {
226
		target = fTargetDefs[option];
227
			((NewTargetDefinitionWizard2) getWizard()).setTargetDefinition(target);
227
		if (target != null) {
228
			((EditTargetNode) getSelectedNode()).setTargetDefinition(target);
228
			((NewTargetDefinitionWizard2) getWizard()).setTargetDefinition(target);
229
			return super.getNextPage();
229
			((EditTargetNode) getSelectedNode()).setTargetDefinition(target);
230
		}
230
			return super.getNextPage();
231
		return null;
231
		}
232
	}
232
		return null;
233
}
233
	}
234
}
(-)src/org/eclipse/pde/internal/ui/editor/targetdefinition/DefinitionPage.java (-6 / +4 lines)
Lines 59-69 Link Here
59
		form.setImage(PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_TARGET_DEFINITION));
59
		form.setImage(PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_TARGET_DEFINITION));
60
		toolkit.decorateFormHeading(form.getForm());
60
		toolkit.decorateFormHeading(form.getForm());
61
		fillBody(managedForm, toolkit);
61
		fillBody(managedForm, toolkit);
62
		// TODO Finish help
63
		((TargetEditor) getEditor()).contributeToToolbar(managedForm.getForm(), ""); //$NON-NLS-1$
62
		((TargetEditor) getEditor()).contributeToToolbar(managedForm.getForm(), ""); //$NON-NLS-1$
64
		((TargetEditor) getEditor()).addForm(managedForm);
63
		((TargetEditor) getEditor()).addForm(managedForm);
65
		form.updateToolBar();
64
		form.updateToolBar();
66
		PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.TARGET_OVERVIEW_PAGE);
65
		PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.TARGET_EDITOR_DEFINITION_PAGE);
67
	}
66
	}
68
67
69
	/* (non-Javadoc)
68
	/* (non-Javadoc)
Lines 148-156 Link Here
148
		return true;
147
		return true;
149
	}
148
	}
150
149
151
	// TODO Hook up help toolbar action
150
	protected String getHelpResource() {
152
//	protected String getHelpResource() {
151
		return "/org.eclipse.pde.doc.user/guide/tools/editors/target_editor/definition_page.htm"; //$NON-NLS-1$
153
//		return "/org.eclipse.pde.doc.user/guide/tools/editors/target_definition_editor/overview.htm"; //$NON-NLS-1$
152
	}
154
//	}
155
153
156
}
154
}
(-)src/org/eclipse/pde/internal/ui/editor/targetdefinition/ContentPage.java (-6 / +5 lines)
Lines 14-19 Link Here
14
import org.eclipse.pde.internal.ui.*;
14
import org.eclipse.pde.internal.ui.*;
15
import org.eclipse.pde.internal.ui.editor.FormLayoutFactory;
15
import org.eclipse.pde.internal.ui.editor.FormLayoutFactory;
16
import org.eclipse.swt.widgets.Composite;
16
import org.eclipse.swt.widgets.Composite;
17
import org.eclipse.ui.PlatformUI;
17
import org.eclipse.ui.forms.IManagedForm;
18
import org.eclipse.ui.forms.IManagedForm;
18
import org.eclipse.ui.forms.editor.FormPage;
19
import org.eclipse.ui.forms.editor.FormPage;
19
import org.eclipse.ui.forms.widgets.FormToolkit;
20
import org.eclipse.ui.forms.widgets.FormToolkit;
Lines 52-62 Link Here
52
		form.setImage(PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_TARGET_DEFINITION));
53
		form.setImage(PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_TARGET_DEFINITION));
53
		toolkit.decorateFormHeading(form.getForm());
54
		toolkit.decorateFormHeading(form.getForm());
54
		fillBody(managedForm, toolkit);
55
		fillBody(managedForm, toolkit);
55
		// TODO Finish help
56
		((TargetEditor) getEditor()).contributeToToolbar(managedForm.getForm(), ""); //$NON-NLS-1$
56
		((TargetEditor) getEditor()).contributeToToolbar(managedForm.getForm(), ""); //$NON-NLS-1$
57
		((TargetEditor) getEditor()).addForm(managedForm);
57
		((TargetEditor) getEditor()).addForm(managedForm);
58
		form.updateToolBar();
58
		form.updateToolBar();
59
//		PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.TARGET_OVERVIEW_PAGE);
59
		PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.TARGET_EDITOR_CONTENT_PAGE);
60
	}
60
	}
61
61
62
	/* (non-Javadoc)
62
	/* (non-Javadoc)
Lines 81-89 Link Here
81
		return true;
81
		return true;
82
	}
82
	}
83
83
84
	// TODO Hook up help toolbar action
84
	protected String getHelpResource() {
85
//	protected String getHelpResource() {
85
		return "/org.eclipse.pde.doc.user/guide/tools/editors/target_editor/content_page.htm"; //$NON-NLS-1$
86
//		return "/org.eclipse.pde.doc.user/guide/tools/editors/target_definition_editor/overview.htm"; //$NON-NLS-1$
86
	}
87
//	}
88
87
89
}
88
}
(-)src/org/eclipse/pde/internal/ui/editor/targetdefinition/EnvironmentPage.java (-84 / +87 lines)
Lines 1-84 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.pde.internal.ui.editor.targetdefinition;
11
package org.eclipse.pde.internal.ui.editor.targetdefinition;
12
12
13
import org.eclipse.pde.internal.ui.*;
13
import org.eclipse.pde.internal.ui.*;
14
import org.eclipse.pde.internal.ui.editor.FormLayoutFactory;
14
import org.eclipse.pde.internal.ui.editor.FormLayoutFactory;
15
import org.eclipse.swt.widgets.Composite;
15
import org.eclipse.swt.widgets.Composite;
16
import org.eclipse.ui.PlatformUI;
16
import org.eclipse.ui.PlatformUI;
17
import org.eclipse.ui.forms.IManagedForm;
17
import org.eclipse.ui.forms.IManagedForm;
18
import org.eclipse.ui.forms.editor.FormEditor;
18
import org.eclipse.ui.forms.editor.FormEditor;
19
import org.eclipse.ui.forms.editor.FormPage;
19
import org.eclipse.ui.forms.editor.FormPage;
20
import org.eclipse.ui.forms.widgets.FormToolkit;
20
import org.eclipse.ui.forms.widgets.FormToolkit;
21
import org.eclipse.ui.forms.widgets.ScrolledForm;
21
import org.eclipse.ui.forms.widgets.ScrolledForm;
22
22
23
/**
23
/**
24
 * Second page for the target definition editor.  Provides ability to alter various
24
 * Second page for the target definition editor.  Provides ability to alter various
25
 * environment elements of the target.
25
 * environment elements of the target.
26
 * @see TargetEditor
26
 * @see TargetEditor
27
 * @see EnvironmentSection
27
 * @see EnvironmentSection
28
 * @see JRESection
28
 * @see JRESection
29
 * @see ArgumentsSection
29
 * @see ArgumentsSection
30
 * @see ImplicitDependenciesSection
30
 * @see ImplicitDependenciesSection
31
 */
31
 */
32
public class EnvironmentPage extends FormPage {
32
public class EnvironmentPage extends FormPage {
33
33
34
	public static final String PAGE_ID = "environment"; //$NON-NLS-1$
34
	public static final String PAGE_ID = "environment"; //$NON-NLS-1$
35
35
36
	public EnvironmentPage(FormEditor editor) {
36
	public EnvironmentPage(FormEditor editor) {
37
		super(editor, PAGE_ID, PDEUIMessages.EnvironmentPage_title);
37
		super(editor, PAGE_ID, PDEUIMessages.EnvironmentPage_title);
38
	}
38
	}
39
39
40
	/* (non-Javadoc)
40
	/* (non-Javadoc)
41
	 * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
41
	 * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
42
	 */
42
	 */
43
	protected void createFormContent(IManagedForm managedForm) {
43
	protected void createFormContent(IManagedForm managedForm) {
44
		super.createFormContent(managedForm);
44
		super.createFormContent(managedForm);
45
		ScrolledForm form = managedForm.getForm();
45
		ScrolledForm form = managedForm.getForm();
46
		form.setText(PDEUIMessages.EnvironmentPage_title);
46
		form.setText(PDEUIMessages.EnvironmentPage_title);
47
		PDEPlugin.getDefault().getLabelProvider().connect(this);
47
		PDEPlugin.getDefault().getLabelProvider().connect(this);
48
		form.setImage(PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_TARGET_ENVIRONMENT));
48
		form.setImage(PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_TARGET_ENVIRONMENT));
49
		FormToolkit toolkit = managedForm.getToolkit();
49
		FormToolkit toolkit = managedForm.getToolkit();
50
		fillBody(managedForm, toolkit);
50
		fillBody(managedForm, toolkit);
51
		toolkit.decorateFormHeading(form.getForm());
51
		toolkit.decorateFormHeading(form.getForm());
52
		// TODO Fix help URL
52
		((TargetEditor) getEditor()).contributeToToolbar(managedForm.getForm(), ""); //$NON-NLS-1$
53
		((TargetEditor) getEditor()).contributeToToolbar(managedForm.getForm(), ""); //$NON-NLS-1$
53
		((TargetEditor) getEditor()).addForm(managedForm);
54
		((TargetEditor) getEditor()).addForm(managedForm);
54
		form.updateToolBar();
55
		form.updateToolBar();
55
		PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.TARGET_EDITOR_ENVIRONMENT_PAGE);
56
		PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.ENVIRONMENT_PAGE);
56
	}
57
	}
57
58
58
	/* (non-Javadoc)
59
	/* (non-Javadoc)
59
	 * @see org.eclipse.ui.forms.editor.FormPage#dispose()
60
	 * @see org.eclipse.ui.forms.editor.FormPage#dispose()
60
	 */
61
	 */
61
	public void dispose() {
62
	public void dispose() {
62
		PDEPlugin.getDefault().getLabelProvider().disconnect(this);
63
		PDEPlugin.getDefault().getLabelProvider().disconnect(this);
63
		super.dispose();
64
		super.dispose();
64
	}
65
	}
65
66
66
	private void fillBody(IManagedForm managedForm, FormToolkit toolkit) {
67
	private void fillBody(IManagedForm managedForm, FormToolkit toolkit) {
67
		Composite body = managedForm.getForm().getBody();
68
		Composite body = managedForm.getForm().getBody();
68
		body.setLayout(FormLayoutFactory.createFormGridLayout(false, 2));
69
		body.setLayout(FormLayoutFactory.createFormGridLayout(false, 2));
69
70
70
		managedForm.addPart(new EnvironmentSection(this, body));
71
		managedForm.addPart(new EnvironmentSection(this, body));
71
		managedForm.addPart(new JRESection(this, body));
72
		managedForm.addPart(new JRESection(this, body));
72
		managedForm.addPart(new ArgumentsSection(this, body));
73
		managedForm.addPart(new ArgumentsSection(this, body));
73
		managedForm.addPart(new ImplicitDependenciesSection(this, body));
74
		managedForm.addPart(new ImplicitDependenciesSection(this, body));
74
	}
75
	}
75
76
76
	/* (non-Javadoc)
77
	/* (non-Javadoc)
77
	 * @see org.eclipse.ui.forms.editor.FormPage#canLeaveThePage()
78
	 * @see org.eclipse.ui.forms.editor.FormPage#canLeaveThePage()
78
	 */
79
	 */
79
	public boolean canLeaveThePage() {
80
	public boolean canLeaveThePage() {
80
		((TargetEditor) getEditor()).setDirty(isDirty());
81
		((TargetEditor) getEditor()).setDirty(isDirty());
81
		return true;
82
		return true;
82
	}
83
	}
83
84
}
84
	protected String getHelpResource() {
85
		return "/org.eclipse.pde.doc.user/guide/tools/editors/target_editor/environment_page.htm"; //$NON-NLS-1$
86
	}
87
}
(-)src/org/eclipse/pde/internal/ui/editor/targetdefinition/TargetEditor.java (+1 lines)
Lines 309-314 Link Here
309
	 */
309
	 */
310
	public void addForm(IManagedForm managedForm) {
310
	public void addForm(IManagedForm managedForm) {
311
		fManagedFormPages.add(managedForm);
311
		fManagedFormPages.add(managedForm);
312
		PlatformUI.getWorkbench().getHelpSystem().setHelp(managedForm.getForm().getBody(), IHelpContextIds.TARGET_EDITOR);
312
	}
313
	}
313
314
314
	/**
315
	/**
(-)contexts_PDE.xml (-15 / +54 lines)
Lines 459-474 Link Here
459
		<description>This wizard allows you to register a Help table of contents with the project's plugin.xml file.</description>
459
		<description>This wizard allows you to register a Help table of contents with the project's plugin.xml file.</description>
460
  <topic href="guide/tools/editors/toc_editor/editor.htm" label="Table of Contents Editor"/>
460
  <topic href="guide/tools/editors/toc_editor/editor.htm" label="Table of Contents Editor"/>
461
	</context>
461
	</context>
462
 <context id="target_editor" title="Target Definition Editor">
463
    <description>The Target Definition Editor is used to edit target definition files in the workspace, which should end with the extension &quot;.target&quot;. Target definition files can be created using the New Target Definition Wizard or by moving them to the workspace on the Target Platform Preference Page.</description>
464
    <topic href="guide/tools/editors/target_editor/definition_page.htm" label="Target Definition Editor Definition Page"/>
465
    <topic href="guide/tools/editors/target_editor/content_page.htm" label="Target Definition Editor Content Page"/>
466
    <topic href="guide/tools/editors/target_editor/environment_page.htm" label="Target Definition Editor Environment Page"/>
467
    <topic href="guide/tools/editors/target_editor/target_editor.htm" label="Target Definition Editor"/>
468
 </context>
462
<!-- Children of the PDEFormPage -->
469
<!-- Children of the PDEFormPage -->
463
470
464
    <!-- PLACE HOLDER -->
471
    <!-- PLACE HOLDER -->
465
	<context id="environment_page">
472
	<context id="target_editor_environment_page" title="Target Definition Editor Environment Page">
466
		<description>This page allows you to define the target environment</description>
473
		<description>The Enviroment Page in the Target Definition Editor is used to edit many settings in the definition affecting how the target will be compiled and run.</description>
467
	</context>
474
	</context>
468
    <!-- PLACE HOLDER -->
475
    <!-- PLACE HOLDER -->
469
	<context id="target_overview_page">
476
	<context id="target_editor_definition_page" title="Target Definition Editor Definition Page">
470
		<description>This page allows you to speciy a target definition and target content</description>
477
		<description>The Definition Page in the Target Definition Editor is used to edit the most important settings in a target definition file. The Target Name is used to display your targets on the Target Platform Preference Page. The Locations section is used to add locations that contain plug-ins and works the same as the Location Tab on the Edit Target Wizard.</description>
471
	</context>
478
	</context>
479
 <context id="target_editor_content_page" title="Target Definition Editor Content Page">
480
    <description>The Content Page in the Target Definition Editor is used to view and edit the set of plug-ins to be included in the target definition when set as the active target platform. The definition must contain one or more locations containing plug-ins and the definition must be resolved to edit the content. Only the plug-ins that are checked on this page will be included in the target. There are multiple options available to filter and sort the list to quickly check what you require.</description>
481
 </context>
472
482
473
<!-- END:  Editors -->
483
<!-- END:  Editors -->
474
484
Lines 521-526 Link Here
521
   <!-- one to one mapping -->
531
   <!-- one to one mapping -->
522
   <context id="target_platform_preference_page" >
532
   <context id="target_platform_preference_page" >
523
      <description>This page allows you to configure the target platform that will be used to develop and test against.  In cases where a plug-in with the same id exists both in the workspace and in the target platform, the workspace copy will take precedence.</description>
533
      <description>This page allows you to configure the target platform that will be used to develop and test against.  In cases where a plug-in with the same id exists both in the workspace and in the target platform, the workspace copy will take precedence.</description>
534
<!--       
524
      <topic label="Target Platform Preferences" href="guide/tools/preference_pages/target_platform.htm"/>
535
      <topic label="Target Platform Preferences" href="guide/tools/preference_pages/target_platform.htm"/>
525
536
526
      <topic label="Target Plug-ins" href="guide/tools/preference_pages/target_plugins.htm"/>
537
      <topic label="Target Plug-ins" href="guide/tools/preference_pages/target_plugins.htm"/>
Lines 528-565 Link Here
528
      <topic label="Launching Arguments" href="guide/tools/preference_pages/launching_args.htm"/>
539
      <topic label="Launching Arguments" href="guide/tools/preference_pages/launching_args.htm"/>
529
      <topic label="Implicit Dependencies" href="guide/tools/preference_pages/implicit_dependencies.htm"/>
540
      <topic label="Implicit Dependencies" href="guide/tools/preference_pages/implicit_dependencies.htm"/>
530
      <topic label="Source Code Locations" href="guide/tools/preference_pages/source_code_locations.htm"/>
541
      <topic label="Source Code Locations" href="guide/tools/preference_pages/source_code_locations.htm"/>
542
      -->
531
   </context>
543
   </context>
532
544
<!-- 
533
   <!-- TODO:  in future delete?  Fold into target_platform_preference_page to make one to one mapping -->
534
   <context id="target_plugins_preference_page" >
545
   <context id="target_plugins_preference_page" >
535
      <description>This page allows you to set the target platform plug-in content for the plug-ins you develop.</description>
546
      <description>This page allows you to set the target platform plug-in content for the plug-ins you develop.</description>
536
      <topic label="Target Plug-Ins" href="guide/tools/preference_pages/target_plugins.htm"/>
547
      <topic label="Target Plug-Ins" href="guide/tools/preference_pages/target_plugins.htm"/>
537
   </context>
548
   </context>
538
549
539
   <!-- TODO:  in future delete?  Fold into target_platform_preference_page to make one to one mapping -->
540
   <context id="source_preference_page" >
550
   <context id="source_preference_page" >
541
      <description>This page allows you to configure source code locations.  When attaching source archives to Java libraries, PDE first looks in plug-ins.  If not found, the search is extended to source locations.  Source locations can be provided by plug-ins that are used to carry source code (in SDKs). They can also be defined by users. Unchecked source locations will be ignored by PDE.</description>
551
      <description>This page allows you to configure source code locations.  When attaching source archives to Java libraries, PDE first looks in plug-ins.  If not found, the search is extended to source locations.  Source locations can be provided by plug-ins that are used to carry source code (in SDKs). They can also be defined by users. Unchecked source locations will be ignored by PDE.</description>
542
      <topic label="Source Code Locations" href="guide/tools/preference_pages/source_code_locations.htm"/>
552
      <topic label="Source Code Locations" href="guide/tools/preference_pages/source_code_locations.htm"/>
543
   </context>
553
   </context>
544
554
545
	<!-- TODO:  in future delete?  Fold into target_platform_preference_page to make one to one mapping -->
546
   <context id="launching_args_preference_page" >
555
   <context id="launching_args_preference_page" >
547
      <description>This page allows you to specify program and VM arguments that you wish to test your plug-ins with.</description>
556
      <description>This page allows you to specify program and VM arguments that you wish to test your plug-ins with.</description>
548
      <topic label="Launching Arguments" href="guide/tools/preference_pages/launching_args.htm"/>
557
      <topic label="Launching Arguments" href="guide/tools/preference_pages/launching_args.htm"/>
549
   </context>
558
   </context>
550
   
559
551
   <!-- TODO:  in future delete?  Fold into target_platform_preference_page to make one to one mapping -->
552
   <context id="implicit_plugins_preference_page" >
560
   <context id="implicit_plugins_preference_page" >
553
      <description>This page allows you to specify existing plug-ins that are required to run your plug-ins.</description>
561
      <description>This page allows you to specify existing plug-ins that are required to run your plug-ins.</description>
554
      <topic label="Implicit Dependencies" href="guide/tools/preference_pages/implicit_dependencies.htm"/>
562
      <topic label="Implicit Dependencies" href="guide/tools/preference_pages/implicit_dependencies.htm"/>
555
   </context>
563
   </context>
556
564
   
557
   <context id="implicit_plugins_selection_dialog" >
565
   <context id="implicit_plugins_selection_dialog" >
558
      <description>This dialog allows you to select one or more plug-ins to add as implicit dependencies of your plug-ins.</description>
566
      <description>This dialog allows you to select one or more plug-ins to add as implicit dependencies of your plug-ins.</description>
559
      <topic label="Implicit Dependencies" href="guide/tools/preference_pages/implicit_dependencies.htm"/>
567
      <topic label="Implicit Dependencies" href="guide/tools/preference_pages/implicit_dependencies.htm"/>
560
   </context>
568
   </context>
561
569
562
   <!-- TODO:  in future delete?  Fold into target_platform_preference_page to make one to one mapping -->
563
   <context id="target_environment_preference_page" >
570
   <context id="target_environment_preference_page" >
564
      <description>This page allows you to set the target environment for the plug-ins you develop.</description>
571
      <description>This page allows you to set the target environment for the plug-ins you develop.</description>
565
      <topic label="Target Environment" href="guide/tools/preference_pages/target_env.htm"/>
572
      <topic label="Target Environment" href="guide/tools/preference_pages/target_env.htm"/>
Lines 570-576 Link Here
570
      <topic label="Target Environment" href="guide/tools/preference_pages/target_env.htm"/>
577
      <topic label="Target Environment" href="guide/tools/preference_pages/target_env.htm"/>
571
   </context>
578
   </context>
572
   
579
   
573
     
580
-->     
574
<!-- END:  Preference pages -->
581
<!-- END:  Preference pages -->
575
582
576
583
Lines 743-749 Link Here
743
	<!-- New Target Definition -->
750
	<!-- New Target Definition -->
744
	
751
	
745
	<context id="target_definition_page">
752
	<context id="target_definition_page">
746
		<description>This page allows you to create a new target definition.</description>
753
		<description>This page allows you to create a new target definition. A target definition specifies all aspects of a target - including its location, constituent plug-ins and environment.</description>
747
		<topic label="Target Definition" 
754
		<topic label="Target Definition" 
748
			   href="guide/tools/file_wizards/new_target_definition.htm"/>
755
			   href="guide/tools/file_wizards/new_target_definition.htm"/>
749
	</context>
756
	</context>
Lines 966-972 Link Here
966
   <context id="target_platform_state" title="Target Platform State View">
973
   <context id="target_platform_state" title="Target Platform State View">
967
      <description>The Target Platform State view shows the current status of the resolver state in PDE.</description>
974
      <description>The Target Platform State view shows the current status of the resolver state in PDE.</description>
968
      <topic href="guide/tools/views/target_platform_state.htm" label="Target Platform State View"/>
975
      <topic href="guide/tools/views/target_platform_state.htm" label="Target Platform State View"/>
969
   </context>		
976
   </context>
977
   <context id="new_target_wizard" title="New Target Wizard">
978
      <description>This wizard creates a new target definition that will be added to the Target Platform Preference Page. There are several options to initialize your target definition with data. The new target definition will be saved in the Eclipse preferences, to create a target definition in your workspace use the New Target Definition File Wizard.</description>
979
      <topic href="guide/tools/target_shared/new_target_wizard.htm" label="New Target Wizard"/>
980
   </context>
981
   <context id="edit_target_wizard" title="Target Definition Wizard">
982
      <description>This wizard is used to edit target definitions. It is opened when a target definition on the Target Platform Preference Page is edited or a new definition is created. This wizard provides the same functionality as the Target Editor.</description>
983
      <topic href="guide/tools/target_shared/edit_target_wizard.htm" label="Edit Target Wizard"/>
984
      <topic href="guide/tools/target_shared/edit_target_arguments_tab.htm" label="Argument Tab"/>
985
      <topic href="guide/tools/target_shared/edit_target_content_tab.htm" label="Content Tab"/>
986
      <topic href="guide/tools/target_shared/edit_target_environment_tab.htm" label="Environment Tab"/>
987
      <topic href="guide/tools/target_shared/edit_target_implicit_tab.htm" label="Implicit Dependencies Tab"/>
988
      <topic href="guide/tools/target_shared/edit_target_locations_tab.htm" label="Locations Tab"/>
989
   </context>
990
   <context id="edit_target_wizard_locations_tab" title="Target Definition Wizard Locations Tab">
991
      <description>The Location Tab in the Edit Target Wizard is used to set the locations that provide the plug-ins included in the target definition. There are several types of locations, allowing for definitions to be constructed in different styles.</description>
992
   </context>
993
   <context id="edit_target_wizard_argument_tab" title="Target Definition Wizard Arguments Tab">
994
      <description>The Arguments Tab in the Edit Target Wizard is used to set the default program and vm arguments for new PDE launch configurations.</description>
995
   </context>
996
   <context id="edit_target_wizard_content_tab" title="Target Definition Wizard Content Tab">
997
      <description>The Content Tab in the Edit Target Wizard is used to set a subset of plug-ins to include in the target platform. The tab displays a list of all plug-ins available in the target definition&apos;s locations. Only the plug-ins checked on this tab will be included. There are multiple ways to organize and filter the list.</description>
998
   </context>
999
   <context id="edit_target_wizard_environment_tab" title="Target Definition Wizard Environment Tab">
1000
      <description>The Environment Tab in the Edit Target Wizard is used to set environment settings that affect how a target is compiled and run. The environment settings can also be edited on the Environment Page of the Target Editor.</description>
1001
   </context>
1002
   <context id="edit_target_wizard_implicit_tab" title="Target Definition Wizard Implicit Dependencies Tab">
1003
      <description>The Implicit Tab in the Edit Target Wizard is used to set the implicit dependencies of the target. Any plug-in marked as an implicit dependency will always be added as a required plug-in when PDE determines requirements. Implicit dependencies can also be edited on the Environment Page of the Target Editor.</description>
1004
   </context>
1005
   <context id="move_target_wizard" title="Move Target Wizard">
1006
      <description>This wizard moves a target definition stored in the Eclipse preferences to a file in the workspace. This wizard is accessed by pressing Move on the Target Platform Preference Page. You must choose a project or directory to create the file in and a filename. Target definition files must end in the file extension &quot;.target&quot;.</description>
1007
      <topic href="guide/tools/target_shared/move_target_wizard.htm" label="Move Target Definition"/>
1008
   </context>
970
1009
971
</contexts>
1010
</contexts>
972
1011

Return to bug 277506