Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 152248 Details for
Bug 250257
persist columns in attachments table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
patch250257.txt (text/plain), 22.45 KB, created by
Frank Becker
on 2009-11-15 13:17:23 EST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Frank Becker
Created:
2009-11-15 13:17:23 EST
Size:
22.45 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java,v >retrieving revision 1.43 >diff -u -r1.43 TaskEditorAttachmentPart.java >--- src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java 6 Oct 2009 06:44:06 -0000 1.43 >+++ src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java 15 Nov 2009 18:16:40 -0000 >@@ -13,10 +13,20 @@ > > package org.eclipse.mylyn.internal.tasks.ui.editors; > >+import java.io.File; >+import java.io.FileInputStream; >+import java.io.FileOutputStream; >+import java.io.IOException; >+import java.io.ObjectInputStream; >+import java.io.ObjectOutputStream; > import java.util.ArrayList; > import java.util.Date; > import java.util.List; > >+import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Platform; >+import org.eclipse.core.runtime.Status; > import org.eclipse.jface.action.Action; > import org.eclipse.jface.action.IMenuListener; > import org.eclipse.jface.action.IMenuManager; >@@ -32,8 +42,11 @@ > import org.eclipse.jface.viewers.Viewer; > import org.eclipse.jface.viewers.ViewerSorter; > import org.eclipse.jface.window.ToolTip; >+import org.eclipse.mylyn.commons.core.StatusHandler; > import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages; > import org.eclipse.mylyn.internal.tasks.core.TaskAttachment; >+import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants; >+import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin; > import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiMenus; > import org.eclipse.mylyn.internal.tasks.ui.wizards.TaskAttachmentWizard.Mode; > import org.eclipse.mylyn.tasks.core.ITaskAttachment; >@@ -41,6 +54,8 @@ > import org.eclipse.mylyn.tasks.ui.TasksUiUtil; > import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart; > import org.eclipse.swt.SWT; >+import org.eclipse.swt.events.ControlEvent; >+import org.eclipse.swt.events.ControlListener; > import org.eclipse.swt.events.SelectionAdapter; > import org.eclipse.swt.events.SelectionEvent; > import org.eclipse.swt.layout.GridData; >@@ -65,12 +80,6 @@ > > private static final String ID_POPUP_MENU = "org.eclipse.mylyn.tasks.ui.editor.menu.attachments"; //$NON-NLS-1$ > >- private final String[] attachmentsColumns = { Messages.TaskEditorAttachmentPart_Name, >- Messages.TaskEditorAttachmentPart_Description, /*"Type", */Messages.TaskEditorAttachmentPart_Size, >- Messages.TaskEditorAttachmentPart_Creator, Messages.TaskEditorAttachmentPart_Created }; >- >- private final int[] attachmentsColumnWidths = { 130, 150, /*100,*/70, 100, 100 }; >- > private List<TaskAttribute> attachments; > > private boolean hasIncoming; >@@ -79,6 +88,23 @@ > > private Composite attachmentsComposite; > >+ static ArrayList<ColumnState> columnInfos = new ArrayList<ColumnState>(5); >+ >+ private static boolean propertyListenerIstalled = false; >+ >+ private static org.eclipse.jface.util.IPropertyChangeListener PROPERTY_LISTENER = new org.eclipse.jface.util.IPropertyChangeListener() { >+ >+ public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event) { >+ if (event.getProperty().equals(ITasksUiPreferenceConstants.ATTACHMENT_COLUMN_STD_WIDTH)) { >+ if (TasksUiPlugin.getDefault().getPreferenceStore().getBoolean( >+ ITasksUiPreferenceConstants.ATTACHMENT_COLUMN_STD_WIDTH)) { >+ columnInfos.clear(); >+ readState(); >+ } >+ } >+ } >+ }; >+ > public TaskEditorAttachmentPart() { > setPartName(Messages.TaskEditorAttachmentPart_Attachments); > } >@@ -91,18 +117,37 @@ > GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, false).hint(500, SWT.DEFAULT).applyTo( > attachmentsTable); > attachmentsTable.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TREE_BORDER); >+ boolean showAttachmentID = TasksUiPlugin.getDefault().getPreferenceStore().getBoolean( >+ ITasksUiPreferenceConstants.ATTACHMENT_SHOW_ID); >+ int offset = showAttachmentID ? 0 : -1; >+ for (int i = 0; i < columnInfos.size(); i++) { >+ if (!showAttachmentID && i == 0) { >+ continue; >+ } >+ final int index = i + offset; >+ final TableColumn column = new TableColumn(attachmentsTable, SWT.LEFT, index); >+ column.setText(columnInfos.get(i).getName()); >+ column.setWidth(columnInfos.get(i).getWidths()); >+ column.addControlListener(new ControlListener() { >+ >+ public void controlResized(ControlEvent e) { >+ if (!TasksUiPlugin.getDefault().getPreferenceStore().getBoolean( >+ ITasksUiPreferenceConstants.ATTACHMENT_COLUMN_STD_WIDTH)) { >+ columnInfos.get(index).setWidths(column.getWidth()); >+ writeState(); >+ } >+ } > >- for (int i = 0; i < attachmentsColumns.length; i++) { >- TableColumn column = new TableColumn(attachmentsTable, SWT.LEFT, i); >- column.setText(attachmentsColumns[i]); >- column.setWidth(attachmentsColumnWidths[i]); >+ public void controlMoved(ControlEvent e) { >+ // ignore >+ } >+ }); > } > // size column > attachmentsTable.getColumn(2).setAlignment(SWT.RIGHT); > > TableViewer attachmentsViewer = new TableViewer(attachmentsTable); > attachmentsViewer.setUseHashlookup(true); >- attachmentsViewer.setColumnProperties(attachmentsColumns); > ColumnViewerToolTipSupport.enableFor(attachmentsViewer, ToolTip.NO_RECREATE); > > attachmentsViewer.setSorter(new ViewerSorter() { >@@ -133,7 +178,7 @@ > } > attachmentsViewer.setContentProvider(new ArrayContentProvider()); > attachmentsViewer.setLabelProvider(new AttachmentTableLabelProvider(getModel(), >- getTaskEditorPage().getAttributeEditorToolkit())); >+ getTaskEditorPage().getAttributeEditorToolkit(), offset)); > attachmentsViewer.addOpenListener(new IOpenListener() { > public void open(OpenEvent event) { > if (!event.getSelection().isEmpty()) { >@@ -236,7 +281,79 @@ > super.dispose(); > } > >+ private static void readState() { >+ IPath stateLocation = Platform.getStateLocation(TasksUiPlugin.getDefault().getBundle()); >+ File attachmentStateFile = stateLocation.append("TaskEditorAttachment.obj").toFile(); //$NON-NLS-1$ >+ boolean columnStdWidth = TasksUiPlugin.getDefault().getPreferenceStore().getBoolean( >+ ITasksUiPreferenceConstants.ATTACHMENT_COLUMN_STD_WIDTH); >+ >+ if (!attachmentStateFile.exists() || columnStdWidth) { >+ columnInfos.add(new ColumnState(Messages.TaskEditorAttachmentPart_Id, 70)); >+ columnInfos.add(new ColumnState(Messages.TaskEditorAttachmentPart_Name, 130)); >+ columnInfos.add(new ColumnState(Messages.TaskEditorAttachmentPart_Description, 150)); >+ columnInfos.add(new ColumnState(Messages.TaskEditorAttachmentPart_Size, 70)); >+ columnInfos.add(new ColumnState(Messages.TaskEditorAttachmentPart_Creator, 100)); >+ columnInfos.add(new ColumnState(Messages.TaskEditorAttachmentPart_Created, 100)); >+ } else { >+ ObjectInputStream in = null; >+ try { >+ in = new ObjectInputStream(new FileInputStream(attachmentStateFile)); >+ int size = in.readInt(); >+ for (int i = 0; i < size; i++) { >+ columnInfos.add((ColumnState) in.readObject()); >+ } >+ } catch (Throwable e) { >+ StatusHandler.log(new Status(IStatus.WARNING, TasksUiPlugin.ID_PLUGIN, >+ "The TaskEditorAttachment cache could not be read", e)); >+ } finally { >+ if (in != null) { >+ try { >+ in.close(); >+ } catch (IOException e) { >+ // ignore >+ } >+ } >+ } >+ } >+ } >+ >+ private static void writeState() { >+ IPath stateLocation = Platform.getStateLocation(TasksUiPlugin.getDefault().getBundle()); >+ File attachmentStateFile = stateLocation.append("TaskEditorAttachment.obj").toFile(); //$NON-NLS-1$ >+ >+ if (attachmentStateFile == null) { >+ return; >+ } >+ ObjectOutputStream out = null; >+ try { >+ out = new ObjectOutputStream(new FileOutputStream(attachmentStateFile)); >+ out.writeInt(columnInfos.size()); >+ for (ColumnState col : columnInfos) { >+ out.writeObject(col); >+ } >+ } catch (IOException e) { >+ StatusHandler.log(new Status(IStatus.WARNING, TasksUiPlugin.ID_PLUGIN, >+ "The TaskEditorAttachment cache could not be written", e)); >+ } finally { >+ if (out != null) { >+ try { >+ out.close(); >+ } catch (IOException e) { >+ // ignore >+ } >+ } >+ } >+ >+ } >+ > private void initialize() { >+ if (!propertyListenerIstalled) { >+ TasksUiPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(PROPERTY_LISTENER); >+ propertyListenerIstalled = true; >+ } >+ if (columnInfos.size() == 0) { >+ readState(); >+ } > attachments = getTaskData().getAttributeMapper().getAttributesByType(getTaskData(), > TaskAttribute.TYPE_ATTACHMENT); > for (TaskAttribute attachmentAttribute : attachments) { >Index: src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties,v >retrieving revision 1.34 >diff -u -r1.34 messages.properties >--- src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties 14 Oct 2009 07:17:11 -0000 1.34 >+++ src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties 15 Nov 2009 18:16:40 -0000 >@@ -62,6 +62,7 @@ > TaskEditorAttachmentPart_Created=Created > TaskEditorAttachmentPart_Creator=Creator > TaskEditorAttachmentPart_Description=Description >+TaskEditorAttachmentPart_Id=Id > TaskEditorAttachmentPart_Name=Name > TaskEditorAttachmentPart_No_attachments=No attachments > TaskEditorAttachmentPart_Size=Size >Index: src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentTableLabelProvider.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentTableLabelProvider.java,v >retrieving revision 1.23 >diff -u -r1.23 AttachmentTableLabelProvider.java >--- src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentTableLabelProvider.java 7 Dec 2008 03:26:58 -0000 1.23 >+++ src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentTableLabelProvider.java 15 Nov 2009 18:16:40 -0000 >@@ -46,14 +46,17 @@ > > private final AttributeEditorToolkit attributeEditorToolkit; > >- public AttachmentTableLabelProvider(TaskDataModel model, AttributeEditorToolkit attributeEditorToolkit) { >+ int offset; >+ >+ public AttachmentTableLabelProvider(TaskDataModel model, AttributeEditorToolkit attributeEditorToolkit, int offset) { > this.model = model; > this.attributeEditorToolkit = attributeEditorToolkit; >+ this.offset = offset; > } > > public Image getColumnImage(Object element, int columnIndex) { > ITaskAttachment attachment = (ITaskAttachment) element; >- if (columnIndex == 0) { >+ if (columnIndex == 1 + offset) { > if (AttachmentUtil.isContext(attachment)) { > return CommonImages.getImage(TasksUiImages.CONTEXT_TRANSFER); > } else if (attachment.isPatch()) { >@@ -80,8 +83,16 @@ > > public String getColumnText(Object element, int columnIndex) { > ITaskAttachment attachment = (ITaskAttachment) element; >- switch (columnIndex) { >+ switch (columnIndex - offset) { > case 0: >+ String a = attachment.getUrl(); >+ int i = a.indexOf("?id="); //$NON-NLS-1$ >+ if (i != -1) { >+ return a.substring(i + 4); >+ } else { >+ return ""; //$NON-NLS-1$ >+ } >+ case 1: > if (AttachmentUtil.isContext(attachment)) { > return Messages.AttachmentTableLabelProvider_Task_Context; > } else if (attachment.isPatch()) { >@@ -89,17 +100,17 @@ > } else { > return " " + attachment.getFileName(); //$NON-NLS-1$ > } >- case 1: >- return attachment.getDescription(); > case 2: >+ return attachment.getDescription(); >+ case 3: > Long length = attachment.getLength(); > if (length < 0) { > return "-"; //$NON-NLS-1$ > } > return sizeFormatter.format(length); >- case 3: >- return (attachment.getAuthor() != null) ? attachment.getAuthor().toString() : ""; //$NON-NLS-1$ > case 4: >+ return (attachment.getAuthor() != null) ? attachment.getAuthor().toString() : ""; //$NON-NLS-1$ >+ case 5: > return (attachment.getCreationDate() != null) ? EditorUtil.formatDateTime(attachment.getCreationDate()) > : ""; //$NON-NLS-1$ > } >Index: src/org/eclipse/mylyn/internal/tasks/ui/editors/Messages.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/Messages.java,v >retrieving revision 1.26 >diff -u -r1.26 Messages.java >--- src/org/eclipse/mylyn/internal/tasks/ui/editors/Messages.java 14 Oct 2009 02:54:48 -0000 1.26 >+++ src/org/eclipse/mylyn/internal/tasks/ui/editors/Messages.java 15 Nov 2009 18:16:40 -0000 >@@ -115,6 +115,8 @@ > > public static String TaskEditorAttachmentPart_Description; > >+ public static String TaskEditorAttachmentPart_Id; >+ > public static String TaskEditorAttachmentPart_Name; > > public static String TaskEditorAttachmentPart_No_attachments; >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.2 >diff -u -r1.2 Messages.java >--- src/org/eclipse/mylyn/internal/tasks/ui/preferences/Messages.java 12 Oct 2009 23:14:10 -0000 1.2 >+++ src/org/eclipse/mylyn/internal/tasks/ui/preferences/Messages.java 15 Nov 2009 18:16:40 -0000 >@@ -88,4 +88,11 @@ > public static String TasksUiPreferencePage_Web_Browser; > > public static String TasksUiPreferencePage_Week_Start; >+ >+ public static String TasksUiPreferencePage_Attachment_Table; >+ >+ public static String TasksUiPreferencePage_Attachment_Show_Id; >+ >+ public static String TasksUiPreferencePage_Attachment_Coloumn_Std_Width; >+ > } >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.38 >diff -u -r1.38 TasksUiPreferencePage.java >--- src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java 15 Oct 2009 00:36:23 -0000 1.38 >+++ src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java 15 Nov 2009 18:16:41 -0000 >@@ -75,6 +75,10 @@ > > private Button useRichEditor; > >+ private Button attachmentShowID; >+ >+ private Button attachmentColumnUseStdWidth; >+ > private Button useWebBrowser; > > private Text synchScheduleTime = null; >@@ -122,6 +126,7 @@ > createSchedulingGroup(container); > createOpenWith(container); > createTaskActivityGroup(container); >+ > Composite advanced = createAdvancedSection(container); > createTaskDataControl(advanced); > >@@ -132,6 +137,7 @@ > } > > createLinks(advanced); >+ createAttachmentTable(advanced); > updateRefreshGroupEnablements(); > applyDialogFont(container); > return container; >@@ -237,6 +243,9 @@ > // shouldn't get here > } > } >+ getPreferenceStore().setValue(ITasksUiPreferenceConstants.ATTACHMENT_SHOW_ID, attachmentShowID.getSelection()); >+ getPreferenceStore().setValue(ITasksUiPreferenceConstants.ATTACHMENT_COLUMN_STD_WIDTH, >+ attachmentColumnUseStdWidth.getSelection()); > > return true; > } >@@ -274,6 +283,9 @@ > activityTrackingEnabledButton.setSelection(MonitorUiPlugin.getDefault().getPreferenceStore().getBoolean( > MonitorUiPlugin.ACTIVITY_TRACKING_ENABLED)); > >+ attachmentShowID.setSelection(getPreferenceStore().getBoolean(ITasksUiPreferenceConstants.ATTACHMENT_SHOW_ID)); >+ attachmentColumnUseStdWidth.setSelection(getPreferenceStore().getBoolean( >+ ITasksUiPreferenceConstants.ATTACHMENT_COLUMN_STD_WIDTH)); > return true; > } > >@@ -322,6 +334,11 @@ > activityTrackingEnabledButton.setSelection(MonitorUiPlugin.getDefault().getPreferenceStore().getDefaultBoolean( > MonitorUiPlugin.ACTIVITY_TRACKING_ENABLED)); > >+ attachmentShowID.setSelection(getPreferenceStore().getDefaultBoolean( >+ ITasksUiPreferenceConstants.ATTACHMENT_SHOW_ID)); >+ attachmentColumnUseStdWidth.setSelection(getPreferenceStore().getDefaultBoolean( >+ ITasksUiPreferenceConstants.ATTACHMENT_COLUMN_STD_WIDTH)); >+ > updateRefreshGroupEnablements(); > } > >@@ -369,10 +386,28 @@ > > } > >+ private void createAttachmentTable(Composite parent) { >+ Group attachmentContainer = new Group(parent, SWT.SHADOW_ETCHED_IN); >+ attachmentContainer.setLayout(new GridLayout(2, false)); >+ attachmentContainer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >+ attachmentContainer.setText(Messages.TasksUiPreferencePage_Attachment_Table); >+ >+ attachmentColumnUseStdWidth = new Button(attachmentContainer, SWT.CHECK); >+ attachmentColumnUseStdWidth.setText(Messages.TasksUiPreferencePage_Attachment_Coloumn_Std_Width); >+ attachmentColumnUseStdWidth.setSelection(getPreferenceStore().getBoolean( >+ ITasksUiPreferenceConstants.ATTACHMENT_COLUMN_STD_WIDTH)); >+ >+ attachmentShowID = new Button(attachmentContainer, SWT.CHECK); >+ attachmentShowID.setText(Messages.TasksUiPreferencePage_Attachment_Show_Id); >+ attachmentShowID.setSelection(getPreferenceStore().getBoolean(ITasksUiPreferenceConstants.ATTACHMENT_SHOW_ID)); >+ >+ } >+ > private void createOpenWith(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.setLayoutData(new GridData(SWT.LEFT, 1, true, true)); > > container.setText(Messages.TasksUiPreferencePage_Task_Editing); > useRichEditor = new Button(container, SWT.RADIO); >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.4 >diff -u -r1.4 messages.properties >--- src/org/eclipse/mylyn/internal/tasks/ui/preferences/messages.properties 12 Oct 2009 23:14:10 -0000 1.4 >+++ src/org/eclipse/mylyn/internal/tasks/ui/preferences/messages.properties 15 Nov 2009 18:16:41 -0000 >@@ -40,3 +40,6 @@ > TasksUiPreferencePage_Use_the_Restore_dialog_to_recover_missing_tasks=Use the Restore dialog to recover missing tasks > TasksUiPreferencePage_Web_Browser=Web Browser > TasksUiPreferencePage_Week_Start=Week Start: >+TasksUiPreferencePage_Attachment_Table=Task Editor Attachment Table >+TasksUiPreferencePage_Attachment_Show_Id=Show Attachment ID >+TasksUiPreferencePage_Attachment_Coloumn_Std_Width=use standard Width for Columns >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.10 >diff -u -r1.10 ITasksUiPreferenceConstants.java >--- src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java 24 Jul 2009 12:05:46 -0000 1.10 >+++ src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java 15 Nov 2009 18:16:40 -0000 >@@ -58,6 +58,10 @@ > > public static final String EDITOR_TASKS_RICH = "org.eclipse.mylyn.tasks.ui.reporting.open.editor"; //$NON-NLS-1$ > >+ public static final String ATTACHMENT_SHOW_ID = "org.eclipse.mylyn.tasks.ui.attachment.showid"; //$NON-NLS-1$ >+ >+ public static final String ATTACHMENT_COLUMN_STD_WIDTH = "org.eclipse.mylyn.tasks.ui.attachment.column.std.width"; //$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.125 >diff -u -r1.125 TasksUiPlugin.java >--- src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java 13 Oct 2009 03:10:02 -0000 1.125 >+++ src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java 15 Nov 2009 18:16:40 -0000 >@@ -889,6 +889,9 @@ > store.setDefault(ITasksUiPreferenceConstants.PLANNING_ENDHOUR, 18); > > store.setDefault(ITasksUiPreferenceConstants.AUTO_EXPAND_TASK_LIST, true); >+ >+ store.setDefault(ITasksUiPreferenceConstants.ATTACHMENT_SHOW_ID, false); >+ store.setDefault(ITasksUiPreferenceConstants.ATTACHMENT_COLUMN_STD_WIDTH, true); > } > > public static TaskActivityManager getTaskActivityManager() { >Index: src/org/eclipse/mylyn/internal/tasks/ui/editors/ColumnState.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/tasks/ui/editors/ColumnState.java >diff -N src/org/eclipse/mylyn/internal/tasks/ui/editors/ColumnState.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/internal/tasks/ui/editors/ColumnState.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,59 @@ >+/******************************************************************************* >+ * Copyright (c) 2009 Frank Becker 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 >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Frank Becker - initial API and implementation >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.internal.tasks.ui.editors; >+ >+import java.io.Serializable; >+ >+import org.eclipse.swt.SWT; >+ >+public class ColumnState implements Serializable { >+ >+ private static final long serialVersionUID = -3746488897344479189L; >+ >+ private String name; >+ >+ private int widths; >+ >+ private int alignment; >+ >+ public ColumnState(String name, int widths) { >+ super(); >+ this.name = name; >+ this.widths = widths; >+ alignment = SWT.LEFT; >+ } >+ >+ public String getName() { >+ return name; >+ } >+ >+ public void setName(String name) { >+ this.name = name; >+ } >+ >+ public int getWidths() { >+ return widths; >+ } >+ >+ public void setWidths(int widths) { >+ this.widths = widths; >+ } >+ >+ public int getAlignment() { >+ return alignment; >+ } >+ >+ public void setAlignment(int alignment) { >+ this.alignment = alignment; >+ } >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 250257
:
152248
|
152249
|
152640
|
152641
|
158913
|
158914
|
158915
|
158916
|
173981
|
173982
|
174179
|
174180
|
174213
|
174214
|
174251
|
174252
|
175449
|
175450