Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [nebula-dev] NullPointerException with CDateTime (new in 2.4)

Hi Matthias

Very good news 👍
Wim, is it possible to create another minor release of Nebula ?

Have a nice day,

Laurent

Le mar. 21 juil. 2020 à 16:49, Matthias Paul Scholz <matthias.paul.scholz@xxxxxxxxx> a écrit :
Hi Laurent,

With the snapshot of this morning (202007201259), I haven't encountered any of the exceptions above any more. :)

Thanks and best,
  MP

Am Mo., 20. Juli 2020 um 14:59 Uhr schrieb Laurent Caron <laurent.caron@xxxxxxxxx>:
Hi matthias,

First of all I would like to apologize for these regressions. This NPE is fixed, I hope it is the last one.

Concerning unit tests, you are totally right. I am a lazy guy, and I merged the evolutions (on an existing widget) without creating associated tests. It is not professional.
I've created a bug entry (https://bugs.eclipse.org/bugs/show_bug.cgi?id=565363) and I'll work on it.

Thank you for your feedback,

Laurent

Le lun. 20 juil. 2020 à 10:11, Matthias Paul Scholz <matthias.paul.scholz@xxxxxxxxx> a écrit :
Hi Laurent,

Thanks for the quick reply.
I've tested the latest repository snapshot (qualifier 202007171729):

'cdt-picker-active-day-color' works now, but I still get the same NPE when configuring 'cdt-picker-color':

java.lang.NullPointerException
at org.eclipse.nebula.widgets.cdatetime.CDateTime.setPickerForegroundColor(CDateTime.java:2300)
at org.eclipse.nebula.widgets.cdatetime.css.CDateTimePropertyHandler.applyCSSProperty(CDateTimePropertyHandler.java:66)
at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyCSSProperty(AbstractCSSEngine.java:726)

The CDateTime is constructed as 

new CDateTime(parent, getStyle() | CDT.DROP_DOWN
        | CDT.DATE_MEDIUM | CDT.TIME_MEDIUM | CDT.CLOCK_DISCRETE);

I wonder whether it wouldn't be helpful to have a series of unit tests here for the css properties(if possible) instead of testing them  with an RCP application on a customized targetplatform (which is somewhat time consuming).

Best,
 MP

Am Fr., 17. Juli 2020 um 19:04 Uhr schrieb Laurent Caron <laurent.caron@xxxxxxxxx>:
Hi Matthias,

Thank you for your feedback, I think we're getting close (and I'm very sorry for the bugs, I need holidays).
I've merged my PR, so I think you can give a try to the next snapshot.

Cheers,
Laurent

Le ven. 17 juil. 2020 à 16:49, Matthias Paul Scholz <matthias.paul.scholz@xxxxxxxxx> a écrit :
I have tested the nebula snapshot from two hours ago (the one the gives me qualifiers ending with '202007152209') and configured all the CSS color properties for CDateTime listed in the doc (https://wiki.eclipse.org/Nebula_CSS_CDateTime).

The only CSS property that still gives rise to a NullPointerException when CDT.DROP_DONE is configured is 'cdt-picker-color' :

java.lang.NullPointerException
at org.eclipse.nebula.widgets.cdatetime.CDateTime.setPickerForegroundColor(CDateTime.java:2300)
at org.eclipse.nebula.widgets.cdatetime.css.CDateTimePropertyHandler.applyCSSProperty(CDateTimePropertyHandler.java:66)
at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyCSSProperty(AbstractCSSEngine.java:726)
at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyleDeclaration(AbstractCSSEngine.java:536)

Besides, configuring 'cdt-picker-active-day-color' does not seem to have any effect (I take it that the "active day" is the one set in the widget?).

Thanks,
   MP



Am Do., 16. Juli 2020 um 09:45 Uhr schrieb Wim Jongman <wim.jongman@xxxxxxxxx>:
The latest snapshot is available 10 minutes after every commit.


from



On Thu, Jul 16, 2020 at 9:31 AM Matthias Paul Scholz <matthias.paul.scholz@xxxxxxxxx> wrote:
Why, certainly.
Just drop me a note when it's available. 

Am Do., 16. Juli 2020 um 09:21 Uhr schrieb Wim Jongman <wim.jongman@xxxxxxxxx>:
Sure! Matthias, maybe you can take the snapshot release for a spin?

Cheers,

Wim

On Wed, Jul 15, 2020 at 11:16 PM Laurent Caron <laurent.caron@xxxxxxxxx> wrote:
Good Evening,

I'm sorry for the problems found. I've created a bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=565249) and fixed the exception.

Wim, do you think we can create a V2.4.2 release ?

Matthias, for the CLOCK_DISCRETE problem, can you please fill a bug (https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Nebula) and post a sample code.

Regards,

Laurent

Le mer. 15 juil. 2020 à 16:42, Matthias Paul Scholz <matthias.paul.scholz@xxxxxxxxx> a écrit :
Hi, thanks for the patch release (2.4.1).

I tried it with our application.
Good news: the NPE in the CDateTime widget from 2.4.0 is fixed.
Bad news: another NPE occurs  in the CDateTime widget now when configuring the fore ground color for the minutes in the picker (using the CSS-property "cdt-picker-minutes-color"):

java.lang.NullPointerException: null
at org.eclipse.nebula.widgets.cdatetime.CDateTime.setPickerMinutesColor(CDateTime.java:2404) ~[org.eclipse.nebula.widgets.cdatetime_1.4.0.202007101949.jar:na]
at org.eclipse.nebula.widgets.cdatetime.css.CDateTimePropertyHandler.applyCSSProperty(CDateTimePropertyHandler.java:100) ~[org.eclipse.nebula.widgets.cdatetime.css_1.4.0.202007101949.jar:na]
at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyCSSProperty(AbstractCSSEngine.java:726) ~[org.eclipse.e4.ui.css.core_0.12.700.v20190513-2118.jar:na]

Looks like there are usages of the picker instance still in the class that are not checked for null...

Best,
  MP

P.S. Besides, should setting CDT.CLOCK_DISCRETE flag in the CDateTime widget work in 2.4.1?
Regardless whether it is set in the constructor or not, I always get the analog clock.

Am Do., 9. Juli 2020 um 22:58 Uhr schrieb Wim Jongman <wim.jongman@xxxxxxxxx>:
Hi Matthias,

We (Laurent) already fixed this. I will make an intermediate 2.4.1 release for this issue ASAP.

In the meantime you may use the snapshot build.

Cheers,

Wim

On Thu, Jul 9, 2020, 4:51 PM Matthias Paul Scholz <matthias.paul.scholz@xxxxxxxxx> wrote:
Thanks for the new release and in particular  the theming support for various widgets!

Sadly, when switching to the 2.4 in our application (without changing any code)  I instantly ran into a NullPointerException  in the CDateTime widget.

Creating a CDateTime with 

new CDateTime(parent, getStyle() | CDT.DROP_DOWN  | CDT.DATE_MEDIUM | CDT.TIME_MEDIUM | CDT.CLOCK_DISCRETE);

(which worked with 2.3) led to 

 java.lang.NullPointerException
at org.eclipse.nebula.widgets.cdatetime.CDateTime.setBackground(CDateTime.java:2245)
at org.eclipse.e4.ui.css.swt.helpers.CSSSWTColorHelper.setBackground(CSSSWTColorHelper.java:360)
at org.eclipse.e4.ui.css.swt.properties.css2.CSSPropertyBackgroundSWTHandler.applyCSSPropertyBackgroundColor(CSSPropertyBackgroundSWTHandler.java:80)
 
Looks like the picker instance is always null when not using CDT.SIMPLE ...

Best,
  MP
_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/nebula-dev
_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/nebula-dev
_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/nebula-dev
_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/nebula-dev
_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/nebula-dev
_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/nebula-dev
_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/nebula-dev
_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/nebula-dev
_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/nebula-dev
_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/nebula-dev
_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/nebula-dev
_______________________________________________
nebula-dev mailing list
nebula-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/nebula-dev

Back to the top