Friday, March 6, 2015

Code Snippet Icons in JDeveloper

When using the 'Code Snippets' feature in JDeveloper you have the option to browse for a .png file to use as a icon. However, I've found that this does not work (in both Jdev 11g and 12c) even though in the main window it will load the correct .png, it does not use it on the Components Pallet.

However, as a workaround I've found that you can use the build-in icons that are located in the jar files, but you need to know their names and paths. Thus, here is a list of the jar files that can be used for icons.

  • [MIDDLEWARE_HOME]\oracle_common\modules\oracle.javatools_[JDEV_VERSION]\oicons.jar
  • [MIDDLEWARE_HOME]\oracle_common\modules\oracle.javatools_[JDEV_VERSION]\javatools-nodeps.jar
You can open each of these files, and view the icons inside that can be used. (You will need a tool such as 7-Zip to open / extract the jar)

You can then use the following path to reference the files with the correct filename:
  • /oracle/javatools/icons/[filename].png

Now even though you don't have your own icons, you still at least can have different and more appropriate icons for your snippets. 

No comments: