Bug 183779 - New Plug-In Project wizard should use new working set controls
Summary: New Plug-In Project wizard should use new working set controls
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M2   Edit
Assignee: Remy Suen CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, contributed
: 201594 201607 (view as bug list)
Depends on: 199904
Blocks:
  Show dependency tree
 
Reported: 2007-04-24 09:12 EDT by Benno Baumgartner CLA
Modified: 2007-08-30 12:00 EDT (History)
3 users (show)

See Also:


Attachments
proposed fix (12.69 KB, patch)
2007-04-24 09:19 EDT, Benno Baumgartner CLA
no flags Details | Diff
proposed fix (12.78 KB, patch)
2007-04-26 12:22 EDT, Benno Baumgartner CLA
no flags Details | Diff
Patch to use the new working set API for both plug-in and fragment projects. (6.80 KB, patch)
2007-08-29 17:11 EDT, Remy Suen CLA
no flags Details | Diff
New patch with $NON-NLS-N$ tags. (6.84 KB, patch)
2007-08-29 17:14 EDT, Remy Suen CLA
no flags Details | Diff
mylyn/context/zip (1.54 KB, application/octet-stream)
2007-08-29 23:35 EDT, Chris Aniszczyk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benno Baumgartner CLA 2007-04-24 09:12:16 EDT
I20070424-0800

In the upcoming integration built (I20070424-0800) JDT/UI will provide a working set selection group on the new java project wizard. The group allows to select a set of working sets which will contain the new project. The selection is initialized from a given context (the package explorer selection).

See bug 15941, bug 97200 and bug 150009

PDE may be interested in providing the same functionality on there new plugin project/fragment dialogs. I will attach a patch...
Comment 1 Benno Baumgartner CLA 2007-04-24 09:19:17 EDT
Created attachment 64730 [details]
proposed fix

This patch adds a working set group to the new plugin project and new fragment wizards.

This patch has (at least;-) two issues:
1. WorkingSetConfigurationBlock and SimpleWorkingSetSelectionDialog are internal. We want to push this code down to platform in 3.4. You may want to copy the code for now.
2. NewProjectCreationOperation now takes a set of working sets. Cleaner would be to pass this info in through IFieldData, but IFieldData is API...
Comment 2 Wassim Melhem CLA 2007-04-26 12:11:18 EDT
Thanks for the patch, but I just tried it for the first time and got an NPE out of the box.

In any event, this function strikes me as nice-to-have and not urgent enough to address at this late stage.

Plus, we also have New Feature/Site/Plug-in from existing archives wizards.
We don't have the time in 3.3 to address all that.
Comment 3 Martin Aeschlimann CLA 2007-04-26 12:15:11 EDT
Note that this is part of our polish item. So it would be OK to release.
Do you have the stack trace?
Comment 4 Benno Baumgartner CLA 2007-04-26 12:22:59 EDT
Created attachment 65062 [details]
proposed fix

Sorry, NPE if no working set was selected... Fixed with this patch.
Comment 5 Wassim Melhem CLA 2007-04-26 12:26:50 EDT
Martin, it may be part of the JDT polish list, but it's not part of the PDE polish list and I have only become aware of it today.

So as much as I appreciate the patch and effort that was put into it, the NPE was tough to swallow and the "This patch has (at least;-) two issues:" reference in comment 1 is not the endorsement I had hoped to hear for a patch released at this stage.

eclipse.buildId=I20070424-0930
java.version=1.5.0_03
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.sdk.ide -pdelaunch
Command-line arguments:  -product org.eclipse.sdk.ide -data D:\Temp\workspace-180112 -dev file:D:/Eclipse/UpdatedSource/plugins/.metadata/.plugins/org.eclipse.pde.core/New_configuration (2)/dev.properties -pdelaunch -os win32 -ws win32 -arch x86

Error
Thu Apr 26 12:23:00 EDT 2007
Unhandled event loop exception

java.lang.NullPointerException
	at org.eclipse.jdt.internal.ui.workingsets.WorkingSetConfigurationBlock.filter(WorkingSetConfigurationBlock.java:118)
	at org.eclipse.pde.internal.ui.wizards.plugin.NewProjectCreationPage.createWorkingSetGroup(NewProjectCreationPage.java:178)
	at org.eclipse.pde.internal.ui.wizards.plugin.NewProjectCreationPage.createControl(NewProjectCreationPage.java:84)
	at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:170)
	at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:669)
	at org.eclipse.jface.wizard.WizardDialog.setWizard(WizardDialog.java:1083)
	at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1142)
	at org.eclipse.jface.wizard.WizardDialog.access$2(WizardDialog.java:1139)
	at org.eclipse.jface.wizard.WizardDialog$4.run(WizardDialog.java:1128)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1126)
	at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:820)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:369)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3673)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
	at org.eclipse.jface.window.Window.open(Window.java:796)
	at org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction.java:116)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3673)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2365)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2329)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2204)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:101)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:359)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:174)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:480)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:419)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1145)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1120)

Comment 6 Wassim Melhem CLA 2007-04-30 14:01:05 EDT
The new patch works fine.  Thanks.

Unfortunately, it no longer applies cleanly against the latest from HEAD, and I am too busy at the moment to resolve the conflicts.
Comment 7 Chris Aniszczyk CLA 2007-05-07 23:57:52 EDT
I looked at this a bit tonight, there's a lot of dependencies on internal JDT classes here, plus, this is something that I think should be provided by the Platform in new project creation wizards. Is there a bug open against the platform to provide this type of functionality? 
Comment 8 Benno Baumgartner CLA 2007-05-08 04:23:56 EDT
(In reply to comment #7)
> I looked at this a bit tonight, there's a lot of dependencies on internal JDT
> classes here, plus, this is something that I think should be provided by the
> Platform in new project creation wizards. Is there a bug open against the
> platform to provide this type of functionality? 

"1. WorkingSetConfigurationBlock and SimpleWorkingSetSelectionDialog are
internal. We want to push this code down to platform in 3.4. You may want to
copy the code for now."

Do you see any other dependencies (besides WorkingSetMessages)?

See platform bug 15941
Comment 9 Martin Aeschlimann CLA 2007-08-14 12:35:49 EDT
Bug 199904 is about moving WorkingSetConfigurationBlock down to platform UI
Comment 10 Chris Aniszczyk CLA 2007-08-29 11:03:34 EDT
This should be easy now!
Comment 11 Chris Aniszczyk CLA 2007-08-29 12:57:03 EDT
*** Bug 201594 has been marked as a duplicate of this bug. ***
Comment 12 Chris Aniszczyk CLA 2007-08-29 12:57:28 EDT
changing topic just to focus on new plug-in project wizard. tagging bugday.

see bug 199904 for the new working set control.
Comment 13 Remy Suen CLA 2007-08-29 17:11:41 EDT
Created attachment 77302 [details]
Patch to use the new working set API for both plug-in and fragment projects.

The fragment projects refer to the same page used for plug-in projects, so this patch actually adds the new API for _both_ wizards.
Comment 14 Remy Suen CLA 2007-08-29 17:14:29 EDT
Created attachment 77303 [details]
New patch with $NON-NLS-N$ tags.

Whoops, forgot about those.
Comment 15 Chris Aniszczyk CLA 2007-08-29 23:35:38 EDT
done. Thanks!
Comment 16 Chris Aniszczyk CLA 2007-08-29 23:35:41 EDT
Created attachment 77333 [details]
mylyn/context/zip
Comment 17 Chris Aniszczyk CLA 2007-08-30 12:00:44 EDT
*** Bug 201607 has been marked as a duplicate of this bug. ***