Bug 93372 - [Program] Support for obtaining program icons
Summary: [Program] Support for obtaining program icons
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Billy Biggs CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks: 90601
  Show dependency tree
 
Reported: 2005-05-01 14:40 EDT by Tim deBoer CLA
Modified: 2019-09-04 03:03 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim deBoer CLA 2005-05-01 14:40:45 EDT
The current SWT Program class allows you to find the program that supports a
given file extension, and execute it or get the icon for that program. However,
it does not allow you to access any of the "secondary" programs on the machine -
for instance, you can get the current program associated with "html", but you
can't access any of the other Web browsers installed on the system.

I already have code that will find all of the installed Web browsers on a
machine, but I can't get their icons. This request is to add support that would
allow me to get the icon for an arbitrary program. This could be done via a new
mechanism, by extending the Program class to support all known programs on the
machine, or by allowing me to create a Program instance using other information
(e.g. the executable name or location).
Comment 1 Dejan Glozic CLA 2005-05-26 11:00:50 EDT
You can ask Program.getPrograms() to get all the available program objects in 
the OS. The problem is that you cannot locate the one you are looking for 
since the only method you could use is 'getName()' which can return all kinds 
of results (a description, a name, a path, even an empty string). If you could 
return an absolute path of the executable, you could compare it with your own 
and be able to locate the Program object you need. From there you could get 
the image data to construct your Image instance.
Comment 2 Dejan Glozic CLA 2005-05-26 11:01:33 EDT
Billy, any workarounds for our problem?
Comment 3 Billy Biggs CLA 2005-05-26 11:14:37 EDT
Not for 3.1, we are API frozen.  Note that Program.getPrograms() is not
guarenteed to list anything either (it is not supported on newer versions of
Linux, for example).
Comment 4 Billy Biggs CLA 2005-05-26 11:20:30 EDT
Note that this bug is tracking adding support for obtaining secondary programs
(.html -> list of web browsers).  Support for finding an icon for an arbitrary
path name is tracked as bug 4643.
Comment 5 Lars Vogel CLA 2019-09-04 03:03:27 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it and remove the stalebug whiteboard tag. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--