Closed
Bug 1188198
Opened 11 years ago
Closed 10 years ago
Remove m prefix from ThemedView.java.frag template & generate results
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox47 fixed)
RESOLVED
FIXED
Firefox 47
| Tracking | Status | |
|---|---|---|
| firefox47 | --- | fixed |
People
(Reporter: mcomella, Assigned: raunaq.abhyankar, Mentored)
Details
(Whiteboard: [lang=java][good next bug])
Attachments
(1 file, 1 obsolete file)
|
73.46 KB,
patch
|
mcomella
:
review+
|
Details | Diff | Splinter Review |
ThemedView.java.frag [1] is a template that auto-generates m/a/b/widget/Themed*.java. We use an old convention in that file that member variables have an `m` prefix. Your mission:
1) Remove the `m` prefix from all variables.
2) Regenerate the output files. `./mach python mobile/android/base/widget/generate_themed_views.py` is probably the easiest way.
3) Commit and add it all to version control!
[1]: http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/widget/ThemedView.java.frag
| Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8706924 -
Flags: review?(michael.l.comella)
| Reporter | ||
Updated•10 years ago
|
Assignee: nobody → raunaq.abhyankar
| Reporter | ||
Comment 2•10 years ago
|
||
Comment on attachment 8706924 [details] [diff] [review]
bug-1188198-fix.patch
Review of attachment 8706924 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/base/java/org/mozilla/gecko/widget/themed/ThemedView.java.frag
@@ +21,5 @@
> import android.util.AttributeSet;
>
> public class Themed@VIEW_NAME_SUFFIX@ extends @BASE_TYPE@
> implements LightweightTheme.OnChangeListener {
> + private LightweightTheme Theme;
Sorry, if I wasn't clear – member variables should start with lowercase letters.
Attachment #8706924 -
Flags: review?(michael.l.comella) → feedback+
| Assignee | ||
Comment 3•10 years ago
|
||
(In reply to Michael Comella (:mcomella) from comment #2)
> Comment on attachment 8706924 [details] [diff] [review]
> bug-1188198-fix.patch
>
> Review of attachment 8706924 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> :::
> mobile/android/base/java/org/mozilla/gecko/widget/themed/ThemedView.java.frag
> @@ +21,5 @@
> > import android.util.AttributeSet;
> >
> > public class Themed@VIEW_NAME_SUFFIX@ extends @BASE_TYPE@
> > implements LightweightTheme.OnChangeListener {
> > + private LightweightTheme Theme;
>
> Sorry, if I wasn't clear – member variables should start with lowercase
> letters.
if ((isLight && IsLight != isLight) || (!isLight && IsDark == isLight))
What to do here? If member variable is named "isLight" then we will have same variable names.
| Reporter | ||
Comment 4•10 years ago
|
||
By the way, you can use the "Need more information from" field to give a user a persistent notification so they'll be more likely to see your comments or questions.
(In reply to raunaqabhyankar from comment #3)
> if ((isLight && IsLight != isLight) || (!isLight && IsDark == isLight))
> What to do here? If member variable is named "isLight" then we will have
> same variable names.
isLight vs. IsLight is also pretty confusing, to be fair. :P
A common convention is to differentiate arguments from member variables by using the `this` reference, i.e.
(isLight && this.isLight != isLight) || ...
| Assignee | ||
Comment 5•10 years ago
|
||
Changed to lowercase..!
Attachment #8706924 -
Attachment is obsolete: true
Attachment #8710072 -
Flags: review?(michael.l.comella)
| Assignee | ||
Comment 6•10 years ago
|
||
(In reply to Michael Comella (:mcomella) from comment #4)
> By the way, you can use the "Need more information from" field to give a
> user a persistent notification so they'll be more likely to see your
> comments or questions.
>
> (In reply to raunaqabhyankar from comment #3)
> > if ((isLight && IsLight != isLight) || (!isLight && IsDark == isLight))
> > What to do here? If member variable is named "isLight" then we will have
> > same variable names.
>
> isLight vs. IsLight is also pretty confusing, to be fair. :P
>
> A common convention is to differentiate arguments from member variables by
> using the `this` reference, i.e.
> (isLight && this.isLight != isLight) || ...
Have submitted a patch. Kindly review and let me know of any change to be made..
| Reporter | ||
Comment 7•10 years ago
|
||
| Reporter | ||
Comment 8•10 years ago
|
||
Comment on attachment 8710072 [details] [diff] [review]
bug-1188198-fix.patch
Review of attachment 8710072 [details] [diff] [review]:
-----------------------------------------------------------------
Right on! This looks good to me! Also, I apologize for the delay. It shouldn't be this long in the future.
I made a push to our try test servers (above).
Once the push goes green, you can add the "checkin-needed" keyword [1] to get your patch checked in. Note that all patches added via checkin-needed keyword need an associated green try run. Let me know if you need help reading the results.
[1]: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/How_to_Submit_a_Patch#Getting_the_patch_checked_into_the_tree
Attachment #8710072 -
Flags: review?(michael.l.comella) → review+
| Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Keywords: checkin-needed
Comment 10•10 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•