### Eclipse Workspace Patch 1.0 #P org.eclipse.mylyn.tasks.ui Index: src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java =================================================================== RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java,v retrieving revision 1.11 diff -u -r1.11 ITasksUiPreferenceConstants.java --- src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java 2 Dec 2009 20:03:52 -0000 1.11 +++ src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java 15 Jan 2010 01:57:16 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 Tasktop Technologies and others. + * Copyright (c) 2004, 2010 Tasktop Technologies and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -58,6 +58,8 @@ public static final String EDITOR_TASKS_RICH = "org.eclipse.mylyn.tasks.ui.reporting.open.editor"; //$NON-NLS-1$ + public static final String EDITOR_CURRENT_LINE_HIGHLIGHT = "org.eclipse.mylyn.tasks.ui.editor.currentLineHighlight"; //$NON-NLS-1$ + public static final String USE_STRIKETHROUGH_FOR_COMPLETED = "org.eclipse.mylyn.tasks.ui.strikethrough.for.completed"; //$NON-NLS-1$ public static final String REPOSITORY_SYNCH_SCHEDULE_ENABLED = "org.eclipse.mylyn.tasks.ui.repositories.synch.schedule"; //$NON-NLS-1$ Index: src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java =================================================================== RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java,v retrieving revision 1.126 diff -u -r1.126 TasksUiPlugin.java --- src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java 2 Dec 2009 20:03:52 -0000 1.126 +++ src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java 15 Jan 2010 01:57:17 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 Tasktop Technologies and others. + * Copyright (c) 2004, 2010 Tasktop Technologies and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -867,6 +867,7 @@ store.setDefault(ITasksUiPreferenceConstants.NOTIFICATIONS_ENABLED, true); store.setDefault(ITasksUiPreferenceConstants.FILTER_PRIORITY, PriorityLevel.P5.toString()); store.setDefault(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH, true); + store.setDefault(ITasksUiPreferenceConstants.EDITOR_CURRENT_LINE_HIGHLIGHT, false); store.setDefault(ITasksUiPreferenceConstants.ACTIVATE_WHEN_OPENED, false); store.setDefault(ITasksUiPreferenceConstants.SHOW_TRIM, false); // remove preference Index: src/org/eclipse/mylyn/internal/tasks/ui/preferences/Messages.java =================================================================== RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/Messages.java,v retrieving revision 1.3 diff -u -r1.3 Messages.java --- src/org/eclipse/mylyn/internal/tasks/ui/preferences/Messages.java 2 Dec 2009 20:03:51 -0000 1.3 +++ src/org/eclipse/mylyn/internal/tasks/ui/preferences/Messages.java 15 Jan 2010 01:57:17 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2008 Tasktop Technologies and others. + * Copyright (c) 2004, 2010 Tasktop Technologies and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -63,6 +63,8 @@ public static String TasksUiPreferencePage_A_new_empty_Task_List_will_be_created_in_the_chosen_directory_if_one_does_not_already_exists; + public static String TasksUiPreferencePage_highlight_current_line; + public static String TasksUiPreferencePage_Rich_Editor__Recommended_; public static String TasksUiPreferencePage_Scheduling; Index: src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java =================================================================== RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java,v retrieving revision 1.39 diff -u -r1.39 TasksUiPreferencePage.java --- src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java 2 Dec 2009 20:03:52 -0000 1.39 +++ src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java 15 Jan 2010 01:57:18 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 Tasktop Technologies and others. + * Copyright (c) 2004, 2010 Tasktop Technologies and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -62,6 +62,7 @@ /** * @author Mik Kersten * @author Rob Elves + * @author David Green */ public class TasksUiPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { @@ -75,6 +76,8 @@ private Button useRichEditor; + private Button editorHighlightsCurrentLine; + private Button useWebBrowser; private Text synchScheduleTime = null; @@ -195,6 +198,8 @@ //getPreferenceStore().setValue(TasksUiPreferenceConstants.BACKUP_SCHEDULE, backupScheduleTimeText.getText()); getPreferenceStore().setValue(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH, useRichEditor.getSelection()); + getPreferenceStore().setValue(ITasksUiPreferenceConstants.EDITOR_CURRENT_LINE_HIGHLIGHT, + editorHighlightsCurrentLine.getSelection()); getPreferenceStore().setValue(ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED, enableBackgroundSynch.getSelection()); long miliseconds = 60000 * Long.parseLong(synchScheduleTime.getText()); @@ -260,6 +265,8 @@ //backupFolderText.setText(TasksUiPlugin.getDefault().getBackupFolderPath()); useRichEditor.setSelection(getPreferenceStore().getBoolean(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH)); + editorHighlightsCurrentLine.setSelection(getPreferenceStore().getBoolean( + ITasksUiPreferenceConstants.EDITOR_CURRENT_LINE_HIGHLIGHT)); // synchQueries.setSelection(getPreferenceStore().getBoolean( // TaskListPreferenceConstants.REPOSITORY_SYNCH_ON_STARTUP)); @@ -273,7 +280,7 @@ weekStartCombo.select(getPreferenceStore().getInt(ITasksUiPreferenceConstants.WEEK_START_DAY) - 1); //hourDayStart.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_STARTHOUR)); // hourDayEnd.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR)); - //backupNow.setEnabled(true); +//backupNow.setEnabled(true); int minutes = MonitorUiPlugin.getDefault().getPreferenceStore().getInt(ActivityContextManager.ACTIVITY_TIMEOUT) / MS_MINUTES; timeoutMinutes.setSelection(minutes); @@ -308,6 +315,8 @@ //backupScheduleTimeText.setText(getPreferenceStore().getDefaultString(TasksUiPreferenceConstants.BACKUP_SCHEDULE)); useRichEditor.setSelection(getPreferenceStore().getDefaultBoolean(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH)); + editorHighlightsCurrentLine.setSelection(getPreferenceStore().getDefaultBoolean( + ITasksUiPreferenceConstants.EDITOR_CURRENT_LINE_HIGHLIGHT)); taskListTooltipEnabledButton.setSelection(getPreferenceStore().getDefaultBoolean( ITasksUiPreferenceConstants.TASK_LIST_TOOL_TIPS_ENABLED)); @@ -383,7 +392,7 @@ private void createTaskEditorGroup(Composite parent) { Group container = new Group(parent, SWT.SHADOW_ETCHED_IN); - container.setLayout(new GridLayout(3, false)); + container.setLayout(new GridLayout(2, false)); container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); container.setText(Messages.TasksUiPreferencePage_Task_Editing); @@ -393,6 +402,11 @@ useWebBrowser = new Button(container, SWT.RADIO); useWebBrowser.setText(Messages.TasksUiPreferencePage_Web_Browser); useWebBrowser.setSelection(!getPreferenceStore().getBoolean(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH)); + + editorHighlightsCurrentLine = new Button(container, SWT.CHECK); + editorHighlightsCurrentLine.setText(Messages.TasksUiPreferencePage_highlight_current_line); + editorHighlightsCurrentLine.setSelection(getPreferenceStore().getBoolean( + ITasksUiPreferenceConstants.EDITOR_CURRENT_LINE_HIGHLIGHT)); } private void createTaskDataControl(Composite parent) { Index: src/org/eclipse/mylyn/internal/tasks/ui/preferences/messages.properties =================================================================== RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/messages.properties,v retrieving revision 1.7 diff -u -r1.7 messages.properties --- src/org/eclipse/mylyn/internal/tasks/ui/preferences/messages.properties 7 Jan 2010 19:39:08 -0000 1.7 +++ src/org/eclipse/mylyn/internal/tasks/ui/preferences/messages.properties 15 Jan 2010 01:57:18 -0000 @@ -1,8 +1,5 @@ -Monday= -Saturday= -Sunday= ############################################################################### -# Copyright (c) 2009 Tasktop Technologies and others. +# Copyright (c) 2010 Tasktop Technologies and others. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at @@ -11,6 +8,9 @@ # Contributors: # Tasktop Technologies - initial API and implementation ############################################################################### +Monday= +Saturday= +Sunday= Friday= TasksUiPreferencePage_Advanced=Advanced TasksUiPreferencePage_Browse_=Browse... @@ -27,6 +27,7 @@ TasksUiPreferencePage_minutes=minutes TasksUiPreferencePage_minutes_of_inactivity=minutes of inactivity. 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? +TasksUiPreferencePage_highlight_current_line=Highlight current line TasksUiPreferencePage_Rich_Editor__Recommended_=Rich Editor (Recommended) TasksUiPreferencePage_Scheduling=Scheduling TasksUiPreferencePage_See_X_for_configuring_Task_List_colors=See ''{0}'' for configuring Task List colors. #P org.eclipse.mylyn.wikitext.tasks.ui Index: src/org/eclipse/mylyn/wikitext/tasks/ui/editor/MarkupTaskEditorExtension.java =================================================================== RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.wikitext.tasks.ui/src/org/eclipse/mylyn/wikitext/tasks/ui/editor/MarkupTaskEditorExtension.java,v retrieving revision 1.21 diff -u -r1.21 MarkupTaskEditorExtension.java --- src/org/eclipse/mylyn/wikitext/tasks/ui/editor/MarkupTaskEditorExtension.java 18 Dec 2009 16:49:32 -0000 1.21 +++ src/org/eclipse/mylyn/wikitext/tasks/ui/editor/MarkupTaskEditorExtension.java 15 Jan 2010 01:57:20 -0000 @@ -26,6 +26,8 @@ import org.eclipse.jface.text.source.IAnnotationHover; import org.eclipse.jface.text.source.ISourceViewer; import org.eclipse.jface.text.source.SourceViewer; +import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants; +import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin; import org.eclipse.mylyn.internal.wikitext.tasks.ui.WikiTextTasksUiPlugin; import org.eclipse.mylyn.internal.wikitext.tasks.ui.util.PlatformUrlHyperlink; import org.eclipse.mylyn.internal.wikitext.tasks.ui.util.Util; @@ -70,6 +72,7 @@ * @since 1.0 */ public class MarkupTaskEditorExtension extends AbstractTaskEditorExtension { + /** * Provide a means to disable WikiWord linking. This feature is experimental and may be removed in a future release. * To enable this feature, set the system property MarkupTaskEditorExtension.wikiWordDisabled to @@ -395,7 +398,7 @@ } protected void focusChanged() { - if (!super.getBoolean(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE)) { + if (!getCurrentLineHighlightPreference()) { return; } boolean newValue = getBoolean(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE); @@ -403,12 +406,18 @@ newValue); } + private boolean getCurrentLineHighlightPreference() { + return TasksUiPlugin.getDefault().getPreferenceStore().getBoolean( + ITasksUiPreferenceConstants.EDITOR_CURRENT_LINE_HIGHLIGHT); + } + @Override public boolean getBoolean(String name) { if (AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE.equals(name)) { if (!controlFocused) { return false; } + return getCurrentLineHighlightPreference(); } if (AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN.equals(name)) { return false;