Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 291084 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/mylyn/internal/context/ui/ContextUiPlugin.java (-6 / +1 lines)
Lines 47-53 Link Here
47
import org.eclipse.mylyn.context.ui.AbstractContextUiBridge;
47
import org.eclipse.mylyn.context.ui.AbstractContextUiBridge;
48
import org.eclipse.mylyn.context.ui.IContextUiStartup;
48
import org.eclipse.mylyn.context.ui.IContextUiStartup;
49
import org.eclipse.mylyn.internal.context.ui.wizards.RetrieveLatestContextDialog;
49
import org.eclipse.mylyn.internal.context.ui.wizards.RetrieveLatestContextDialog;
50
import org.eclipse.mylyn.internal.monitor.ui.MonitorUiPlugin;
51
import org.eclipse.mylyn.internal.provisional.commons.ui.WorkbenchUtil;
50
import org.eclipse.mylyn.internal.provisional.commons.ui.WorkbenchUtil;
52
import org.eclipse.mylyn.monitor.ui.MonitorUi;
51
import org.eclipse.mylyn.monitor.ui.MonitorUi;
53
import org.eclipse.mylyn.tasks.core.ITask;
52
import org.eclipse.mylyn.tasks.core.ITask;
Lines 186-192 Link Here
186
185
187
	private static final ITaskActivationListener TASK_ACTIVATION_LISTENER = new TaskActivationAdapter() {
186
	private static final ITaskActivationListener TASK_ACTIVATION_LISTENER = new TaskActivationAdapter() {
188
187
189
		@SuppressWarnings({ "restriction" })
188
		@SuppressWarnings( { "restriction" })
190
		@Override
189
		@Override
191
		public void taskActivated(ITask task) {
190
		public void taskActivated(ITask task) {
192
			if (CoreUtil.TEST_MODE) {
191
			if (CoreUtil.TEST_MODE) {
Lines 246-255 Link Here
246
	@SuppressWarnings("restriction")
245
	@SuppressWarnings("restriction")
247
	private void lazyStart(IWorkbench workbench) {
246
	private void lazyStart(IWorkbench workbench) {
248
		try {
247
		try {
249
			MonitorUiPlugin.getDefault()
250
					.getPreferenceStore()
251
					.setValue(MonitorUiPlugin.PREF_USER_ACTIVITY_ENABLED, true);
252
			MonitorUiPlugin.getDefault().savePluginPreferences();
253
			ContextCore.getContextManager().addListener(viewerManager);
248
			ContextCore.getContextManager().addListener(viewerManager);
254
			MonitorUi.addWindowPartListener(contentOutlineManager);
249
			MonitorUi.addWindowPartListener(contentOutlineManager);
255
			perspectiveManager.addManagedPerspective(ITasksUiConstants.ID_PERSPECTIVE_PLANNING);
250
			perspectiveManager.addManagedPerspective(ITasksUiConstants.ID_PERSPECTIVE_PLANNING);
(-)src/org/eclipse/mylyn/internal/tasks/core/TaskActivationHistory.java (+4 lines)
Lines 124-127 Link Here
124
		return history.size();
124
		return history.size();
125
	}
125
	}
126
126
127
	public List<AbstractTask> getHistory() {
128
		return Collections.unmodifiableList(history);
129
	}
130
127
}
131
}
(-)src/org/eclipse/mylyn/internal/tasks/ui/preferences/Messages.java (+18 lines)
Lines 25-30 Link Here
25
		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
25
		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
26
	}
26
	}
27
27
28
	public static String Friday;
29
30
	public static String Monday;
31
32
	public static String Saturday;
33
34
	public static String Sunday;
35
28
	public static String TasksUiPreferencePage_Advanced;
36
	public static String TasksUiPreferencePage_Advanced;
29
37
30
	public static String TasksUiPreferencePage_Browse_;
38
	public static String TasksUiPreferencePage_Browse_;
Lines 41-46 Link Here
41
49
42
	public static String TasksUiPreferencePage_Enable_inactivity_timeouts;
50
	public static String TasksUiPreferencePage_Enable_inactivity_timeouts;
43
51
52
	public static String TasksUiPreferencePage_Enable_Time_Tracking;
53
44
	public static String TasksUiPreferencePage_Error_applying_Task_List_data_directory_changes;
54
	public static String TasksUiPreferencePage_Error_applying_Task_List_data_directory_changes;
45
55
46
	public static String TasksUiPreferencePage_Folder_Selection;
56
	public static String TasksUiPreferencePage_Folder_Selection;
Lines 79-87 Link Here
79
89
80
	public static String TasksUiPreferencePage_Task_Timing;
90
	public static String TasksUiPreferencePage_Task_Timing;
81
91
92
	public static String TasksUiPreferencePage_Track_Time_Spent;
93
82
	public static String TasksUiPreferencePage_Use_the_Restore_dialog_to_recover_missing_tasks;
94
	public static String TasksUiPreferencePage_Use_the_Restore_dialog_to_recover_missing_tasks;
83
95
84
	public static String TasksUiPreferencePage_Web_Browser;
96
	public static String TasksUiPreferencePage_Web_Browser;
85
97
86
	public static String TasksUiPreferencePage_Week_Start;
98
	public static String TasksUiPreferencePage_Week_Start;
99
100
	public static String Thursday;
101
102
	public static String Tuesday;
103
104
	public static String Wednesday;
87
}
105
}
(-)src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java (-229 / +50 lines)
Lines 99-104 Link Here
99
99
100
	private Combo weekStartCombo;
100
	private Combo weekStartCombo;
101
101
102
	private Button activityTrackingEnabledButton;
103
102
	public TasksUiPreferencePage() {
104
	public TasksUiPreferencePage() {
103
		super();
105
		super();
104
		setPreferenceStore(TasksUiPlugin.getDefault().getPreferenceStore());
106
		setPreferenceStore(TasksUiPlugin.getDefault().getPreferenceStore());
Lines 112-131 Link Here
112
		GridLayout layout = new GridLayout(1, false);
114
		GridLayout layout = new GridLayout(1, false);
113
		container.setLayout(layout);
115
		container.setLayout(layout);
114
116
115
		if (getContainer() instanceof IWorkbenchPreferenceContainer) {
116
			String message = Messages.TasksUiPreferencePage_See_X_for_configuring_Task_List_colors;
117
			new PreferenceLinkArea(container, SWT.NONE, "org.eclipse.ui.preferencePages.ColorsAndFonts", message, //$NON-NLS-1$
118
					(IWorkbenchPreferenceContainer) getContainer(), null);
119
		}
120
121
		createTaskRefreshScheduleGroup(container);
117
		createTaskRefreshScheduleGroup(container);
122
		createSchedulingGroup(container);
118
		createSchedulingGroup(container);
123
		createOpenWith(container);
119
		createOpenWith(container);
120
		createTaskActivityGroup(container);
124
		Composite advanced = createAdvancedSection(container);
121
		Composite advanced = createAdvancedSection(container);
125
		createTaskActivityGroup(advanced);
126
		createTaskDataControl(advanced);
122
		createTaskDataControl(advanced);
127
		createLinks(container);
128
123
124
		if (getContainer() instanceof IWorkbenchPreferenceContainer) {
125
			String message = Messages.TasksUiPreferencePage_See_X_for_configuring_Task_List_colors;
126
			new PreferenceLinkArea(advanced, SWT.NONE, "org.eclipse.ui.preferencePages.ColorsAndFonts", message, //$NON-NLS-1$
127
					(IWorkbenchPreferenceContainer) getContainer(), null);
128
		}
129
130
		createLinks(advanced);
129
		updateRefreshGroupEnablements();
131
		updateRefreshGroupEnablements();
130
		applyDialogFont(container);
132
		applyDialogFont(container);
131
		return container;
133
		return container;
Lines 199-205 Link Here
199
				timeoutEnabledButton.getSelection());
201
				timeoutEnabledButton.getSelection());
200
		MonitorUiPlugin.getDefault().getPreferenceStore().setValue(ActivityContextManager.ACTIVITY_TIMEOUT,
202
		MonitorUiPlugin.getDefault().getPreferenceStore().setValue(ActivityContextManager.ACTIVITY_TIMEOUT,
201
				timeoutMinutes.getSelection() * (60 * 1000));
203
				timeoutMinutes.getSelection() * (60 * 1000));
202
		//backupNow.setEnabled(true);
204
205
		MonitorUiPlugin.getDefault().getPreferenceStore().setValue(MonitorUiPlugin.ACTIVITY_TRACKING_ENABLED,
206
				activityTrackingEnabledButton.getSelection());
203
207
204
		String taskDirectory = taskDirectoryText.getText();
208
		String taskDirectory = taskDirectoryText.getText();
205
		taskDirectory = taskDirectory.replaceAll(BACKSLASH_MULTI, FORWARDSLASH);
209
		taskDirectory = taskDirectory.replaceAll(BACKSLASH_MULTI, FORWARDSLASH);
Lines 262-267 Link Here
262
		timeoutMinutes.setSelection(minutes);
266
		timeoutMinutes.setSelection(minutes);
263
		timeoutEnabledButton.setSelection(MonitorUiPlugin.getDefault().getPreferenceStore().getBoolean(
267
		timeoutEnabledButton.setSelection(MonitorUiPlugin.getDefault().getPreferenceStore().getBoolean(
264
				ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED));
268
				ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED));
269
270
		activityTrackingEnabledButton.setSelection(MonitorUiPlugin.getDefault().getPreferenceStore().getBoolean(
271
				MonitorUiPlugin.ACTIVITY_TRACKING_ENABLED));
272
265
		return true;
273
		return true;
266
	}
274
	}
267
275
Lines 306-311 Link Here
306
		timeoutMinutes.setSelection(activityTimeoutMinutes);
314
		timeoutMinutes.setSelection(activityTimeoutMinutes);
307
		timeoutEnabledButton.setSelection(MonitorUiPlugin.getDefault().getPreferenceStore().getDefaultBoolean(
315
		timeoutEnabledButton.setSelection(MonitorUiPlugin.getDefault().getPreferenceStore().getDefaultBoolean(
308
				ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED));
316
				ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED));
317
318
		activityTrackingEnabledButton.setSelection(MonitorUiPlugin.getDefault().getPreferenceStore().getDefaultBoolean(
319
				MonitorUiPlugin.ACTIVITY_TRACKING_ENABLED));
320
309
		updateRefreshGroupEnablements();
321
		updateRefreshGroupEnablements();
310
	}
322
	}
311
323
Lines 413-466 Link Here
413
425
414
				if (taskDataDirectoryAction != IDialogConstants.CANCEL_ID) {
426
				if (taskDataDirectoryAction != IDialogConstants.CANCEL_ID) {
415
					taskDirectoryText.setText(dir);
427
					taskDirectoryText.setText(dir);
416
//					backupFolderText.setText(dir + FORWARDSLASH + ITasksCoreConstants.DEFAULT_BACKUP_FOLDER_NAME);
417
//					backupNow.setEnabled(false);
418
				}
428
				}
419
			}
429
			}
420
430
421
		});
431
		});
