Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Import a code formatter for the Java editor. An example?
Import a code formatter for the Java editor. An example? [message #253578] Wed, 28 May 2008 21:27 Go to next message
Eclipse UserFriend
Looks like the Java editor preference page is asking for an xml file.
Is there an example? Thanks.
Re: Import a code formatter for the Java editor. An example? [message #253588 is a reply to message #253578] Thu, 29 May 2008 04:55 Go to previous messageGo to next message
Eclipse UserFriend
AL wrote:
> Looks like the Java editor preference page is asking for an xml file.
> Is there an example? Thanks.
I have no idea what you're talking about.

Dani
Re: Import a code formatter for the Java editor. An example? [message #253599 is a reply to message #253588] Thu, 29 May 2008 07:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------020603020401060509090304
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Dani,

When you export your formatter preferences it saves it in an XML file as
you know. :-P So AL could produce his own example by creating a new
profile and exporting to it. Here's a snip of EMF's one:

<?xml version="1.0" encoding="UTF-8"?>
<profiles version="11">
<profile kind="CodeFormatterProfile" name="EMFCodeFormatter.profile"
version="11">
<setting
id="org.eclipse.jdt.core.formatter.blank_lines_before_package "
value="0"/>
<setting
id=" org.eclipse.jdt.core.formatter.insert_new_line_before_while_ in_do_statement "
value="insert"/>
<setting
id=" org.eclipse.jdt.core.formatter.number_of_blank_lines_at_begi nning_of_method_body "
value="0"/>
<setting
id=" org.eclipse.jdt.core.formatter.insert_space_after_comma_in_e num_declarations "
value="insert"/>
<setting
id=" org.eclipse.jdt.core.formatter.insert_space_before_closing_b racket_in_array_reference "
value="do not insert"/>
<setting
id=" org.eclipse.jdt.core.formatter.indent_statements_compare_to_ block "
value="true"/>
<setting
id=" org.eclipse.jdt.core.formatter.insert_space_after_colon_in_c ase "
value="insert"/>
<setting
id=" org.eclipse.jdt.core.formatter.keep_then_statement_on_same_l ine "
value="false"/>
<setting
id=" org.eclipse.jdt.core.formatter.insert_space_before_comma_in_ type_arguments "
value="do not insert"/>
<setting
id=" org.eclipse.jdt.core.formatter.comment.indent_parameter_desc ription "
value="true"/>
<setting
id=" org.eclipse.jdt.core.formatter.insert_space_after_opening_br ace_in_array_initializer "
value="insert"/>
<setting
id=" org.eclipse.jdt.core.formatter.insert_new_line_in_empty_meth od_body "
value="insert"/>
<setting
id=" org.eclipse.jdt.core.formatter.insert_space_between_empty_br aces_in_array_initializer "
value="do not insert"/>
<setting
id=" org.eclipse.jdt.core.formatter.insert_space_before_closing_p aren_in_while "
value="do not insert"/>
<setting
id=" org.eclipse.jdt.core.formatter.insert_space_after_postfix_op erator "
value="do not insert"/>

Of course I doubt he will want to create the .xml file directly. He
should be using the tabs in the dialog to tailor the formatting to what
he wants and save those results when he's done.


Daniel Megert wrote:
> AL wrote:
>> Looks like the Java editor preference page is asking for an xml file.
>> Is there an example? Thanks.
> I have no idea what you're talking about.
>
> Dani


--------------020603020401060509090304
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Dani,<br>
<br>
When you export your formatter preferences it saves it in an XML file
as you know. :-P&nbsp;&nbsp; So AL could produce his own example by creating a
new profile and exporting to it.&nbsp; Here's a snip of EMF's one:<br>
<blockquote>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br>
&lt;profiles version="11"&gt;<br>
&lt;profile kind="CodeFormatterProfile" name="EMFCodeFormatter.profile"
version="11"&gt;<br>
&lt;setting
id="org.eclipse.jdt.core.formatter.blank_lines_before_package "
value="0"/&gt;<br>
&lt;setting
id=" org.eclipse.jdt.core.formatter.insert_new_line_before_while_ in_do_statement "
value="insert"/&gt;<br>
&lt;setting
id=" org.eclipse.jdt.core.formatter.number_of_blank_lines_at_begi nning_of_method_body "
value="0"/&gt;<br>
&lt;setting
id=" org.eclipse.jdt.core.formatter.insert_space_after_comma_in_e num_declarations "
value="insert"/&gt;<br>
&lt;setting
id=" org.eclipse.jdt.core.formatter.insert_space_before_closing_b racket_in_array_reference "
value="do not insert"/&gt;<br>
&lt;setting
id=" org.eclipse.jdt.core.formatter.indent_statements_compare_to_ block "
value="true"/&gt;<br>
&lt;setting
id=" org.eclipse.jdt.core.formatter.insert_space_after_colon_in_c ase "
value="insert"/&gt;<br>
&lt;setting
id=" org.eclipse.jdt.core.formatter.keep_then_statement_on_same_l ine "
value="false"/&gt;<br>
&lt;setting
id=" org.eclipse.jdt.core.formatter.insert_space_before_comma_in_ type_arguments "
value="do not insert"/&gt;<br>
&lt;setting
id=" org.eclipse.jdt.core.formatter.comment.indent_parameter_desc ription "
value="true"/&gt;<br>
&lt;setting
id=" org.eclipse.jdt.core.formatter.insert_space_after_opening_br ace_in_array_initializer "
value="insert"/&gt;<br>
&lt;setting
id=" org.eclipse.jdt.core.formatter.insert_new_line_in_empty_meth od_body "
value="insert"/&gt;<br>
&lt;setting
id=" org.eclipse.jdt.core.formatter.insert_space_between_empty_br aces_in_array_initializer "
value="do not insert"/&gt;<br>
&lt;setting
id=" org.eclipse.jdt.core.formatter.insert_space_before_closing_p aren_in_while "
value="do not insert"/&gt;<br>
&lt;setting
id=" org.eclipse.jdt.core.formatter.insert_space_after_postfix_op erator "
value="do not insert"/&gt;<br>
</blockquote>
Of course I doubt he will want to create the .xml file directly.&nbsp; He
should be using the tabs in the dialog to tailor the formatting to what
he wants and save those results when he's done.<br>
<br>
<br>
Daniel Megert wrote:
<blockquote cite="mid:g1lr2v$gof$3@build.eclipse.org" type="cite">AL
wrote:
<br>
<blockquote type="cite">Looks like the Java editor preference page is
asking for an xml file. Is there an example?&nbsp; Thanks.
<br>
</blockquote>
I have no idea what you're talking about.
<br>
<br>
Dani
<br>
</blockquote>
<br>
</body>
</html>

--------------020603020401060509090304--
Re: Import a code formatter for the Java editor. An example? [message #253603 is a reply to message #253599] Thu, 29 May 2008 07:39 Go to previous message
Eclipse UserFriend
Ed Merks wrote:
> Dani,
>
> When you export your formatter preferences it saves it in an XML file
> as you know. :-P
Yes, but that has nothing to do with the Java editor preference page.

Dani
> So AL could produce his own example by creating a new profile and
> exporting to it. Here's a snip of EMF's one:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <profiles version="11">
> <profile kind="CodeFormatterProfile"
> name="EMFCodeFormatter.profile" version="11">
> <setting
> id="org.eclipse.jdt.core.formatter.blank_lines_before_package "
> value="0"/>
> <setting
> id=" org.eclipse.jdt.core.formatter.insert_new_line_before_while_ in_do_statement "
> value="insert"/>
> <setting
> id=" org.eclipse.jdt.core.formatter.number_of_blank_lines_at_begi nning_of_method_body "
> value="0"/>
> <setting
> id=" org.eclipse.jdt.core.formatter.insert_space_after_comma_in_e num_declarations "
> value="insert"/>
> <setting
> id=" org.eclipse.jdt.core.formatter.insert_space_before_closing_b racket_in_array_reference "
> value="do not insert"/>
> <setting
> id=" org.eclipse.jdt.core.formatter.indent_statements_compare_to_ block "
> value="true"/>
> <setting
> id=" org.eclipse.jdt.core.formatter.insert_space_after_colon_in_c ase "
> value="insert"/>
> <setting
> id=" org.eclipse.jdt.core.formatter.keep_then_statement_on_same_l ine "
> value="false"/>
> <setting
> id=" org.eclipse.jdt.core.formatter.insert_space_before_comma_in_ type_arguments "
> value="do not insert"/>
> <setting
> id=" org.eclipse.jdt.core.formatter.comment.indent_parameter_desc ription "
> value="true"/>
> <setting
> id=" org.eclipse.jdt.core.formatter.insert_space_after_opening_br ace_in_array_initializer "
> value="insert"/>
> <setting
> id=" org.eclipse.jdt.core.formatter.insert_new_line_in_empty_meth od_body "
> value="insert"/>
> <setting
> id=" org.eclipse.jdt.core.formatter.insert_space_between_empty_br aces_in_array_initializer "
> value="do not insert"/>
> <setting
> id=" org.eclipse.jdt.core.formatter.insert_space_before_closing_p aren_in_while "
> value="do not insert"/>
> <setting
> id=" org.eclipse.jdt.core.formatter.insert_space_after_postfix_op erator "
> value="do not insert"/>
>
> Of course I doubt he will want to create the .xml file directly. He
> should be using the tabs in the dialog to tailor the formatting to
> what he wants and save those results when he's done.
>
>
> Daniel Megert wrote:
>> AL wrote:
>>> Looks like the Java editor preference page is asking for an xml
>>> file. Is there an example? Thanks.
>> I have no idea what you're talking about.
>>
>> Dani
>
Previous Topic:Tune comment for generated serialVersionUID
Next Topic:Ant build files
Goto Forum:
  


Current Time: Sun Nov 09 14:03:15 EST 2025

Powered by FUDForum. Page generated in 0.12204 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top