parcelabler icon indicating copy to clipboard operation
parcelabler copied to clipboard

Multiple variable declarations on one line

Open pareeohnos opened this issue 9 years ago • 2 comments

Thanks for the tool - really useful, especially given I'm new to Android. Made my life a LOT easier, but I've just run into a (very) minor issue.

Below is the class that I'm inputting:

public class MyClass {

    private long a;
    private double b, c, d, e;

    public MyClass(long a, double b, double c, double d, double e) {
        _a = a;
        _b = b;
        _c = c;
        _d = d;
        _e = e;
    }

}

The code is valid and compiles without an issue, however the parcelabler parser gives me the following error:

The following variables were not recognized (syntax error?): 
private double _a, _b, _c, _d

It appears that the parser isn't happy about multiple variables being declared on the same line. As a result, the writing and reading from the parcel doesn't include these variables.

pareeohnos avatar Mar 20 '15 14:03 pareeohnos

I faced the same issue.

2hamed avatar Jun 15 '15 06:06 2hamed

The parser is a hacked-together implementation. Consider using https://github.com/mcharmas/android-parcelable-intellij-plugin for Android Studio instead.

dallasgutauckis avatar Jun 15 '15 14:06 dallasgutauckis