422
432
423
//		Composite backupComposite = new Composite(taskDataGroup, SWT.NULL);
424
//		gridLayout = new GridLayout(5, false);
425
//		gridLayout.marginWidth = 0;
426
//		gridLayout.marginHeight = 0;
427
//		backupComposite.setLayout(gridLayout);
428
//		backupComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
429
430
//		label = new Label(backupComposite, SWT.NULL);
431
//		label.setText("Backup every");
432
//		backupScheduleTimeText = new Text(backupComposite, SWT.BORDER | SWT.RIGHT);
433
//		final GridData gridData_1 = new GridData();
434
//		gridData_1.widthHint = 13;
435
//		backupScheduleTimeText.setLayoutData(gridData_1);
436
//
437
//		backupScheduleTimeText.setText("" + getPreferenceStore().getInt(TasksUiPreferenceConstants.BACKUP_SCHEDULE));
438
//		backupScheduleTimeText.addModifyListener(new ModifyListener() {
439
//			public void modifyText(ModifyEvent e) {
440
//				updateRefreshGroupEnablements();
441
//			}
442
//		});
443
//
444
//		label = new Label(backupComposite, SWT.NONE);
445
//		label.setText("days to");
446
447
//		String backupDirectory = TasksUiPlugin.getDefault().getBackupFolderPath();// getPreferenceStore().getString(TaskListPreferenceConstants.BACKUP_FOLDER);
448
//		backupDirectory = backupDirectory.replaceAll(BACKSLASH_MULTI, FORWARDSLASH);
449
//		backupFolderText = new Text(backupComposite, SWT.BORDER);
450
//		backupFolderText.setText(backupDirectory);
451
//		backupFolderText.setEditable(false);
452
//		backupFolderText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
453
//
454
//		backupNow = new Button(backupComposite, SWT.NONE);
455
//		backupNow.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
456
//		backupNow.setText("Backup Now");
457
//		backupNow.addSelectionListener(new SelectionAdapter() {
458
//
459
//			@Override
460
//			public void widgetSelected(SelectionEvent e) {
461
//				TasksUiPlugin.getBackupManager().backupNow(true);
462
//			}
463
//		});
464
	}
433
	}
465
434
466
	private void createSchedulingGroup(Composite container) {
435
	private void createSchedulingGroup(Composite container) {
Lines 485-555 Link Here
485
		weekStartCombo.add(CommonMessages.Saturday);
454
		weekStartCombo.add(CommonMessages.Saturday);
486
		weekStartCombo.select(getPreferenceStore().getInt(ITasksUiPreferenceConstants.WEEK_START_DAY) - 1);
455
		weekStartCombo.select(getPreferenceStore().getInt(ITasksUiPreferenceConstants.WEEK_START_DAY) - 1);
487
456
488
//		 Label workWeekBeginLabel = new Label(group, SWT.NONE);
489
//		 workWeekBeginLabel.setText(START_DAY_LABEL);
490
//		 workWeekBegin = new Combo(group, SWT.READ_ONLY);
491
//		 // Calendar.SUNDAY = 1
492
//		 workWeekBegin.add("SUNDAY");
493
//		 workWeekBegin.add("MONDAY");
494
//		 workWeekBegin.add("TUESDAY");
495
//		 workWeekBegin.add("WEDNESDAY");
496
//		 workWeekBegin.add("THURSDAY");
497
//		 workWeekBegin.add("FRIDAY");
498
//		 workWeekBegin.add("SATURDAY");
499
//		 workWeekBegin.select(getPreferenceStore().getInt(TaskListPreferenceConstants.PLANNING_STARTDAY)
500
//		 - 1);
501
502
//		 Label workWeekEndLabel = new Label(group, SWT.NONE);
503
//		 workWeekEndLabel.setText(END_DAY_LABEL);
504
//		 workWeekEnd = new Combo(group, SWT.READ_ONLY);
505
//		 workWeekEnd.add("SUNDAY");
506
//		 workWeekEnd.add("MONDAY");
507
//		 workWeekEnd.add("TUESDAY");
508
//		 workWeekEnd.add("WEDNESDAY");
509
//		 workWeekEnd.add("THURSDAY");
510
//		 workWeekEnd.add("FRIDAY");
511
//		 workWeekEnd.add("SATURDAY");
512
//		 workWeekEnd.select(getPreferenceStore().getInt(TaskListPreferenceConstants.PLANNING_ENDDAY)
513
//		 - 1);
514
515
//		Label hourDayStartLabel = new Label(group, SWT.NONE);
516
//		hourDayStartLabel.setText(START_HOUR_LABEL);
517
//		hourDayStart = new Spinner(group, SWT.BORDER);
518
//		hourDayStart.setDigits(0);
519
//		hourDayStart.setIncrement(1);
520
//		hourDayStart.setMaximum(23);
521
//		hourDayStart.setMinimum(0);
522
//		hourDayStart.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_STARTHOUR));
523
//		hourDayStart.addSelectionListener(new SelectionAdapter() {
524
//
525
//			@Override
526
//			public void widgetSelected(SelectionEvent e) {
527
//				updateRefreshGroupEnablements();
528
//			}
529
//
530
//		});
531
//
532
//		Label spacer = new Label(group, SWT.NONE);
533
//		GridDataFactory.fillDefaults().hint(40, SWT.DEFAULT).applyTo(spacer);
534
//
535
//		Label hourDayEndLabel = new Label(group, SWT.NONE);
536
//		hourDayEndLabel.setText(END_HOUR_LABEL);
537
//
538
//		hourDayEnd = new Spinner(group, SWT.BORDER);
539
//		hourDayEnd.setDigits(0);
540
//		hourDayEnd.setIncrement(1);
541
//		hourDayEnd.setMaximum(23);
542
//		hourDayEnd.setMinimum(0);
543
//		hourDayEnd.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR));
544
//		hourDayEnd.addSelectionListener(new SelectionAdapter() {
545
//
546
//			@Override
547
//			public void widgetSelected(SelectionEvent e) {
548
//				updateRefreshGroupEnablements();
549
//			}
550
//
551
//		});
552
553
	}
457
	}
