-
Notifications
You must be signed in to change notification settings - Fork 143
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
[GTK] Add missing spaces for consistent style #996
Conversation
Add spaces before parentheses and brackets The defects are mentioned in eclipse-platform#903
9f8c509
to
addf7d8
Compare
@SyntevoAlex please share your thoughts. |
In sum : I dislike this change and wish I wouldn't see it 1:( |
@SyntevoAlex requests this style in #903
This style is so exotic, that I don't think it can be expressed in Eclipse Formatter terms (and there is no formatter file for SWT to begin with).
The method (to update the style) I use is not universal and I need only these to files to be consistent to proceed with #918
Sure, just like any other style fix.
Same here. One way or another, I need to make the style consistent, so that I could apply my changes in a consistent manner. |
So let's close this PR. |
Should I then format the files with default Eclipse Formatter? I still need to somehow apply my change for #918, which have to be consistent with something. |
I haven't checked your patch, sorry. I personally prefer to use "most convenient" coding style for changed code, that a) consistent and b) matches common understanding about format used in the project in question. Also I usually try to separate "cleanup" from "functional" changes. |
The exact content of my patch does not matter (I just need some kind of guidance on style it should be done in). The most convenient style is not consistent with current SWT codebase. And this discussion shows that there is no common understanding. This MR was a separate cleanup change. I guess, I will try to stick to the exotic style demonstrated here, but will only update changed methods. |
I agree that code style in SWT is somewhat exotic. I would suggest to not touch what already exists, unless you're rewriting most of function's code. |
In new code, you could pick from any of the styles that are widely represented in SWT. |
Add missing space after identifier, but before an opening parenthesis or bracket. The fix is done by replacing all occurrences of
\w\(
and\w\[
regular expressions. Only GTK Tree and TreeItem files are touched.This fixes some of style defects mentioned in #903
Rationale: The existing style inconsistencies make it harder to keep consistent style in #918