Generating a Config File for the Formatter Application
Generating a config file for the formatter application involves modifying the code formatter settings
for a Java project and copying org.eclipse.jdt.core.prefs out of the .settings directory for that project.
-
Select a Java project, open the pop-up menu and choose Properties.
-
Select the Java Code Style > Formatter page and check Enable project specific settings.
-
Select or edit a profile as explained above.
-
Click OK when you are done.
-
Use either a file manager or the command line to copy
workspace/YourJavaProject/.settings/org.eclipse.jdt.core.prefs
to a new location.
-
If the files you want to format are using 1.5 constructs, you must add the following lines inside the preference file you just created:
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.source=1.5
Code formatter