554
458
555
	private void createTaskActivityGroup(Composite container) {
459
	private void createTaskActivityGroup(Composite container) {
Lines 558-566 Link Here
558
		group.setLayout(new GridLayout(3, false));
462
		group.setLayout(new GridLayout(3, false));
559
		group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
463
		group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
560
464
465
		boolean activityTrackingEnabled = MonitorUiPlugin.getDefault().getPreferenceStore().getBoolean(
466
				MonitorUiPlugin.ACTIVITY_TRACKING_ENABLED);
467
561
		boolean timeoutEnabled = MonitorUiPlugin.getDefault().getPreferenceStore().getBoolean(
468
		boolean timeoutEnabled = MonitorUiPlugin.getDefault().getPreferenceStore().getBoolean(
562
				ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED);
469
				ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED);
563
470
471
		activityTrackingEnabledButton = new Button(group, SWT.CHECK);
472
		activityTrackingEnabledButton.setText(Messages.TasksUiPreferencePage_Enable_Time_Tracking);
473
		activityTrackingEnabledButton.setSelection(activityTrackingEnabled);
474
		activityTrackingEnabledButton.setToolTipText(Messages.TasksUiPreferencePage_Track_Time_Spent);
475
		activityTrackingEnabledButton.addSelectionListener(new SelectionAdapter() {
476
			@Override
477
			public void widgetSelected(SelectionEvent e) {
478
				updateRefreshGroupEnablements();
479
			}
480
		});
481
		GridDataFactory.swtDefaults().span(3, 1).applyTo(activityTrackingEnabledButton);
482
564
		timeoutEnabledButton = new Button(group, SWT.CHECK);
483
		timeoutEnabledButton = new Button(group, SWT.CHECK);
565
		timeoutEnabledButton.setText(Messages.TasksUiPreferencePage_Enable_inactivity_timeouts);
484
		timeoutEnabledButton.setText(Messages.TasksUiPreferencePage_Enable_inactivity_timeouts);
566
		timeoutEnabledButton.setSelection(timeoutEnabled);
485
		timeoutEnabledButton.setSelection(timeoutEnabled);
Lines 596-711 Link Here
596
		timeoutLabel = new Label(group, SWT.NONE);
515
		timeoutLabel = new Label(group, SWT.NONE);
597
		timeoutLabel.setText(Messages.TasksUiPreferencePage_minutes_of_inactivity);
516
		timeoutLabel.setText(Messages.TasksUiPreferencePage_minutes_of_inactivity);
598
517
599
//		Label spacer = new Label(group, SWT.NONE);
518
	}
600
//		GridDataFactory.fillDefaults().hint(40, SWT.DEFAULT).applyTo(spacer);
601
//
602
//		Label hourDayEndLabel = new Label(group, SWT.NONE);
603
//		hourDayEndLabel.setText(END_HOUR_LABEL);
604
//
605
//		hourDayEnd = new Spinner(group, SWT.BORDER);
606
//		hourDayEnd.setDigits(0);
607
//		hourDayEnd.setIncrement(1);
608
//		hourDayEnd.setMaximum(23);
609
//		hourDayEnd.setMinimum(0);
610
//		hourDayEnd.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR));
611
//		hourDayEnd.addSelectionListener(new SelectionAdapter() {
612
//
613
//			@Override
614
//			public void widgetSelected(SelectionEvent e) {
615
//				updateRefreshGroupEnablements();
616
//			}
617
//
618
//		});
619
620
	}
621
622
//	private void createSchedulingGroup(Composite container) {
623
//		Group group = new Group(container, SWT.SHADOW_ETCHED_IN);
624
//		group.setText(GROUP_WORK_WEEK_LABEL);
625
//		group.setLayout(new GridLayout(5, false));
626
//		group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
627
//
628
//		// Label workWeekBeginLabel = new Label(group, SWT.NONE);
629
//		// workWeekBeginLabel.setText(START_DAY_LABEL);
630
//		// workWeekBegin = new Combo(group, SWT.READ_ONLY);
631
//		// // Calendar.SUNDAY = 1
632
//		// workWeekBegin.add("SUNDAY");
633
//		// workWeekBegin.add("MONDAY");
634
//		// workWeekBegin.add("TUESDAY");
635
//		// workWeekBegin.add("WEDNESDAY");
636
//		// workWeekBegin.add("THURSDAY");
637
//		// workWeekBegin.add("FRIDAY");
638
//		// workWeekBegin.add("SATURDAY");
639
//		// workWeekBegin.select(getPreferenceStore().getInt(TaskListPreferenceConstants.PLANNING_STARTDAY)
640
//		// - 1);
641
//		//		
642
//		// Label workWeekEndLabel = new Label(group, SWT.NONE);
643
//		// workWeekEndLabel.setText(END_DAY_LABEL);
644
//		// workWeekEnd = new Combo(group, SWT.READ_ONLY);
645
//		// workWeekEnd.add("SUNDAY");
646
//		// workWeekEnd.add("MONDAY");
647
//		// workWeekEnd.add("TUESDAY");
648
//		// workWeekEnd.add("WEDNESDAY");
649
//		// workWeekEnd.add("THURSDAY");
650
//		// workWeekEnd.add("FRIDAY");
651
//		// workWeekEnd.add("SATURDAY");
652
//		// workWeekEnd.select(getPreferenceStore().getInt(TaskListPreferenceConstants.PLANNING_ENDDAY)
653
//		// - 1);
654
//
655
//		Label hourDayStartLabel = new Label(group, SWT.NONE);
656
//		hourDayStartLabel.setText(START_HOUR_LABEL);
657
//		hourDayStart = new Spinner(group, SWT.BORDER);
658
//		hourDayStart.setDigits(0);
659
//		hourDayStart.setIncrement(1);
660
//		hourDayStart.setMaximum(23);
661
//		hourDayStart.setMinimum(0);
662
//		hourDayStart.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_STARTHOUR));
663
//		hourDayStart.addSelectionListener(new SelectionAdapter() {
664
//
665
//			@Override
666
//			public void widgetSelected(SelectionEvent e) {
667
//				updateRefreshGroupEnablements();
668
//			}
669
//
670
//		});
671
//
672
//		Label spacer = new Label(group, SWT.NONE);
673
//		GridDataFactory.fillDefaults().hint(40, SWT.DEFAULT).applyTo(spacer);
674
//
675
//		Label hourDayEndLabel = new Label(group, SWT.NONE);
676
//		hourDayEndLabel.setText(END_HOUR_LABEL);
677
//
678
//		hourDayEnd = new Spinner(group, SWT.BORDER);
679
//		hourDayEnd.setDigits(0);
680
//		hourDayEnd.setIncrement(1);
681
//		hourDayEnd.setMaximum(23);
682
//		hourDayEnd.setMinimum(0);
683
//		hourDayEnd.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR));
684
//		hourDayEnd.addSelectionListener(new SelectionAdapter() {
685
//
686
//			@Override
687
//			public void widgetSelected(SelectionEvent e) {
688
//				updateRefreshGroupEnablements();
689
//			}
690
//
691
//		});
692
//
693
//	}
694
519
695
	public void updateRefreshGroupEnablements() {
520
	public void updateRefreshGroupEnablements() {
696
		String errorMessage = null;
521
		String errorMessage = null;
697
522
698
//		try {
699
//			long number = Integer.parseInt(backupScheduleTimeText.getText());
700
//			if (number <= 0) {
701
//				errorMessage = "Backup schedule time must be > 0";
702
//			} else if (backupFolderText.getText() == "") {
703
//				errorMessage = "Backup destination folder must be specified";
704
//			}
705
//		} catch (NumberFormatException e) {
706
//			errorMessage = "Backup schedule time must be valid integer";
707
//		}
708
709
		if (enableBackgroundSynch.getSelection()) {
523
		if (enableBackgroundSynch.getSelection()) {
710
			try {
524
			try {
711
				long number = Long.parseLong(synchScheduleTime.getText());
525
				long number = Long.parseLong(synchScheduleTime.getText());
Lines 717-732 Link Here
717
			}
531
			}
718
		}
532
		}
719
533
720
//		if (hourDayEnd.getSelection() <= hourDayStart.getSelection()) {
721
//			errorMessage = "Planning: Work day start must be before end.";
722
//		}
723
724
		setErrorMessage(errorMessage);
534
		setErrorMessage(errorMessage);
725
		setValid(errorMessage == null);
535
		setValid(errorMessage == null);
726
536
727
		synchScheduleTime.setEnabled(enableBackgroundSynch.getSelection());
537
		if (activityTrackingEnabledButton.getSelection()) {
538
539
			timeoutEnabledButton.setEnabled(true);
540
541
			synchScheduleTime.setEnabled(enableBackgroundSynch.getSelection());
728
542
729
		timeoutMinutes.setEnabled(timeoutEnabledButton.getSelection());
543
			timeoutMinutes.setEnabled(timeoutEnabledButton.getSelection());
544
		} else {
545
			timeoutEnabledButton.setEnabled(false);
546
547
			synchScheduleTime.setEnabled(false);
548
549
			timeoutMinutes.setEnabled(false);
550
		}
730
551
731
	}
552
	}
