+ if (!nit.hasNext()) {
+ Composite noTaskCmp = new Composite(parent, SWT.NO_FOCUS);
+ noTaskCmp.setLayoutData(EclipseUiUtils.fillAll());
+ noTaskCmp.setLayout(new GridLayout());
+
+ Label noTaskLbl = new Label(noTaskCmp, SWT.CENTER);
+ noTaskLbl.setText("<i> <big> You have no pending Task. </big> </i>");
+ CmsUtils.markup(noTaskLbl);
+ noTaskLbl.setLayoutData(new GridData(SWT.CENTER, SWT.BOTTOM, true, true));
+
+ final Link createTaskLk = new Link(noTaskCmp, SWT.CENTER);
+ createTaskLk.setText("<a> Create a task </a>");
+ createTaskLk.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, true, true));
+
+ createTaskLk.addSelectionListener(new SelectionAdapter() {
+ private static final long serialVersionUID = -9028457805156989935L;
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ String mainMixin = TrackerTypes.TRACKER_TASK;
+ String pathCreated = ConnectUiUtils.createAndConfigureEntity(createTaskLk.getShell(), getSession(),
+ getSystemAppService(), getSystemWorkbenchService(), mainMixin);
+ if (EclipseUiUtils.notEmpty(pathCreated))
+ forceRefresh(null);
+ }
+ });
+
+ } else {
+ TaskListLabelProvider labelProvider = new TaskListLabelProvider(trackerService);
+ tvlc = new TaskVirtualListComposite(parent, SWT.NO_FOCUS, labelProvider, 54);
+ tvlc.setLayoutData(EclipseUiUtils.fillAll());
+ tvlc.getTableViewer().setInput(JcrUtils.nodeIteratorToList(nit).toArray());
+ }