Annotations and indentation in java

Hi!

I was wondering if there is an easy way to fix the indentation after annotations in java files. As per now, it indents the next line. I have been looking through the customization code, but I am at a bit of a loss of what to do. Could anyone help me out?

Right now it looks like this.
1
2
3
@Override
    public void method() {
}


I would like it to look like this.
1
2
3
@Override
public void method() {
}

Edited by Jonas on Reason: Initial post
First, it depends on in you're using virtual whitespace. Virtual whitespace is on if you can't delete and insert individual spaces at the beginning of a line. If you are using it, there's nothing you can do, it's not customizable.

You can disable virtual whitespace in config.4coder if that's what you want.

If you've disable virtual whitespace then you're looking at the text level indenter. In that case there is something you can do by editing 4coder_auto_indent.cpp. Lines 504 through 506 add extra indentation whenever the parser thinks it has seen an incomplete statement. Either just comment that out, or enhance the parser to think of @Override as the end of a statement, which is not necessarily an easy task, but possible somehow I'm sure.
I am using virtual whitespace, and I don't really want to disable it. It's not a problem for me as I'm not really working that much with java. I was just curious if there was a somewhat easy fix somewhere in the customization code.

Anyways, thanks for the quick response. :)

Edited by Jonas on
Hey. Create your custom 4coder command that’s replacing return key. Firstly exec command that’s currently bound to it, and secondly, remowe the whitespace. That’s really easy to do with 4coder api.