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 JAR manifest header folding #2755

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mkem114
Copy link

@mkem114 mkem114 commented May 12, 2024

Add folding support to make it easier to wrestle with large files. After this PR I'll add structure support though

@mkem114
Copy link
Author

mkem114 commented May 12, 2024

How should I go about testing? It's a bit of mish-mash looking around at other files

public String getPlaceholderText(@NotNull ASTNode node) {
if (node.getPsi() instanceof Header) {
String usefulText = node.getText().trim();
if (usefulText.length() <= MAX_BYTES_PER_LINE) {
Copy link
Author

Choose a reason for hiding this comment

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

Seems like a useful proxy, the viewer cuts off placeholders that are too long with soft-wrapping (well you can still horizontally scroll).

In this case, adding more detail in the placeholder shouldn't add more cognitive load


@Override
public boolean isCollapsedByDefault(@NotNull ASTNode node) {
return false; // no change in existing behaviour
Copy link
Author

Choose a reason for hiding this comment

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

I think we can avoid this discussion for now. What the heuristic should be, should probably be discussed in an issue IMO

@jreznot jreznot assigned sirgl and unassigned jreznot May 15, 2024
@jreznot jreznot requested a review from sirgl May 15, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants