[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.tools.jdt] Correct Indentation
|
- From: gurdm@xxxxxxxxx (Dmitry Guriev)
- Date: Fri, 18 Sep 2009 11:17:10 +0000 (UTC)
- Newsgroups: eclipse.tools.jdt
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
Hello!
I write my eclipse based program which generate java code. I would like to
use
org.eclipse.jdt.internal.ui.actions.IndentAction to correct indentation.
But I have a problem when with the following example:
String src = "class a {" +EOL+
"static String s = \"a\"\n"+
"+\"{\"\n"+
"+\"{\"\n"+
"+\"{\"\n"+
";\n"+
"// comment\n"+
"}"+EOL;
IDocument document = new Document(src);
IndentAction.indent(document, project);
I get the following output:
<pre>
class a {
static String s = "a"
+"{"
+"{"
+"{"
;
// comment
}
</pre>
but when I select "Correct Indentaton" in editor menu I have the following
output:
<pre>
class a {
static String s = "a"
+"{"
+"{"
+"{"
;
// comment
}
</pre>
Is there any option in the project settings which can correct indentation?
Thanks