Bug 269417 - New Project Wizard for Plug-In: Remember values entered into Plug-In Provider
Summary: New Project Wizard for Plug-In: Remember values entered into Plug-In Provider
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.8 M1   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, contributed, noteworthy
Depends on:
Blocks: 353358
  Show dependency tree
 
Reported: 2009-03-19 13:31 EDT by Philipp Kursawe CLA
Modified: 2011-08-03 08:20 EDT (History)
5 users (show)

See Also:


Attachments
Initial patch (18.79 KB, patch)
2009-03-20 06:38 EDT, Philipp Kursawe CLA
no flags Details | Diff
mylyn/context/zip (3.43 KB, application/octet-stream)
2009-03-20 06:38 EDT, Philipp Kursawe CLA
no flags Details
added DialogSettings to NewFragmentProjectWizard (19.15 KB, patch)
2009-03-20 11:47 EDT, Philipp Kursawe CLA
no flags Details | Diff
mylyn/context/zip (1.22 KB, application/octet-stream)
2009-03-20 11:48 EDT, Philipp Kursawe CLA
no flags Details
Updated patch (118.68 KB, patch)
2011-05-26 04:50 EDT, Philipp Kursawe CLA
curtis.windatt.public: iplog+
Details | Diff
Cleaned up fix (20.96 KB, patch)
2011-07-13 15:11 EDT, Curtis Windatt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Kursawe CLA 2009-03-19 13:31:22 EDT
When creating multiple Plug-In Projects that need the same Plug-In Provider value it would be helpful if PDE would provide a combo box instead an edit field, that contains previously entered Plug-In Providers as a kind of history. It should select the most recent choosen one from the history list as default value.
Comment 1 Chris Aniszczyk CLA 2009-03-19 16:31:09 EDT
cool, this sounds fair enough.

How about a contribution and patch ;)?
Comment 2 Philipp Kursawe CLA 2009-03-19 18:11:09 EDT
Sure Chris, always happy to contribute. Can you give me a hint where I could save the history too? Which PreferenceStore are we using in PDE?
Comment 3 Chris Aniszczyk CLA 2009-03-19 18:13:38 EDT
I believe we're already using dialog settings... can't you hitch a ride on those ;)?

org.eclipse.pde.internal.ui.wizards.plugin.PluginContentPage.saveSettings(IDialogSettings)

While you're at it, maybe you can fix the wizard so we don't say "Plug-in ID:" and just "ID:"

:)
Comment 4 Philipp Kursawe CLA 2009-03-19 18:24:20 EDT
Sure that should be possible to change the label to "ID:" :) I will use the DialogSettings then. Sounds good.

