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");

Comments:

Post a Comment:
Comments are closed for this entry.
About

Didier Laurent - Sr Principal Support Engineer in the JDeveloper team

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today