732
553
(-)src/org/eclipse/mylyn/internal/tasks/ui/preferences/messages.properties (-1 / +10 lines)
Lines 1-3 Link Here
1
Monday=
2
Saturday=
3
Sunday=
1
###############################################################################
4
###############################################################################
2
# Copyright (c) 2009 Tasktop Technologies and others.
5
# Copyright (c) 2009 Tasktop Technologies and others.
3
# All rights reserved. This program and the accompanying materials
6
# All rights reserved. This program and the accompanying materials
Lines 8-13 Link Here
8
# Contributors:
11
# Contributors:
9
#      Tasktop Technologies - initial API and implementation
12
#      Tasktop Technologies - initial API and implementation
10
###############################################################################
13
###############################################################################
14
Friday=
11
TasksUiPreferencePage_Advanced=Advanced
15
TasksUiPreferencePage_Advanced=Advanced
12
TasksUiPreferencePage_Browse_=Browse...
16
TasksUiPreferencePage_Browse_=Browse...
13
TasksUiPreferencePage_Change_data_directory=Change data directory
17
TasksUiPreferencePage_Change_data_directory=Change data directory
Lines 16-21 Link Here
16
TasksUiPreferencePage_Destination_folder_does_not_exist=Destination folder does not exist.
20
TasksUiPreferencePage_Destination_folder_does_not_exist=Destination folder does not exist.
17
TasksUiPreferencePage_Display_notifications_for_overdue_tasks_and_incoming_changes=Display notifications for overdue tasks and incoming changes
21
TasksUiPreferencePage_Display_notifications_for_overdue_tasks_and_incoming_changes=Display notifications for overdue tasks and incoming changes
18
TasksUiPreferencePage_Enable_inactivity_timeouts=Enable inactivity timeouts
22
TasksUiPreferencePage_Enable_inactivity_timeouts=Enable inactivity timeouts
23
TasksUiPreferencePage_Enable_Time_Tracking=Enable Time Tracking  (track time spent within Eclipse when a task is active)
19
TasksUiPreferencePage_Error_applying_Task_List_data_directory_changes=Error applying Task List data directory changes. The previous setting will be restored.
24
TasksUiPreferencePage_Error_applying_Task_List_data_directory_changes=Error applying Task List data directory changes. The previous setting will be restored.
20
TasksUiPreferencePage_Folder_Selection=Folder Selection
25
TasksUiPreferencePage_Folder_Selection=Folder Selection
21
TasksUiPreferencePage_If_disabled=If disabled, time accumulates while a task is active with no timeout due to inactivity.
26
TasksUiPreferencePage_If_disabled=If disabled, time accumulates while a task is active with no timeout due to inactivity.
Lines 34-40 Link Here
34
TasksUiPreferencePage_Task_Data=Task Data
39
TasksUiPreferencePage_Task_Data=Task Data
35
TasksUiPreferencePage_Task_Data_Directory_Error=Task Data Directory Error
40
TasksUiPreferencePage_Task_Data_Directory_Error=Task Data Directory Error
36
TasksUiPreferencePage_Task_Editing=Task Editing
41
TasksUiPreferencePage_Task_Editing=Task Editing
37
TasksUiPreferencePage_Task_Timing=Task Timing
42
TasksUiPreferencePage_Task_Timing=Time Tracking
43
TasksUiPreferencePage_Track_Time_Spent=Track time spent within Eclipse when a task is active
38
TasksUiPreferencePage_Use_the_Restore_dialog_to_recover_missing_tasks=Use the Restore dialog to recover missing tasks
44
TasksUiPreferencePage_Use_the_Restore_dialog_to_recover_missing_tasks=Use the Restore dialog to recover missing tasks
39
TasksUiPreferencePage_Web_Browser=Web Browser
45
TasksUiPreferencePage_Web_Browser=Web Browser
40
TasksUiPreferencePage_Week_Start=Week Start:
46
TasksUiPreferencePage_Week_Start=Week Start:
47
Thursday=
48
Tuesday=
49
Wednesday=
(-)src/org/eclipse/mylyn/internal/tasks/ui/editors/PlanningPart.java (-22 / +32 lines)
Lines 21-26 Link Here
21
import org.eclipse.jface.text.ITextListener;
21
import org.eclipse.jface.text.ITextListener;
22
import org.eclipse.jface.text.TextEvent;
22
import org.eclipse.jface.text.TextEvent;
23
import org.eclipse.mylyn.commons.core.DateUtil;
23
import org.eclipse.mylyn.commons.core.DateUtil;
24
import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
25
import org.eclipse.mylyn.internal.monitor.ui.MonitorUiPlugin;
24
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
26
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
25
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonTextSupport;
27
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonTextSupport;
26
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonUiUtil;
28
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonUiUtil;
Lines 67-72 Link Here
67
import org.eclipse.ui.forms.events.HyperlinkAdapter;
69
import org.eclipse.ui.forms.events.HyperlinkAdapter;
68
import org.eclipse.ui.forms.events.HyperlinkEvent;
70
import org.eclipse.ui.forms.events.HyperlinkEvent;
69
import org.eclipse.ui.forms.widgets.FormToolkit;
71
import org.eclipse.ui.forms.widgets.FormToolkit;
72
import org.eclipse.ui.forms.widgets.Hyperlink;
70
import org.eclipse.ui.forms.widgets.ImageHyperlink;
73
import org.eclipse.ui.forms.widgets.ImageHyperlink;
71
import org.eclipse.ui.forms.widgets.Section;
74
import org.eclipse.ui.forms.widgets.Section;
72
75
Lines 393-407 Link Here
393
396
394
	private void updateElapsedTime() {
397
	private void updateElapsedTime() {
395
		long elapsedTime = TasksUiPlugin.getTaskActivityManager().getElapsedTime(getTask());
398
		long elapsedTime = TasksUiPlugin.getTaskActivityManager().getElapsedTime(getTask());
396
		if (elapsedTime > 0) {
399
//		if (elapsedTime > 0) {
397
			if (actualTimeComposite != null && !actualTimeComposite.isVisible()) {
400
		if (actualTimeComposite != null && !actualTimeComposite.isVisible()) {
398
				actualTimeComposite.setVisible(true);
401
			actualTimeComposite.setVisible(true);
399
			}
402
		}
400
		} else {
403
//		} else {
401
			if (actualTimeComposite != null) {
404
//			if (actualTimeComposite != null) {
402
				actualTimeComposite.setVisible(false);
405
//				actualTimeComposite.setVisible(false);
403
			}
406
//			}
404
		}
407
//		}
405
		String elapsedTimeString = DateUtil.getFormattedDurationShort(elapsedTime);
408
		String elapsedTimeString = DateUtil.getFormattedDurationShort(elapsedTime);
406
		if (elapsedTimeString.equals("")) { //$NON-NLS-1$
409
		if (elapsedTimeString.equals("")) { //$NON-NLS-1$
407
			elapsedTimeString = Messages.TaskEditorPlanningPart_0_SECOUNDS;
410
			elapsedTimeString = Messages.TaskEditorPlanningPart_0_SECOUNDS;
Lines 514-523 Link Here
514
		}
517
		}
515
	}
518
	}
516
519
520
	@SuppressWarnings("restriction")
517
	@Override
521
	@Override
518
	protected void setSection(FormToolkit toolkit, Section section) {
522
	protected void setSection(final FormToolkit toolkit, final Section section) {
519
		if (section.getTextClient() == null) {
523
		if (section.getTextClient() == null) {
520
			Composite toolbarComposite = toolkit.createComposite(section);
524
			final Composite toolbarComposite = toolkit.createComposite(section);
521
			toolbarComposite.setBackground(null);
525
			toolbarComposite.setBackground(null);
522
			RowLayout rowLayout = new RowLayout();
526
			RowLayout rowLayout = new RowLayout();
523
			rowLayout.marginTop = 0;
527
			rowLayout.marginTop = 0;
Lines 525-533 Link Here
525
			rowLayout.center = true;
529
			rowLayout.center = true;
526
			toolbarComposite.setLayout(rowLayout);
530
			toolbarComposite.setLayout(rowLayout);
527
531
528
			createActualTime(toolkit, toolbarComposite);
532
			if (ContextCorePlugin.getDefault().isActivityTrackingEnabled()) {
529
533
				createActualTime(toolkit, toolbarComposite);
530
			fillToolbar(toolbarComposite);
534
			} else {
535
				final Hyperlink link = toolkit.createHyperlink(toolbarComposite, "Enable Time Tracking", SWT.NONE); //$NON-NLS-1$
536
				link.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
537
				link.setBackground(null);
538
				link.addHyperlinkListener(new HyperlinkAdapter() {
539
					@Override
540
					public void linkActivated(HyperlinkEvent e) {
541
						MonitorUiPlugin.getDefault().getPreferenceStore().setValue(
542
								MonitorUiPlugin.ACTIVITY_TRACKING_ENABLED, true);
543
						link.dispose();
544
						createActualTime(toolkit, toolbarComposite);
545
						section.layout();
546
					}
547
				});
548
			}
531
			section.setTextClient(toolbarComposite);
549
			section.setTextClient(toolbarComposite);
532
550
533
		}
551
		}
Lines 535-548 Link Here
535
		super.setSection(toolkit, section);
553
		super.setSection(toolkit, section);
536
	}
554
	}
537
555
538
	private void fillToolbar(Composite parent) {
539
//		if (toolBarManager == null) {
540
//			toolBarManager = new ToolBarManager(SWT.FLAT | SWT.HORIZONTAL);
541
//			toolBarManager.add(new TaskEditorScheduleAction(getTask()));
542
//			toolBarManager.createControl(parent);
543
//		}
544
	}
545
546
	public boolean needsNotes() {
556
	public boolean needsNotes() {
547
		return needsNotes;
557
		return needsNotes;
548
	}
558
	}
(-)src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java (-1 / +36 lines)
Lines 12-17 Link Here
12
package org.eclipse.mylyn.internal.tasks.ui;
12
package org.eclipse.mylyn.internal.tasks.ui;
13
13
14
import java.io.File;
14
import java.io.File;
15
import java.io.StringReader;
16
import java.io.StringWriter;
15
import java.lang.reflect.Field;
17
import java.lang.reflect.Field;
16
import java.lang.reflect.InvocationTargetException;
18
import java.lang.reflect.InvocationTargetException;
17
import java.util.ArrayList;
19
import java.util.ArrayList;
Lines 93-100 Link Here
93
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPageFactory;
95
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPageFactory;
94
import org.eclipse.swt.graphics.Image;
96
import org.eclipse.swt.graphics.Image;
95
import org.eclipse.swt.widgets.Display;
97
import org.eclipse.swt.widgets.Display;
98
import org.eclipse.ui.IMemento;
96
import org.eclipse.ui.IStartup;
99
import org.eclipse.ui.IStartup;
97
import org.eclipse.ui.PlatformUI;
100
import org.eclipse.ui.PlatformUI;
101
import org.eclipse.ui.XMLMemento;
98
import org.eclipse.ui.forms.FormColors;
102
import org.eclipse.ui.forms.FormColors;
99
import org.eclipse.ui.plugin.AbstractUIPlugin;
103
import org.eclipse.ui.plugin.AbstractUIPlugin;
100
import org.eclipse.ui.progress.IProgressService;
104
import org.eclipse.ui.progress.IProgressService;
Lines 110-115 Link Here
110
 */
114
 */
111
public class TasksUiPlugin extends AbstractUIPlugin {
115
public class TasksUiPlugin extends AbstractUIPlugin {
112
116
117
	private static final String PREF_ACTIVATION_HISTORY = "org.eclipse.mylyn.tasks.ui.activation.history";
118
113
	private static final int DELAY_QUERY_REFRESH_ON_STARTUP = 20 * 1000;
119
	private static final int DELAY_QUERY_REFRESH_ON_STARTUP = 20 * 1000;
114
120
115
	private static final int DEFAULT_LINK_PROVIDER_TIMEOUT = 5 * 1000;
121
	private static final int DEFAULT_LINK_PROVIDER_TIMEOUT = 5 * 1000;
Lines 413-418 Link Here
413
						}
419
						}
414
					}
420
					}
415
				}
421
				}
422
423
				// Load Activation History
424
				String historyString = getPreferenceStore().getString(PREF_ACTIVATION_HISTORY);
425
				if (historyString.length() > 0) {
426
					StringReader reader = new StringReader(historyString);
427
					XMLMemento historyMemento = XMLMemento.createReadRoot(reader);
428
					IMemento[] historyItems = historyMemento.getChildren("task"); //$NON-NLS-1$
429
					for (IMemento iMemento : historyItems) {
430
						String handle = iMemento.getString("handle"); //$NON-NLS-1$
431
						if (handle != null) {
432
							AbstractTask activatedTask = taskList.getTask(handle);
433
							if (activatedTask != null) {
434
								taskActivityManager.getTaskActivationHistory().addTask(activatedTask);
435
							}
436
						}
437
					}
438
				}
439
416
				//taskActivityMonitor.reloadActivityTime();
440
				//taskActivityMonitor.reloadActivityTime();
417
			} catch (Throwable t) {
441
			} catch (Throwable t) {
418
				StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
442
				StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
Lines 472-478 Link Here
472
		}
496
		}
473
	}
497
	}
474
498
475
	@SuppressWarnings({ "restriction" })
499
	@SuppressWarnings( { "restriction" })
476
	@Override
500
	@Override
477
	public void start(BundleContext context) throws Exception {
501
	public void start(BundleContext context) throws Exception {
478
		super.start(context);
502
		super.start(context);
Lines 514-519 Link Here
514
			taskList.addChangeListener(taskListExternalizationParticipant);
538
			taskList.addChangeListener(taskListExternalizationParticipant);
515
539
516
			taskActivityManager = new TaskActivityManager(repositoryManager, taskList);
540
			taskActivityManager = new TaskActivityManager(repositoryManager, taskList);
541
517
			taskActivityManager.addActivationListener(taskListExternalizationParticipant);
542
			taskActivityManager.addActivationListener(taskListExternalizationParticipant);
518
543
519
			// initialize
544
			// initialize
Lines 677-682 Link Here
677
	@Override
702
	@Override
678
	public void stop(BundleContext context) throws Exception {
703
	public void stop(BundleContext context) throws Exception {
679
		try {
704
		try {
705
706
			XMLMemento history = XMLMemento.createWriteRoot(PREF_ACTIVATION_HISTORY);
707
			for (AbstractTask task : taskActivityManager.getTaskActivationHistory().getHistory()) {
708
				IMemento mem = history.createChild("task"); //$NON-NLS-1$
709
				mem.putString("handle", task.getHandleIdentifier()); //$NON-NLS-1$
710
			}
711
			StringWriter writer = new StringWriter();
712
			history.save(writer);
713
			getPreferenceStore().setValue(PREF_ACTIVATION_HISTORY, writer.toString());
714
680
			if (formColors != null) {
715
			if (formColors != null) {
681
				formColors.dispose();
716
				formColors.dispose();
682
				formColors = null;
717
				formColors = null;
(-)src/org/eclipse/mylyn/internal/tasks/ui/ActivityExternalizationParticipant.java (-1 / +2 lines)
Lines 47-53 Link Here
47
		Assert.isNotNull(context);
47
		Assert.isNotNull(context);
48
		switch (context.getKind()) {
48
		switch (context.getKind()) {
49
		case SAVE:
49
		case SAVE:
50
			if (ContextCorePlugin.getDefault() != null && ContextCorePlugin.getContextManager() != null) {
50
			if (ContextCorePlugin.getDefault() != null && ContextCorePlugin.getDefault().isActivityTrackingEnabled()
51
					&& ContextCorePlugin.getContextManager() != null) {
51
				setDirty(false);
52
				setDirty(false);
52
				ContextCorePlugin.getContextManager().saveActivityMetaContext();
53
				ContextCorePlugin.getContextManager().saveActivityMetaContext();
53
			}
54
			}
(-)src/org/eclipse/mylyn/internal/tasks/ui/TaskActivityMonitor.java (-1 / +1 lines)
Lines 76-82 Link Here
76
			if (event.getKind().equals(InteractionEvent.Kind.COMMAND)) {
76
			if (event.getKind().equals(InteractionEvent.Kind.COMMAND)) {
77
				if ((event.getDelta().equals(InteractionContextManager.ACTIVITY_DELTA_ACTIVATED))) {
77
				if ((event.getDelta().equals(InteractionContextManager.ACTIVITY_DELTA_ACTIVATED))) {
78
					AbstractTask activatedTask = taskList.getTask(event.getStructureHandle());
78
					AbstractTask activatedTask = taskList.getTask(event.getStructureHandle());
79
					if (activatedTask != null) {
79
					if (activatedTask != null && !isReloading) {
80
						taskActivityManager.getTaskActivationHistory().addTask(activatedTask);
80
						taskActivityManager.getTaskActivationHistory().addTask(activatedTask);
81
						return true;
81
						return true;
82
					}
82
					}
(-)src/org/eclipse/mylyn/internal/context/core/ContextCorePlugin.java (+11 lines)
Lines 64-69 Link Here
64
64
65
	private final InteractionContextScaling commonContextScaling = new InteractionContextScaling();
65
	private final InteractionContextScaling commonContextScaling = new InteractionContextScaling();
66
66
67
	private boolean activityTrackingEnabled;
68
67
	private static final AbstractContextStructureBridge DEFAULT_BRIDGE = new AbstractContextStructureBridge() {
69
	private static final AbstractContextStructureBridge DEFAULT_BRIDGE = new AbstractContextStructureBridge() {
68
70
69
		@Override
71
		@Override
Lines 471-474 Link Here
471
	public IInteractionContextScaling getCommonContextScaling() {
473
	public IInteractionContextScaling getCommonContextScaling() {
472
		return commonContextScaling;
474
		return commonContextScaling;
473
	}
475
	}
476
477
	public void setActivityTrackingEnabled(boolean b) {
478
		this.activityTrackingEnabled = b;
479
	}
480
481
	public boolean isActivityTrackingEnabled() {
482
		return activityTrackingEnabled;
483
	}
484
474
}
485
}
(-)src/org/eclipse/mylyn/internal/monitor/ui/MonitorUiPlugin.java (-11 / +9 lines)
Lines 81-87 Link Here
81
81
82
	public static final String OBFUSCATED_LABEL = "[obfuscated]"; //$NON-NLS-1$
82
	public static final String OBFUSCATED_LABEL = "[obfuscated]"; //$NON-NLS-1$
83
83
84
	public static final String PREF_USER_ACTIVITY_ENABLED = "org.eclipse.mylyn.monitor.user.activity.enabled"; //$NON-NLS-1$
84
	public static final String ACTIVITY_TRACKING_ENABLED = "org.eclipse.mylyn.monitor.activity.tracking.enabled"; //$NON-NLS-1$
85
85
86
	private IWorkbenchWindow launchingWorkbenchWindow = null;
86
	private IWorkbenchWindow launchingWorkbenchWindow = null;
87
87
Lines 91-103 Link Here
91
			if (event.getProperty().equals(ActivityContextManager.ACTIVITY_TIMEOUT)
91
			if (event.getProperty().equals(ActivityContextManager.ACTIVITY_TIMEOUT)
92
					|| event.getProperty().equals(ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED)) {
92
					|| event.getProperty().equals(ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED)) {
93
				updateActivityTimout();
93
				updateActivityTimout();
94
			} else if (event.getProperty().equals(PREF_USER_ACTIVITY_ENABLED)) {
94
			} else if (event.getProperty().equals(ACTIVITY_TRACKING_ENABLED)) {
95
				if (getPreferenceStore().getBoolean(PREF_USER_ACTIVITY_ENABLED)) {
95
				ContextCorePlugin.getDefault().setActivityTrackingEnabled(
96
					activityContextManager.start();
96
						getPreferenceStore().getBoolean(ACTIVITY_TRACKING_ENABLED));
97
				} else {
98
					activityContextManager.stop();
99
				}
100
101
			}
97
			}
102
		}
98
		}
103
99
Lines 145-150 Link Here
145
141
146
		getPreferenceStore().setDefault(ActivityContextManager.ACTIVITY_TIMEOUT, DEFAULT_ACTIVITY_TIMEOUT);
142
		getPreferenceStore().setDefault(ActivityContextManager.ACTIVITY_TIMEOUT, DEFAULT_ACTIVITY_TIMEOUT);
147
		getPreferenceStore().setDefault(ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED, true);
143
		getPreferenceStore().setDefault(ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED, true);
144
		getPreferenceStore().setDefault(ACTIVITY_TRACKING_ENABLED, false);
145
146
		ContextCorePlugin.getDefault().setActivityTrackingEnabled(
147
				getPreferenceStore().getBoolean(ACTIVITY_TRACKING_ENABLED));
148
148
149
		this.activityContextManager = new ActivityContextManager(new ArrayList<AbstractUserActivityMonitor>(0));
149
		this.activityContextManager = new ActivityContextManager(new ArrayList<AbstractUserActivityMonitor>(0));
150
150
Lines 414-422 Link Here
414
414
415
			updateActivityTimout();
415
			updateActivityTimout();
416
416
417
			if (getPreferenceStore().getBoolean(PREF_USER_ACTIVITY_ENABLED)) {
417
			activityContextManager.start();
418
				activityContextManager.start();
419
			}
420
418
421
			getPreferenceStore().addPropertyChangeListener(PROPERTY_LISTENER);
419
			getPreferenceStore().addPropertyChangeListener(PROPERTY_LISTENER);
422
420

Return to bug 291084