Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between pages "FAQ How do I control the Java formatter?" and "FAQ How do I choose my own compiler?"

(Difference between pages)
 
 
Line 1: Line 1:
By activating '''Window > Preferences > Java > Code Formatter''',
+
The JDT compiler is tightly integrated with the rest of the JDT. Extracting
you can create a new formatting profile. The choices for the various
+
the compiler out of the JDT and properly integrating a different compiler
layout characteristics show the depth and breadth of the JDT code formatter.
+
is not trivial. A quick approach is to disable the Java builder from the
Full control exists over indentation, placement of braces, whitespace,
+
project’s '''Builders''' property page, and replace it with an Ant
blank lines, control statements, line wrapping, and comments. With the
+
task that calls <tt>javac</tt> or another compiler. However, we
code formatter preference settings, a profile can easily be customized,
+
strongly advise you to go with the installed compiler. It knows
saved, and shared with a team of developers to maintain a consistent
+
exactly how to interact with the rest of Eclipse&#151;for instance, by assisting in the
company style.
+
creation of tasks, quick fixes, and source decorators. It
 +
is one of the fastest, most complete Java compilers available. Finally, the
 +
JDT compiler can generate class files even when the source contains compilation
 +
errors.
 +
 
 +
 
 +
 
 +
By activating '''Window &gt; Preferences &gt; Java &gt; Compiler''', you have
 +
full control over the reporting style of the compiler, severity of error
 +
conditions, what to do with unused code, and how to treat javadoc comments.  
 +
 
 +
 
 +
 
 +
 
 +
Using the Preference page, you can also select the JDK compliance
 +
level of the compiler, the version of generated class files, and
 +
whether the compiler should generate debugging symbols.
 +
 
 +
 
 +
 
 +
 
 +
 
 +
== See Also: ==
 +
 
 +
 
 +
[[FAQ_Why_can%26%23146%3Bt_my_Ant_build_find_%3Ctt%3Ejavac%3C%2Ftt%3E%3F]]
  
 
<hr><font size=-2>This FAQ was originally published in [http://www.eclipsefaq.org Official Eclipse 3.0 FAQs]. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0].</font>
 
<hr><font size=-2>This FAQ was originally published in [http://www.eclipsefaq.org Official Eclipse 3.0 FAQs]. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0].</font>

Revision as of 16:10, 14 March 2006

The JDT compiler is tightly integrated with the rest of the JDT. Extracting the compiler out of the JDT and properly integrating a different compiler is not trivial. A quick approach is to disable the Java builder from the project&#146;s Builders property page, and replace it with an Ant task that calls javac or another compiler. However, we strongly advise you to go with the installed compiler. It knows exactly how to interact with the rest of Eclipse&#151;for instance, by assisting in the creation of tasks, quick fixes, and source decorators. It is one of the fastest, most complete Java compilers available. Finally, the JDT compiler can generate class files even when the source contains compilation errors.


By activating Window > Preferences > Java > Compiler, you have full control over the reporting style of the compiler, severity of error conditions, what to do with unused code, and how to treat javadoc comments.



Using the Preference page, you can also select the JDK compliance level of the compiler, the version of generated class files, and whether the compiler should generate debugging symbols.



See Also:

[[FAQ_Why_can%26%23146%3Bt_my_Ant_build_find_%3Ctt%3Ejavac%3C%2Ftt%3E%3F]]


This FAQ was originally published in Official Eclipse 3.0 FAQs. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the Eclipse Public License v1.0.

Back to the top