View | Details | Raw Unified | Return to bug 201608
Collapse All | Expand All

(-)src/org/eclipse/pde/internal/ui/wizards/plugin/NewLibraryPluginCreationPage.java (-1 / +9 lines)
Lines 12-17 Link Here
12
12
13
import org.eclipse.core.runtime.IStatus;
13
import org.eclipse.core.runtime.IStatus;
14
import org.eclipse.jface.dialogs.Dialog;
14
import org.eclipse.jface.dialogs.Dialog;
15
import org.eclipse.jface.viewers.IStructuredSelection;
15
import org.eclipse.jface.wizard.IWizardPage;
16
import org.eclipse.jface.wizard.IWizardPage;
16
import org.eclipse.pde.internal.core.ICoreConstants;
17
import org.eclipse.pde.internal.core.ICoreConstants;
17
import org.eclipse.pde.internal.core.TargetPlatformHelper;
18
import org.eclipse.pde.internal.core.TargetPlatformHelper;
Lines 73-80 Link Here
73
	private Combo fTargetCombo;
74
	private Combo fTargetCombo;
74
	protected Button fJarredCheck;
75
	protected Button fJarredCheck;
75
	protected Button fFindDependencies;
76
	protected Button fFindDependencies;
77
	private IStructuredSelection fSelection;
76
78
77
	public NewLibraryPluginCreationPage(String pageName, LibraryPluginFieldData data) {
79
	public NewLibraryPluginCreationPage(String pageName, LibraryPluginFieldData data, IStructuredSelection fSelection) {
78
		super(pageName);
80
		super(pageName);
79
		fData = data;
81
		fData = data;
80
		setTitle(PDEUIMessages.NewLibraryPluginCreationPage_title); 
82
		setTitle(PDEUIMessages.NewLibraryPluginCreationPage_title); 
Lines 92-97 Link Here
92
94
93
		createFormatGroup(control);
95
		createFormatGroup(control);
94
		
96
		
97
		createWorkingSetGroup(control, fSelection, new String[] {
98
						"org.eclipse.jdt.ui.JavaWorkingSetPage", //$NON-NLS-1$
99
						"org.eclipse.pde.ui.pluginWorkingSet", //$NON-NLS-1$
100
						"org.eclipse.ui.resourceWorkingSetPage" }); //$NON-NLS-1$
101
		
95
		updateRuntimeDependency();
102
		updateRuntimeDependency();
96
103
97
		Dialog.applyDialogFont(control);
104
		Dialog.applyDialogFont(control);
Lines 215-220 Link Here
215
		fData.setUnzipLibraries(fJarredCheck.isEnabled()
222
		fData.setUnzipLibraries(fJarredCheck.isEnabled()
216
				&& fJarredCheck.getSelection());
223
				&& fJarredCheck.getSelection());
217
		fData.setFindDependencies(fFindDependencies.getSelection());
224
		fData.setFindDependencies(fFindDependencies.getSelection());
225
		fData.setWorkingSets(getSelectedWorkingSets());
218
		
226
		
219
		PluginFieldData data = fData;
227
		PluginFieldData data = fData;
220
		data.setClassname(null);
228
		data.setClassname(null);
(-)src/org/eclipse/pde/internal/ui/wizards/plugin/NewLibraryPluginProjectWizard.java (-2 / +6 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2006 IBM Corporation and others.
2
 * Copyright (c) 2000, 2007 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
Lines 24-29 Link Here
24
import org.eclipse.pde.internal.ui.wizards.NewWizard;
24
import org.eclipse.pde.internal.ui.wizards.NewWizard;
25
import org.eclipse.pde.internal.ui.wizards.WizardElement;
25
import org.eclipse.pde.internal.ui.wizards.WizardElement;
26
import org.eclipse.swt.graphics.Image;
26
import org.eclipse.swt.graphics.Image;
27
import org.eclipse.ui.IWorkingSet;
27
import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard;
28
import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard;
28
29
29
public class NewLibraryPluginProjectWizard extends NewWizard implements
30
public class NewLibraryPluginProjectWizard extends NewWizard implements
Lines 63-69 Link Here
63
	public void addPages() {
64
	public void addPages() {
64
		fJarsPage = new LibraryPluginJarsPage("jars", fPluginData); //$NON-NLS-1$ 
65
		fJarsPage = new LibraryPluginJarsPage("jars", fPluginData); //$NON-NLS-1$ 
65
		addPage(fJarsPage);
66
		addPage(fJarsPage);
66
		fMainPage = new NewLibraryPluginCreationPage("main", fPluginData); //$NON-NLS-1$
67
		fMainPage = new NewLibraryPluginCreationPage("main", fPluginData, getSelection()); //$NON-NLS-1$
67
		String pname = getDefaultValue(DEF_PROJECT_NAME);
68
		String pname = getDefaultValue(DEF_PROJECT_NAME);
68
		if (pname != null)
69
		if (pname != null)
69
			fMainPage.setInitialProjectName(pname);
70
			fMainPage.setInitialProjectName(pname);
Lines 127-132 Link Here
127
					true,
128
					true,
128
					new NewLibraryPluginCreationOperation(fPluginData,
129
					new NewLibraryPluginCreationOperation(fPluginData,
129
							fProjectProvider, null));
130
							fProjectProvider, null));
131
			IWorkingSet[] workingSets = fMainPage.getSelectedWorkingSets();
132
			getWorkbench().getWorkingSetManager().addToWorkingSets(fProjectProvider.getProject(),
133
					workingSets);
130
			return true;
134
			return true;
131
		} catch (InvocationTargetException e) {
135
		} catch (InvocationTargetException e) {
132
			PDEPlugin.logException(e);
136
			PDEPlugin.logException(e);

Return to bug 201608