Maybe we could further enhance the dialog in a way that it would create the bundle localization automatically if you enter the plugin-name and provider with a beginning "%" notation. Like "%bundle.provider=company" And it would parse this and create the bundle localization at OSGI-INF/l10n/bundle.properties inserting the bundle.provider=company.
If you enter "%bundle.provider" and ommit the value it will be a validation failure. But you could also always enter "company" only. But maybe thats another enhancement alltogether.
Comment 5 Benjamin Cabé CLA 2009-03-19 18:40:07 EDT
(In reply to comment #4)
> Maybe we could further enhance the dialog in a way that it would create the
> bundle localization automatically if you enter the plugin-name and provider
> with a beginning "%" notation. Like "%bundle.provider=company" And it would
> parse this and create the bundle localization at
> OSGI-INF/l10n/bundle.properties inserting the bundle.provider=company.
> If you enter "%bundle.provider" and ommit the value it will be a validation
> failure. But you could also always enter "company" only. But maybe thats
> another enhancement alltogether.
> 


I think we already have a bug very similar, let me find it...
Comment 6 Benjamin Cabé CLA 2009-03-19 18:49:11 EDT
(In reply to comment #5)
> I think we already have a bug very similar, let me find it...
bug 222155 :)

That's kind of funny since this patch is about exactly one year old since I remember very well working on it a few days before I took off to EclipseCon :p

I think bug 222155 is exactly what you're asking in comment 3. Note that in the current implementation you'll find there, there is no way to indicate the keys you want to use when in the wizard (I mean: the vendor will always be stored under the bundle.vendor key of you l10n file,), thus no need to parse strings in the wizard. And that's much simpler for the end-user IMHO.

Comment 7 Philipp Kursawe CLA 2009-03-19 19:17:34 EDT
ok Benjamin I will take a look and maybe merge the two patches together.
Comment 8 Philipp Kursawe CLA 2009-03-20 03:34:34 EDT
Chris where is the PDE UI project located now in CVS? I can not find it a org.eclipse.pde.ui. The readme.txt says it has moved. But at the location specified there is no source code.
Comment 9 Philipp Kursawe CLA 2009-03-20 03:44:53 EDT
Nevermind, found it in /pde/ui/... In the HEAD there where 2 "pde" called folders with different symbols. So I can start working now.
Comment 10 Philipp Kursawe CLA 2009-03-20 06:38:12 EDT
Created attachment 129437 [details]
Initial patch

Adds history combo boxes to NewPluginProjectWizard,NewFragmentProjectWizard,NewFeatureProjectWizard and NewFeaturePatchProjectWizard
Comment 11 Philipp Kursawe CLA 2009-03-20 06:38:18 EDT
Created attachment 129438 [details]
mylyn/context/zip
Comment 12 Philipp Kursawe CLA 2009-03-20 10:56:46 EDT
It seems like the NewPluginProjectWizard was not saving the dialog settings of the main page so far. I have changed that.
During the FragementPage construction the Wizard does not have any DialogSettings available, so I can not load the history.
It works in FeaturePatch and Feature wizards though.
Comment 13 Benjamin Cabé CLA 2009-03-20 11:19:20 EDT
(In reply to comment #12)
> It seems like the NewPluginProjectWizard was not saving the dialog settings of
> the main page so far. I have changed that.
> During the FragementPage construction the Wizard does not have any
> DialogSettings available, so I can not load the history.
> It works in FeaturePatch and Feature wizards though.
> 

Did you have a look at what I did for bug 222155. In particular I can see that kind of piece of code in the patch:


public NewFragmentProjectWizard() {
  setDefaultPageImageDescriptor(PDEPluginImages.DESC_NEWFRAGPRJ_WIZ);
+ setDialogSettings(PDEPlugin.getDefault().getDialogSettings());

and I think it is missing in your patch! :)
Comment 14 Philipp Kursawe CLA 2009-03-20 11:37:45 EDT
To be honest I have not checked the other bug. I will do that on Monday. Are there any other things you would recommend to include in this patch?
Comment 15 Philipp Kursawe CLA 2009-03-20 11:47:56 EDT
Created attachment 129469 [details]
added DialogSettings to NewFragmentProjectWizard

as recommended by Benjamin
Comment 16 Philipp Kursawe CLA 2009-03-20 11:48:05 EDT
Created attachment 129470 [details]
mylyn/context/zip
Comment 17 Philipp Kursawe CLA 2009-07-08 15:56:38 EDT
will this make it into 3.6?
Comment 18 Curtis Windatt CLA 2009-07-08 16:06:15 EDT
We should at least review the patch for M1.
Comment 19 Chris Aniszczyk CLA 2009-07-28 23:21:09 EDT
Curtis, have time to look at this one? M1 is soon ;o
Comment 20 Curtis Windatt CLA 2009-07-29 16:31:48 EDT
A couple things:

1) The combo doesn't save a blank entry, so if you no longer want a provider, the wizard always reset to the last entry.  The combo should have an empty entry that can be chosen.

2) Are we sure we want to have the last entry automatically chosen?  How many users are always going to want the same provider?  I'm all for having a combo to quickly choose previous options, but my feeling is that it would be safer to leave the text blank.
Comment 21 Philipp Kursawe CLA 2009-07-30 05:13:59 EDT
It has been a while since I coded the patch. As far as I remember, the Combo allows you to enter text, so there is no need for an empty entry. Just don't select anything, or if you did just delete the text in the combo.
As for your second point: This enhancement was born because I create like 20 bundles for my company and do not want to enter the provider again and again. Thats why I also decided to re-select the last selected provider entry when the wizard is opened again. It saves clicks. Maybe we could add a checkbox "Set as default provider" which causes the selected provider to be selected as default.
Comment 22 Curtis Windatt CLA 2009-07-30 10:17:19 EDT
(In reply to comment #21)
> It has been a while since I coded the patch. As far as I remember, the Combo
> allows you to enter text, so there is no need for an empty entry. Just don't
> select anything, or if you did just delete the text in the combo.
> As for your second point: This enhancement was born because I create like 20
> bundles for my company and do not want to enter the provider again and again.
> Thats why I also decided to re-select the last selected provider entry when the
> wizard is opened again. It saves clicks. Maybe we could add a checkbox "Set as
> default provider" which causes the selected provider to be selected as default.
> 


The combo allows you to enter text, but if I delete the text, the value isn't saved.  So if I don't want a provider, I'll have to delete the text every time.

Adding checkbox will clutter up the wizard.  I know that you are creating a large number of projects with the same provider.  What I want to know is if other people are regularly changing providers, or set the value as a one off thing.

Chris, you had originally suggested that this request was reasonable.  Any ideas on how a majority of users interact with the field?
Comment 23 Curtis Windatt CLA 2009-08-04 15:02:26 EDT
Not going in for M1.
Comment 24 Curtis Windatt CLA 2010-01-28 15:00:10 EST
Removing milestone.  The current solution is not polished enough.
Comment 25 Chris Senior CLA 2011-05-25 11:07:50 EDT
Will this bug every be resurrected? Typing in the long names of some of the companies I work for is a bind. I had thought could the provider come from a global default (something standard I can give to other developers in the team in a settings file).
Comment 26 Curtis Windatt CLA 2011-05-25 11:15:17 EDT
(In reply to comment #25)
> Will this bug every be resurrected? Typing in the long names of some of the
> companies I work for is a bind. I had thought could the provider come from a
> global default (something standard I can give to other developers in the team
> in a settings file).

This bug needs an updated patch for it to be fixed.
Comment 27 Philipp Kursawe CLA 2011-05-26 04:50:31 EDT
Created attachment 196643 [details]
Updated patch

Removed default selection of provider from combo
Comment 28 Curtis Windatt CLA 2011-07-13 15:11:00 EDT
Created attachment 199614 [details]
Cleaned up fix

Attachment #196643 [details] had a lot of unrelated changes in it.  I went through the patch, taking the actual changes then cleaned up the comments, copyrights and naming.  This patch contains the result that will be applied to 3.8.
Comment 29 Curtis Windatt CLA 2011-07-13 15:12:17 EDT
Applied the cleaned up fix to HEAD.
Comment 30 Michael Rennie CLA 2011-07-28 10:04:58 EDT
The drop down history is nice to have but I did notice that the actual OSGi header that gets filled in with the provider info is 'Bundle-Vendor'. Perhaps the UI should use the word 'Vendor' rather than 'Provider'?
Comment 31 Curtis Windatt CLA 2011-07-28 14:56:14 EDT
(In reply to comment #30)
> The drop down history is nice to have but I did notice that the actual OSGi
> header that gets filled in with the provider info is 'Bundle-Vendor'. Perhaps
> the UI should use the word 'Vendor' rather than 'Provider'?

Fixed in HEAD.  We now call it Vendor everywhere.  We'll have to update the doc in 3.8, created byg 353358 for it.  This change makes a lot of sense for plug-ins.  However, in feature.xml it gets a little weird because the file uses provider instead of vendor.  I don't want to change the syntax of the xml, but I changed the UI.

Only changes were in pderesources.properties from pde ui.
Comment 32 Ankur Sharma CLA 2011-08-03 08:20:44 EDT
Verified with I20110802-2000