Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sections to BlueJ terminal to divide up different method calls #2312

Merged
merged 9 commits into from
Jan 24, 2024

Conversation

neilccbrown
Copy link
Collaborator

This adds a change recently discussed in the meeting/on the Blueroom. It borrows BlueJ's scope highlighting mechanism to add grey section markers around each bit of output in the terminal, showing which method call it is from. It also adds a tooltip on hover, which tells you what the method call was. Finally, it clears the stderr pane on each method call (Michael requested this).

Copy link
Collaborator

@PwtKCL PwtKCL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a few comments for some clarity of the code comments but otherwise all good.

@@ -889,6 +909,7 @@ public void close() { }
private class TerminalWriter extends Writer
{
private boolean isErrorOut;
private AtomicInteger pendingWrites = new AtomicInteger(0);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although the name seems clear, I'd suggest to add a comment to describe the nature of this variable as when looking at its type only, it might not be obvious what it "counts".

// The line may be negative in some circumstances (see Section, below).
// In this case, column should be ignored. If the column is Integer.MAX_VALUE
// it means to take the whole line as included, no matter how long.
// Both column and line are zero-based.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the comment but I don't see how it applies to the method in the record.

}

// Get the current end position of the content as an end position
// This is different to getCurStart() because if the content ends if a newline
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small typo near the end of the line "if a newline" --> "is a newline"

@neilccbrown
Copy link
Collaborator Author

I've done all the suggestions -- thanks!

@neilccbrown neilccbrown merged commit c4fdeaa into k-pet-group:main Jan 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants