Open stephan-herrmann opened 2 weeks ago
@jarthana have you seen this?
@jarthana have you seen this?
Thanks, will take a look.
Actually, I don't see fold/unfold option at all for markdown comments. Sigh! Let me see what's going on.
Actually, I don't see fold/unfold option at all for markdown comments. Sigh! Let me see what's going on.
This turned out to be the result of making the feature standard feature. Without that patch, the markdown folds/unfolds well.
Anyway, I am unable to see the problem. @stephan-herrmann Can you please check now?
This turned out to be the result of making the feature standard feature. Without that patch, the markdown folds/unfolds well.
Wow, for preview features, isSupported()
only checks that flag, ignoring the compliance / source levels. As a standard feature we check compliance, but org.eclipse.jdt.ui.text.folding.DefaultJavaFoldingStructureProvider.fSharedScanner
uses JavaCore
's default compliance level, ignoring what might be configured per project.
Sharing a scanner seems to be incompatible with version-dependent scanning :-(
Anyway, I am unable to see the problem. @stephan-herrmann Can you please check now?
When setting the workspace default compliance to 23 I can still see the same problem as before.
@jarthana Here's the difference: I normally use unix line-ends. When I change this to windows line-ends, folding is correct. Conversely, you should be able to see the bug when switching to unix line-ends.
Does this help to find some off-by-one bug?
Wow, for preview features,
isSupported()
only checks that flag, ignoring the compliance / source levels. As a standard feature we check compliance, butorg.eclipse.jdt.ui.text.folding.DefaultJavaFoldingStructureProvider.fSharedScanner
usesJavaCore
's default compliance level, ignoring what might be configured per project.
Yeah, that is written based on the assumption that preview can only be enabled when the compliance is the highest. That works within the compiler but as it turns out, not all clients follow that rule.
Anyway, I am unable to see the problem. @stephan-herrmann Can you please check now?
When setting the workspace default compliance to 23 I can still see the same problem as before.
@jarthana Here's the difference: I normally use unix line-ends. When I change this to windows line-ends, folding is correct. Conversely, you should be able to see the bug when switching to unix line-ends.
Does this help to find some off-by-one bug?
Reproduced. Thanks for the tip!
Given
when you fold the markdown comment in the editor, it looks like this:
@jarthana looks like your latest change in #1549 only moved the problem :)