-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable icons for custom commands #9
Comments
How about no icons? Most menus in Eclipse don't have menus. A nice enhancement would be using the operating system's icons. That might be very complicated. |
Well, no icons is what we currently have, right?. It seems I personally can live quite happily without icons on custom commands (note the low prio label). OS icons: I think that's pretty much out of scope for this plug-in :-) |
There should be some API somewhere in Eclipse giving access to icons of native applications. This is e.g. used in [ Preferences > General > Editor > File Associations > Add (Editor) > External Programs ] which is part of what StartExplorer resembles. |
Found in org.eclipse.swt.program.Program.getImageData() |
Nice! I still do not see how we could easily use this. As it is, the user configures a String, that will get executed via Runtime.exec when she activates the custom command. This string could be more or less anything. If I understand org.eclipse.swt.program.Program correctly, we can get an instance of it by feeding a file extension (like "txt" or "xls") to the static method findProgram (String extension). The menu for the custom commands is created dynamically each time the user opens it on a file. So indeed we could use the extension of the currently selected file and pass it to findProgram. But we still do not know if that makes sense. For all we know, the custom command could be "rm -rf ${resource_path}" or "scp ${resource_path} [email protected]:/root/${resource_name}" or whatever. IMHO it would be rather pointless to show the icon for the file type for arbitrary commands. We could, however use this Eclipse API to dynamically show different icons for the standard StartExplorer "Open File With Default Application" command. OTOH, as you pointed out in #1, we might as well drop the open in default application thing completely. |
No description provided.
The text was updated successfully, but these errors were encountered: