Reusing code snippets in JDeveloper

Here is one simple but useful thing that I've been too lazy to make use of, and had overlooked.


JDeveloper's component palette has a page named "Code Snippets". You could actually add frequently re-used code snippets and save them into the "code snippets" section.



Once you click on "Add component", you can give the snippet a name, for e.g. "Assign WS-Addressing Headers" and copy the snippet from your source code  to the given text area.


You can now re-use the code snippet by dragging and dropping the component from the code snippet palette onto the source view of any file that you open in JDeveloper.


Similarly, you can also add your own Pages to the Component palette, to capture Snippets for diferent cateogies of code [for instnace, BPEL,XML, XSD, XSLT etc].



Now you can specify the Page Name and specify the type  - "snippet", "java" etc.


 


 



 


Now you can add new code snippets to the new Palette Page that you created.


 

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Principal Product Manager

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