atom / language-java

Java package for Atom
Other
62 stars 58 forks source link

Java scopes break when there are many Exceptions with a newline #205

Closed alexr00 closed 4 years ago

alexr00 commented 5 years ago

From @JoeyRxy https://github.com/microsoft/vscode/issues/78445

Snippet. Notice that there is an newline in the catch clause between some exception types.

public static void main(String[] args) {
    try {
        // something
    } catch (NoSuchMethodException | SecurityException | 
InstantiationException | llegalAccessException | IllegalArgumentException | invocationTargetException e) {
        e.printStackTrace();
    }
}

Only the last exception type on each line get the scope: storage.type.java meta.function-call.java source.java

The other exception types get scope: meta.function-call.java source.java

sadikovi commented 5 years ago

Looks similar to this: #186