-
Notifications
You must be signed in to change notification settings - Fork 135
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
Java try-catch command color display problem #259
Comments
Thanks for reporting. @Vigilans please take a look. This is a syntax highlighting issue. |
This is duplicate of atom/language-java#205. |
### Description of the Change Relax the too restrictive begin expression for catch block for following reasons: * The begin pattern is not suitable for dealing with multi-line pattern. * any comments between `catch` and `(` would also break the highlighting. Leave the catch keywork be would just be fine, since syntax highlighting should only be responsible for happy path. ### Alternate Designs Any other design would introduce new complexity. ### Benefits * Can correctly highlight when caught exceptions are split in multiple lines * Can correctly highlight when '(' is placed in a new line after `catch` * Can correctly highlight when there is comment between `catch` and '(' * Reduces the complexity ### Possible Drawbacks More like a `right` hightlight for wrong syntax in code. ### Applicable Issues Fix #205 FIx microsoft/vscode-java-pack#259
Fixed in atom/language-java#217. |
|
Issue Type: Bug
In the try-catch argument in Java, when I use the operator | to catch for different exception types, the color gets weird when a new line is inserted in the middle of the exception sequences.
try {
process();
} catch (Exception1 | Exception2 | Exception3
| Exception4 | Exception5) { // this is where it gets weird - the catch became yellow and only two of the Exception classes became green
// handle the exception
}
Extension version: 0.8.0
VS Code version: Code 1.40.1 (8795a9889db74563ddd43eb0a897a2384129a619, 2019-11-13T16:49:35.976Z)
OS version: Windows_NT x64 10.0.18362
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: