Bug 296789 - [UI] Add icons to "Add JavaScript Library" wizard
Summary: [UI] Add icons to "Add JavaScript Library" wizard
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: Future   Edit
Assignee: Project Inbox CLA
QA Contact: Chris Jaun CLA
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2009-12-03 06:08 EST by Jacek Pospychala CLA
Modified: 2014-01-30 04:33 EST (History)
2 users (show)

See Also:


Attachments
dialog with icons (14.01 KB, image/png)
2009-12-03 06:10 EST, Jacek Pospychala CLA
no flags Details
patch (4.95 KB, patch)
2009-12-03 06:12 EST, Jacek Pospychala CLA
no flags Details | Diff
patch for firefox and ie (12.50 KB, patch)
2009-12-03 06:15 EST, Jacek Pospychala CLA
no flags Details | Diff
patch v2 (6.11 KB, patch)
2009-12-03 06:50 EST, Jacek Pospychala CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jacek Pospychala CLA 2009-12-03 06:08:30 EST
The wizard for adding JavaScript libraries to a project could make use of icons for better readability.
Comment 1 Jacek Pospychala CLA 2009-12-03 06:10:07 EST
Created attachment 153710 [details]
dialog with icons
Comment 2 Jacek Pospychala CLA 2009-12-03 06:12:19 EST
Created attachment 153711 [details]
patch

patch changes wizard implementation to use Table instead of List. Icons are provided via standard Eclipse Adapter API
Comment 3 Jacek Pospychala CLA 2009-12-03 06:15:58 EST
Created attachment 153712 [details]
patch for firefox and ie

patch for o.e.wst.jsdt.support.firefox and o.e.wst.jsdt.support.ie to implement adapter factories necessary to provide images.
I took liberty to reorganize icons a bit in those plugins, I created bundle activators which now manage icons and updated other code to also use them.
Icons would have to be manually moved from source code to toplevel icons folder in each plug-in, as patch doesn't handle binary changes.
Comment 4 Jacek Pospychala CLA 2009-12-03 06:50:26 EST
Created attachment 153714 [details]
patch v2

I missed part of changes in earlier patch, that I'm going to mark as obsolete now.
Comment 5 Nitin Dahyabhai CLA 2010-02-26 20:12:52 EST
Jacke,
Is there some reason that both WizardAdapterFactory classes use the same package, org.eclipse.wst.jsdt.internal.ui.wizards.buildpaths, but one uses the bundles' ImageRegistry and the other doesn't (potentially leaking the Images it creates)?
Comment 6 Jacek Pospychala CLA 2010-03-01 04:56:16 EST
good catch, IE WizardAdapterFactory should be indeed:

return Activator.getDefault().getImageRegistry().get(Activator.IE_SMALL);

instead of 
return AbstractUIPlugin.imageDescriptorFromPlugin(Activator.PLUGIN_ID, Activator.IE_SMALL).createImage();
Comment 7 Nitin Dahyabhai CLA 2011-04-25 21:00:41 EDT
Looks like most things work well, once the icons are moved, but BaseLibraryWizardPage (for one) throws a NPE if you finish the wizard as you now can without showing the page.  The controls aren't created as expected before finish() is called, plus I'd rather complete this by making sure un-adapted pages at least show the default library image.  Attachment 153710 [details] is an improvement over the current unadorned list, but it look pretty odd to only show images for 2 of the 4 built-in add-on containers.
Comment 8 Nitin Dahyabhai CLA 2012-01-02 13:16:18 EST
Looking at this a little more closely, I'm not sure we're legally allowed to ship/show those images without a CQ, and we don't have images, either.  Jacek, were you going to provide them?
Comment 9 Jacek Pospychala CLA 2012-03-08 15:26:22 EST
sorry for not responding earlier, I was pretty sure that this icons already exist in JSDT, but couldn't find them...

...until today!
/org.eclipse.wst.jsdt.support.firefox/src/org/eclipse/wst/jsdt/core/compiler/libraries/FireFoxSmall.gif
/org.eclipse.wst.jsdt.support.ie/src/org/eclipse/wst/jsdt/core/compiler/libraries/ie_small.gif

I can't say for sure now, but maybe my patches require moving the files from Java packages to their own separate dirs. It seems that they are used already in existing JSDT code.
Comment 10 Mickael Istria CLA 2014-01-30 04:33:31 EST
@Jacek: could you please provide this patch via Gerrit? https://wiki.eclipse.org/JSDT/Development#Gerrit_Reviews