« "Toggle Line Comments" Accelerator Does Not Work on All Keyboards | Main | Event and Execution Profilers in JDeveloper »

Another Example of Code Template


I had already blogged about the Code Templates - see "conn, ife, sop & try".
Jan Vervecken gives a useful example of Code Template in OTN: "nice Code Template for log statements".

You can define "sopcm" as the shortcut of the following code template:

System.out.println("Current Class: $theCurrentClass$ - Current Method: $theCurrentMethod$");
as shown in the next figure:
sopcm_1:


and declare 2 variables theCurrentClass and theCurrentMethod of type curClass and curMethod respectively:
sopcm_3:

Then in the Code Editor, enter sopcm and press CTRL + ENTER
It will add the following code automatically (in this example, it was added in method getDepartmentsView1 of the class AppModuleImpl):
System.out.println("Current Class: AppModuleImpl - Current Method: getDepartmentsView1");

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About This Entry

This page contains a single entry from the blog posted on November 27, 2006 12:38 AM.

The previous post in this blog was "Toggle Line Comments" Accelerator Does Not Work on All Keyboards.

The next post in this blog is Event and Execution Profilers in JDeveloper.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle