Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353211

Summary: [GANTT] _endCalendar field is null
Product: z_Archived Reporter: Wim Jongman <wim.jongman>
Component: NebulaAssignee: Laurent CARON <laurent.caron>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: laurent.caron
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
See Also: https://github.com/eclipse/nebula/pull/124
Whiteboard:

Description Wim Jongman CLA 2011-07-27 10:14:22 EDT
in GanttComposite line 5197 _endCalender field is null;

            final long viewPortStart = temp.getTimeInMillis();
            if (_daysVisible == 0) {
                temp.setTime(_endCalendar.getTime());
            } else {
                temp.add(Calendar.DATE, _daysVisible);
            }

java.lang.NullPointerException
	at org.eclipse.nebula.widgets.ganttchart.GanttComposite.getEventVisibility(GanttComposite.java:5199)
	at org.eclipse.nebula.widgets.ganttchart.GanttComposite.isEventVisible(GanttComposite.java:5109)
	at nl.remain.td.planning.gantt.GanttWorker.updateViewer(GanttWorker.java:653)
	at nl.remain.td.planning.gantt.GanttWorker.updateViewer(GanttWorker.java:519)
	at nl.remain.td.planning.gantt.GanttWorker.updateViewerWithRequestFilter(GanttWorker.java:591)
	at nl.remain.td.planning.gantt.GanttWorker.updateViewer(GanttWorker.java:527)
	at nl.remain.td.planning.gantt.GanttWorker.refresh(GanttWorker.java:97)
	at nl.remain.td.planning.gantt.GanttWorker.setInput(GanttWorker.java:711)
	at nl.remain.td.planning.views.PlanningView.show(PlanningView.java:782)
	at nl.remain.td.planning.handlers.ShowInPlanningViewHandler.execute(ShowInPlanningViewHandler.java:36)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
Comment 1 Wim Jongman CLA 2011-07-27 10:20:32 EDT
this occurs when the view widget is about the be created and is not visible. When the widget is visible then this does not occur.

This is the code invoking it:

//
// Jump to the event if it is not visible

if (!ganttChart.getGanttComposite().isEventVisible(scope,
		ganttChart.getGanttComposite().getVisibleBounds())) {
				ganttChart.getGanttComposite().setDate(scope.getStartDate());
			}
Comment 2 Laurent CARON CLA 2019-09-18 13:13:17 EDT
Bug fixed in nebula V2.3.0