Environment: JDeveloper 11.1.1.6
To make the Logger-Declaration a not so tedious work you can make use of JDeveloper Code Template features which is available in the preferences.
In JDeveloper:
1. Open from the menu: Tools > Preferences
2. Open: Code Editor > Code Templates
3. Click "+" to add a new code template
4. Goto the Code-Tab and add the following:
private static final ADFLogger LOGGER = ADFLogger.createADFLogger($clazz$.class);
5. Goto Imports-Tab and add needed classes:
oracle.adf.share.logging.ADFLogger
6. Confirm Changes by clicking 'OK'.
=>> The Code-Template 'logger' is now available inside the Java-Editor.
Using the Code-Template in JDevelopers Editor
1. Open a Java class
2. Place cursor right inside class definition, type 'logger' and press 'Ctrl+Enter'.
Afterwards the ADFLogger is available inside the Java class.
On the following Blog posts you can find more information around ADFLogger + a CodeTemplates XML which you can import in your JDeveloper.
More information
No comments:
Post a Comment