How to indent console out like normal console out

see my screenshot, my console out has not padding, but all other console out has, how to add it

here is my console

here is normal console

the console white part has indent, how to add it in my console, here is my console code

@Override
protected ConsoleView createConsoleView() {
LightVirtualFile vf = new LightVirtualFile(project.projectFilePath)
ConsoleView cv = new ConsoleView(project, consoleTitle, vf)
cv.setLanguage(Language.ANY)
cv.setEditable(false)
cv.setBounds(new Rectangle(10, 0))
return cv
}


class ConsoleView extends LanguageConsoleImpl {

ConsoleView(
@NotNull Project project,
@NotNull String title,
@NotNull VirtualFile f) {
super(project, title, f)
}

@Override
public void print(@NotNull String s, @NotNull ConsoleViewContentType contentType) {
super.print(s, ConsoleViewContentType.SYSTEM_OUTPUT)
}

}

I can implement it with override #print, but it will be slow in larget output, so how to set console out(white part in console) component padding?

 

1 comment
Comment actions Permalink

This is because showing of folding outline area is disabled by default in LanguageConsoleImpl (see LanguageConsoleImpl.Helper#setupEditor where ConsoleViewUtil#setupConsoleEditor is called with false value for 'foldingOutlineShown' parameter).

If you want to change that, you can either provide your own Helper implementation (using a different LanguageConsoleImpl constructor), or execute 'editor.getSettings().setFoldingOutlineShown(true)' on editor instance in your console after it will be instantiated.

0

Please sign in to leave a comment.