Showing posts with label jar. Show all posts
Showing posts with label jar. Show all posts

Feb 8, 2008

Eclipse icons

Explaining an action or describing an object with fewer words is tough. Showing them as 16x16 icons is even more tougher. Eclipse has a wonderful collection of icons. The best part of it - the whole set is consistent in sizing, coloring and styling. (I personally feel that icons like the filter , jar library , plugins are brilliantly done). You can reuse them in many places in your own plugins/RCP Application as well. AFAIK, these icons are under Eclipse Public License and so you should not be falling into any legal trap for using these (don't take my word, I'm not a lawyer :-).

Many common images (undo, redo, file, folder, cut, copy) are available thru the org.eclipse.ui.ISharedImages interface. You can get them with IWorkbench:

Image folderImg = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);

For other common items (refresh, filter, collapse all, expand all), finding the images inside the plugins jars will be a tough task. So here are some images that you can reuse in your plugins:

Add, Delete :
Collapse All/Expand All:
Navigation:
Window operations:
Run & Debug:
Import & Export:
Date & Time:
Editor Operations:
Vertical & Horizontal:
Flat & Hierarchical:
Misc: Eclipse , Config & , Console , Font Help , Lock , Stop , Properties , Search & , Tip/Quick Fix , Sort , Task & , Sync & , Pulldown Menu, Binary , Bookmark , Category

Let me know if I've missed any commonly used icon. I'll add it to this list. The complete set of above icons can be downloaded from here.

Related:
Eclipse Icons - follow up post
Searching for Eclipse - source, blogs, images ...
Accessing CVS of Eclipse.org

Jan 10, 2008

Exporting Jar - the easy way

There might be times where you want to create the same Jar file again and again. You don't have to run the Jar Export wizard every time you run the wizard. You can save the description of the Jar Export in the workspace and just right click to create the Jar. Here is what you need to do:

  • In the first page, check the Overwrite existing files without warning (This is optional, but if you are frequently creating the jar, this helps you saving from the little annoying dialog)


  • In the second page of Jar Export Wizard, check "Save the description of this JAR" and give the location to save


  • The next time you want to create the jar, just right click the *.jardesc file and select "Create Jar"
One problem with this Jar Export Wizard is that it was designed to export Jars outside workspace. This forces the jar description file is hardcoded with the destination, which means you can't share this jardesc file with your teammates (unless they want the jar exactly in the same location in their local disks) In case you are interested in exporting to a jar inside the workspace or exporting to a relative location, vote for this bug.