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

Improve Last Line Filtering #20

Open
GoogleCodeExporter opened this issue Jul 5, 2015 · 0 comments
Open

Improve Last Line Filtering #20

GoogleCodeExporter opened this issue Jul 5, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Could I propose some improvement regarding 'Last Line
Filtering'?
In my java code I have both types of code:
First:
try {
//
if(condition1) {
//
} else if(condition2) {
//
} else {
//
}
//
try {
//
} catch( Exception x) {
//
}finally {
//
}
} catch (Exception1 e) {
//
} catch (Exception2 e) {
//
} catch (Exception3 e) {
//
}

Second:
try {
//
if(condition1) {
//
}
//
if(condition2) {
//
}
//
try {
//
} catch( Exception x) {
//
}
} catch (Exception1 e) {
//
}

If I disable 'Last Line Filtering' options in folding
preferences then lines with 'else if', 'else' and
'catch' are folded in first example, and closing
brackets are folded in both examples.
If I enable 'Last Line Filtering' options in folding
preferences then lines with 'else if', 'else' and
'catch' aren't folded in first example, and closing
brackets aren't folded in both examples.
Is it possible to fold last line only if there is no
other statement after end of folding block? Like this:
First:
try {
//
if(condition1) { [...]
} else if(condition2) { [...]
} else { [...]
//
try { [...]
} catch( Exception x) { [...]
}finally { [...]
} catch (Exception1 e) { [...]
} catch (Exception2 e) { [...]
} catch (Exception3 e) { [...]

Second:
try {
//
if(condition1) { [...]
//
if(condition2) { [...]
//
try { [...]
} catch( Exception x) { [...]
} catch (Exception1 e) { [...]
So lines with 'else if', 'else' and 'catch' won't be
folded, and closing brackets without other stetements
will be folded.


Original issue reported on code.google.com by rjlori...@gmail.com on 20 Oct 2006 at 9:43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant