Skip to content

Disable/control blank lines in the beginning of the console #911

Closed
@Junology

Description

@Junology

Most relevant area for this enhancement?

Accessibility

Feature to enhance

Processing prints 10 blank lines when it runs PDE

Desired enhancement

In Linux, Processing IDE is launched by java command with & in the tail, so the blank lines just mess up the terminal; e.g.

user@processing-4.3$ ./processing
user@processing-4.3$ 









echo "This is the next command"
This is the next command
user@processing-4.3$ 

I just want to disable the feature, but regarding backward compatibility, let me suggest three options:

  1. Just stop printing blank lines. The simplest solution, but this can break backward compatibility.
  2. Add configurable option to defaults.txt or preferences.txt like console.blanklines with default value 10 which controls the number of blank lines. A user can set it to 0 to disable the printing. Also, it would not affect existing projects unless they depend on defaults.txt itself.
  3. Do nothing. Maximal backward compatibility.

Potential benefits

The enhancement may also benefit GUI users since the blank lines are also printed to IDE's "console" area.
For those users, the blank lines make little sense.
editor-blankline

Possible drawbacks

According to the comment in the source code, the blank lines are for Windows console (see below).
However, the line was added in Processing 2 era, so things may have changed.
Backward compatibility can also be a problem.

Additional context

The blank lines come from Editor.prepareRun() method in the line 2297 in processing.app.ui.Editor.

  public void prepareRun() {
    internalCloseRunner();
    statusEmpty();

    // do this to advance/clear the terminal window / dos prompt / etc
    for (int i = 0; i < 10; i++) System.out.println();

Would you like to work on the issue?

Once the direction becomes clear, I think I can do it by myself.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions