View | Details | Raw Unified | Return to bug 299697 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java (-1 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2004, 2009 Tasktop Technologies and others.
2
 * Copyright (c) 2004, 2010 Tasktop Technologies and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 58-63 Link Here
58
58
59
	public static final String EDITOR_TASKS_RICH = "org.eclipse.mylyn.tasks.ui.reporting.open.editor"; //$NON-NLS-1$
59
	public static final String EDITOR_TASKS_RICH = "org.eclipse.mylyn.tasks.ui.reporting.open.editor"; //$NON-NLS-1$
60
60
61
	public static final String EDITOR_CURRENT_LINE_HIGHLIGHT = "org.eclipse.mylyn.tasks.ui.editor.currentLineHighlight"; //$NON-NLS-1$
62
61
	public static final String USE_STRIKETHROUGH_FOR_COMPLETED = "org.eclipse.mylyn.tasks.ui.strikethrough.for.completed"; //$NON-NLS-1$
63
	public static final String USE_STRIKETHROUGH_FOR_COMPLETED = "org.eclipse.mylyn.tasks.ui.strikethrough.for.completed"; //$NON-NLS-1$
62
64
63
	public static final String REPOSITORY_SYNCH_SCHEDULE_ENABLED = "org.eclipse.mylyn.tasks.ui.repositories.synch.schedule"; //$NON-NLS-1$
65
	public static final String REPOSITORY_SYNCH_SCHEDULE_ENABLED = "org.eclipse.mylyn.tasks.ui.repositories.synch.schedule"; //$NON-NLS-1$
(-)src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java (-1 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2004, 2009 Tasktop Technologies and others.
2
 * Copyright (c) 2004, 2010 Tasktop Technologies and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 867-872 Link Here
867
		store.setDefault(ITasksUiPreferenceConstants.NOTIFICATIONS_ENABLED, true);
867
		store.setDefault(ITasksUiPreferenceConstants.NOTIFICATIONS_ENABLED, true);
868
		store.setDefault(ITasksUiPreferenceConstants.FILTER_PRIORITY, PriorityLevel.P5.toString());
868
		store.setDefault(ITasksUiPreferenceConstants.FILTER_PRIORITY, PriorityLevel.P5.toString());
869
		store.setDefault(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH, true);
869
		store.setDefault(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH, true);
870
		store.setDefault(ITasksUiPreferenceConstants.EDITOR_CURRENT_LINE_HIGHLIGHT, false);
870
		store.setDefault(ITasksUiPreferenceConstants.ACTIVATE_WHEN_OPENED, false);
871
		store.setDefault(ITasksUiPreferenceConstants.ACTIVATE_WHEN_OPENED, false);
871
		store.setDefault(ITasksUiPreferenceConstants.SHOW_TRIM, false);
872
		store.setDefault(ITasksUiPreferenceConstants.SHOW_TRIM, false);
872
		// remove preference
873
		// remove preference
(-)src/org/eclipse/mylyn/internal/tasks/ui/preferences/Messages.java (-1 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2004, 2008 Tasktop Technologies and others.
2
 * Copyright (c) 2004, 2010 Tasktop Technologies and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 63-68 Link Here
63
63
64
	public static String TasksUiPreferencePage_A_new_empty_Task_List_will_be_created_in_the_chosen_directory_if_one_does_not_already_exists;
64
	public static String TasksUiPreferencePage_A_new_empty_Task_List_will_be_created_in_the_chosen_directory_if_one_does_not_already_exists;
65
65
66
	public static String TasksUiPreferencePage_highlight_current_line;
67
66
	public static String TasksUiPreferencePage_Rich_Editor__Recommended_;
68
	public static String TasksUiPreferencePage_Rich_Editor__Recommended_;
67
69
68
	public static String TasksUiPreferencePage_Scheduling;
70
	public static String TasksUiPreferencePage_Scheduling;
(-)src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java (-3 / +17 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2004, 2009 Tasktop Technologies and others.
2
 * Copyright (c) 2004, 2010 Tasktop Technologies and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 62-67 Link Here
62
/**
62
/**
63
 * @author Mik Kersten
63
 * @author Mik Kersten
64
 * @author Rob Elves
64
 * @author Rob Elves
65
 * @author David Green
65
 */
66
 */
66
public class TasksUiPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
67
public class TasksUiPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
67
68
Lines 75-80 Link Here
75
76
76
	private Button useRichEditor;
77
	private Button useRichEditor;
77
78
79
	private Button editorHighlightsCurrentLine;
80
78
	private Button useWebBrowser;
81
	private Button useWebBrowser;
79
82
80
	private Text synchScheduleTime = null;
83
	private Text synchScheduleTime = null;
Lines 195-200 Link Here
195
		//getPreferenceStore().setValue(TasksUiPreferenceConstants.BACKUP_SCHEDULE, backupScheduleTimeText.getText());
198
		//getPreferenceStore().setValue(TasksUiPreferenceConstants.BACKUP_SCHEDULE, backupScheduleTimeText.getText());
196
199
197
		getPreferenceStore().setValue(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH, useRichEditor.getSelection());
200
		getPreferenceStore().setValue(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH, useRichEditor.getSelection());
201
		getPreferenceStore().setValue(ITasksUiPreferenceConstants.EDITOR_CURRENT_LINE_HIGHLIGHT,
202
				editorHighlightsCurrentLine.getSelection());
198
		getPreferenceStore().setValue(ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED,
203
		getPreferenceStore().setValue(ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED,
199
				enableBackgroundSynch.getSelection());
204
				enableBackgroundSynch.getSelection());
200
		long miliseconds = 60000 * Long.parseLong(synchScheduleTime.getText());
205
		long miliseconds = 60000 * Long.parseLong(synchScheduleTime.getText());
Lines 260-265 Link Here
260
		//backupFolderText.setText(TasksUiPlugin.getDefault().getBackupFolderPath());
265
		//backupFolderText.setText(TasksUiPlugin.getDefault().getBackupFolderPath());
261
266
262
		useRichEditor.setSelection(getPreferenceStore().getBoolean(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH));
267
		useRichEditor.setSelection(getPreferenceStore().getBoolean(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH));
268
		editorHighlightsCurrentLine.setSelection(getPreferenceStore().getBoolean(
269
				ITasksUiPreferenceConstants.EDITOR_CURRENT_LINE_HIGHLIGHT));
263
270
264
		// synchQueries.setSelection(getPreferenceStore().getBoolean(
271
		// synchQueries.setSelection(getPreferenceStore().getBoolean(
265
		// TaskListPreferenceConstants.REPOSITORY_SYNCH_ON_STARTUP));
272
		// TaskListPreferenceConstants.REPOSITORY_SYNCH_ON_STARTUP));
Lines 273-279 Link Here
273
		weekStartCombo.select(getPreferenceStore().getInt(ITasksUiPreferenceConstants.WEEK_START_DAY) - 1);
280
		weekStartCombo.select(getPreferenceStore().getInt(ITasksUiPreferenceConstants.WEEK_START_DAY) - 1);
274
		//hourDayStart.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_STARTHOUR));
281
		//hourDayStart.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_STARTHOUR));
275
//		hourDayEnd.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR));
282
//		hourDayEnd.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR));
276
		//backupNow.setEnabled(true);
283
//backupNow.setEnabled(true);
277
		int minutes = MonitorUiPlugin.getDefault().getPreferenceStore().getInt(ActivityContextManager.ACTIVITY_TIMEOUT)
284
		int minutes = MonitorUiPlugin.getDefault().getPreferenceStore().getInt(ActivityContextManager.ACTIVITY_TIMEOUT)
278
				/ MS_MINUTES;
285
				/ MS_MINUTES;
279
		timeoutMinutes.setSelection(minutes);
286
		timeoutMinutes.setSelection(minutes);
Lines 308-313 Link Here
308
		//backupScheduleTimeText.setText(getPreferenceStore().getDefaultString(TasksUiPreferenceConstants.BACKUP_SCHEDULE));
315
		//backupScheduleTimeText.setText(getPreferenceStore().getDefaultString(TasksUiPreferenceConstants.BACKUP_SCHEDULE));
309
316
310
		useRichEditor.setSelection(getPreferenceStore().getDefaultBoolean(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH));
317
		useRichEditor.setSelection(getPreferenceStore().getDefaultBoolean(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH));
318
		editorHighlightsCurrentLine.setSelection(getPreferenceStore().getDefaultBoolean(
319
				ITasksUiPreferenceConstants.EDITOR_CURRENT_LINE_HIGHLIGHT));
311
320
312
		taskListTooltipEnabledButton.setSelection(getPreferenceStore().getDefaultBoolean(
321
		taskListTooltipEnabledButton.setSelection(getPreferenceStore().getDefaultBoolean(
313
				ITasksUiPreferenceConstants.TASK_LIST_TOOL_TIPS_ENABLED));
322
				ITasksUiPreferenceConstants.TASK_LIST_TOOL_TIPS_ENABLED));
Lines 383-389 Link Here
383
392
384
	private void createTaskEditorGroup(Composite parent) {
393
	private void createTaskEditorGroup(Composite parent) {
385
		Group container = new Group(parent, SWT.SHADOW_ETCHED_IN);
394
		Group container = new Group(parent, SWT.SHADOW_ETCHED_IN);
386
		container.setLayout(new GridLayout(3, false));
395
		container.setLayout(new GridLayout(2, false));
387
		container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
396
		container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
388
397
389
		container.setText(Messages.TasksUiPreferencePage_Task_Editing);
398
		container.setText(Messages.TasksUiPreferencePage_Task_Editing);
Lines 393-398 Link Here
393
		useWebBrowser = new Button(container, SWT.RADIO);
402
		useWebBrowser = new Button(container, SWT.RADIO);
394
		useWebBrowser.setText(Messages.TasksUiPreferencePage_Web_Browser);
403
		useWebBrowser.setText(Messages.TasksUiPreferencePage_Web_Browser);
395
		useWebBrowser.setSelection(!getPreferenceStore().getBoolean(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH));
404
		useWebBrowser.setSelection(!getPreferenceStore().getBoolean(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH));
405
406
		editorHighlightsCurrentLine = new Button(container, SWT.CHECK);
407
		editorHighlightsCurrentLine.setText(Messages.TasksUiPreferencePage_highlight_current_line);
408
		editorHighlightsCurrentLine.setSelection(getPreferenceStore().getBoolean(
409
				ITasksUiPreferenceConstants.EDITOR_CURRENT_LINE_HIGHLIGHT));
396
	}
410
	}
397
411
398
	private void createTaskDataControl(Composite parent) {
412
	private void createTaskDataControl(Composite parent) {
(-)src/org/eclipse/mylyn/internal/tasks/ui/preferences/messages.properties (-4 / +5 lines)
Lines 1-8 Link Here
1
Monday=
2
Saturday=
3
Sunday=
4
###############################################################################
1
###############################################################################
5
# Copyright (c) 2009 Tasktop Technologies and others.
2
# Copyright (c) 2010 Tasktop Technologies and others.
6
# All rights reserved. This program and the accompanying materials
3
# All rights reserved. This program and the accompanying materials
7
# are made available under the terms of the Eclipse Public License v1.0
4
# are made available under the terms of the Eclipse Public License v1.0
8
# which accompanies this distribution, and is available at
5
# which accompanies this distribution, and is available at
Lines 11-16 Link Here
11
# Contributors:
8
# Contributors:
12
#      Tasktop Technologies - initial API and implementation
9
#      Tasktop Technologies - initial API and implementation
13
###############################################################################
10
###############################################################################
11
Monday=
12
Saturday=
13
Sunday=
14
Friday=
14
Friday=
15
TasksUiPreferencePage_Advanced=Advanced
15
TasksUiPreferencePage_Advanced=Advanced
16
TasksUiPreferencePage_Browse_=Browse...
16
TasksUiPreferencePage_Browse_=Browse...
Lines 27-32 Link Here
27
TasksUiPreferencePage_minutes=minutes
27
TasksUiPreferencePage_minutes=minutes
28
TasksUiPreferencePage_minutes_of_inactivity=minutes of inactivity.
28
TasksUiPreferencePage_minutes_of_inactivity=minutes of inactivity.
29
TasksUiPreferencePage_A_new_empty_Task_List_will_be_created_in_the_chosen_directory_if_one_does_not_already_exists=A new empty Task List will be created in the chosen directory if one does not already exists. Your previous directory and its contents will not be deleted.\n\nProceed?
29
TasksUiPreferencePage_A_new_empty_Task_List_will_be_created_in_the_chosen_directory_if_one_does_not_already_exists=A new empty Task List will be created in the chosen directory if one does not already exists. Your previous directory and its contents will not be deleted.\n\nProceed?
30
TasksUiPreferencePage_highlight_current_line=Highlight current line
30
TasksUiPreferencePage_Rich_Editor__Recommended_=Rich Editor (Recommended)
31
TasksUiPreferencePage_Rich_Editor__Recommended_=Rich Editor (Recommended)
31
TasksUiPreferencePage_Scheduling=Scheduling
32
TasksUiPreferencePage_Scheduling=Scheduling
32
TasksUiPreferencePage_See_X_for_configuring_Task_List_colors=See <a>''{0}''</a> for configuring Task List colors.
33
TasksUiPreferencePage_See_X_for_configuring_Task_List_colors=See <a>''{0}''</a> for configuring Task List colors.
(-)src/org/eclipse/mylyn/wikitext/tasks/ui/editor/MarkupTaskEditorExtension.java (-1 / +10 lines)
Lines 26-31 Link Here
26
import org.eclipse.jface.text.source.IAnnotationHover;
26
import org.eclipse.jface.text.source.IAnnotationHover;
27
import org.eclipse.jface.text.source.ISourceViewer;
27
import org.eclipse.jface.text.source.ISourceViewer;
28
import org.eclipse.jface.text.source.SourceViewer;
28
import org.eclipse.jface.text.source.SourceViewer;
29
import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
30
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
29
import org.eclipse.mylyn.internal.wikitext.tasks.ui.WikiTextTasksUiPlugin;
31
import org.eclipse.mylyn.internal.wikitext.tasks.ui.WikiTextTasksUiPlugin;
30
import org.eclipse.mylyn.internal.wikitext.tasks.ui.util.PlatformUrlHyperlink;
32
import org.eclipse.mylyn.internal.wikitext.tasks.ui.util.PlatformUrlHyperlink;
31
import org.eclipse.mylyn.internal.wikitext.tasks.ui.util.Util;
33
import org.eclipse.mylyn.internal.wikitext.tasks.ui.util.Util;
Lines 70-75 Link Here
70
 * @since 1.0
72
 * @since 1.0
71
 */
73
 */
72
public class MarkupTaskEditorExtension<MarkupLanguageType extends MarkupLanguage> extends AbstractTaskEditorExtension {
74
public class MarkupTaskEditorExtension<MarkupLanguageType extends MarkupLanguage> extends AbstractTaskEditorExtension {
75
73
	/**
76
	/**
74
	 * Provide a means to disable WikiWord linking. This feature is experimental and may be removed in a future release.
77
	 * Provide a means to disable WikiWord linking. This feature is experimental and may be removed in a future release.
75
	 * To enable this feature, set the system property <tt>MarkupTaskEditorExtension.wikiWordDisabled</tt> to
78
	 * To enable this feature, set the system property <tt>MarkupTaskEditorExtension.wikiWordDisabled</tt> to
Lines 395-401 Link Here
395
		}
398
		}
396
399
397
		protected void focusChanged() {
400
		protected void focusChanged() {
398
			if (!super.getBoolean(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE)) {
401
			if (!getCurrentLineHighlightPreference()) {
399
				return;
402
				return;
400
			}
403
			}
401
			boolean newValue = getBoolean(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE);
404
			boolean newValue = getBoolean(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE);
Lines 403-414 Link Here
403
					newValue);
406
					newValue);
404
		}
407
		}
405
408
409
		private boolean getCurrentLineHighlightPreference() {
410
			return TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(
411
					ITasksUiPreferenceConstants.EDITOR_CURRENT_LINE_HIGHLIGHT);
412
		}
413
406
		@Override
414
		@Override
407
		public boolean getBoolean(String name) {
415
		public boolean getBoolean(String name) {
408
			if (AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE.equals(name)) {
416
			if (AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE.equals(name)) {
409
				if (!controlFocused) {
417
				if (!controlFocused) {
410
					return false;
418
					return false;
411
				}
419
				}
420
				return getCurrentLineHighlightPreference();
412
			}
421
			}
413
			if (AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN.equals(name)) {
422
			if (AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN.equals(name)) {
414
				return false;
423
				return false;

Return to bug 299697