Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-enhancement.gifbin78 -> 78 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/AbstractBugEditor.java344
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/priority-1.gifbin0 -> 138 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/priority-2.gifbin0 -> 183 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/priority-3.gifbin0 -> 119 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/priority-4.gifbin0 -> 118 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/priority-5.gifbin0 -> 179 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/TaskListImages.java11
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/editors/MylarTaskEditor.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/editors/TaskInfoEditor.java57
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/views/TaskListTableLabelProvider.java36
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/views/TaskListView.java32
12 files changed, 237 insertions, 245 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-enhancement.gif b/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-enhancement.gif
index eadfcdb3c..7b3d7fe1f 100644
--- a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-enhancement.gif
+++ b/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-enhancement.gif
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/AbstractBugEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/AbstractBugEditor.java
index 7305e5b6f..b4855b031 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/AbstractBugEditor.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/AbstractBugEditor.java
@@ -37,28 +37,21 @@ import org.eclipse.mylar.bugzilla.core.Attribute;
import org.eclipse.mylar.bugzilla.core.Comment;
import org.eclipse.mylar.bugzilla.core.IBugzillaBug;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaPlugin;
-import org.eclipse.mylar.internal.bugzilla.core.BugzillaRepositoryUtil;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaTools;
import org.eclipse.mylar.internal.bugzilla.core.IBugzillaAttributeListener;
import org.eclipse.mylar.internal.bugzilla.core.IBugzillaConstants;
import org.eclipse.mylar.internal.bugzilla.core.IBugzillaReportSelection;
import org.eclipse.mylar.internal.bugzilla.ui.tasklist.BugzillaRepositoryConnector;
import org.eclipse.mylar.internal.core.util.MylarStatusHandler;
-import org.eclipse.mylar.internal.tasklist.ui.TaskListUiUtil;
import org.eclipse.mylar.internal.tasklist.ui.editors.MylarTaskEditor;
import org.eclipse.mylar.provisional.tasklist.MylarTaskListPlugin;
import org.eclipse.mylar.provisional.tasklist.TaskRepository;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.ControlEvent;
import org.eclipse.swt.events.ControlListener;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Color;
@@ -82,7 +75,6 @@ import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.actions.RetargetAction;
-import org.eclipse.ui.forms.widgets.Hyperlink;
import org.eclipse.ui.internal.WorkbenchImages;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.help.WorkbenchHelpSystem;
@@ -198,15 +190,15 @@ public abstract class AbstractBugEditor extends EditorPart implements Listener {
protected Composite editorComposite;
- protected CLabel titleLabel;
+// protected CLabel titleLabel;
protected ScrolledComposite scrolledComposite;
protected Composite infoArea;
- protected Hyperlink linkToBug;
+// protected Hyperlink linkToBug;
- protected StyledText generalTitleText;
+// protected StyledText generalTitleText;
private List<IBugzillaAttributeListener> attributesListeners = new ArrayList<IBugzillaAttributeListener>();
@@ -339,14 +331,18 @@ public abstract class AbstractBugEditor extends EditorPart implements Listener {
layout.verticalSpacing = 0;
layout.horizontalSpacing = 0;
editorComposite.setLayout(layout);
+
+ display = parent.getDisplay();
+ background = JFaceColors.getBannerBackground(display);
+ foreground = JFaceColors.getBannerForeground(display);
// Create the title for the editor
- createTitleArea(editorComposite);
- Label titleBarSeparator = new Label(editorComposite, SWT.HORIZONTAL | SWT.SEPARATOR);
+// createTitleArea(editorComposite);
+// Label titleBarSeparator = new Label(editorComposite, SWT.HORIZONTAL | SWT.SEPARATOR);
background = JFaceColors.getBannerBackground(display);
foreground = JFaceColors.getBannerForeground(display);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- titleBarSeparator.setLayoutData(gd);
+// GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+// titleBarSeparator.setLayoutData(gd);
// Put the bug info onto the editor
createInfoArea(editorComposite);
@@ -359,62 +355,52 @@ public abstract class AbstractBugEditor extends EditorPart implements Listener {
getSite().setSelectionProvider(selectionProvider);
}
- /**
- * Creates the title label at the top of the editor.
- *
- * @param parent
- * The composite to put the title label into.
- * @return The title composite.
- */
- protected Composite createTitleArea(Composite parent) {
- // Get the background color for the title area
- display = parent.getDisplay();
- background = JFaceColors.getBannerBackground(display);
- foreground = JFaceColors.getBannerForeground(display);
-
- // Create the title area which will contain
- // a title, message, and image.
- Composite titleArea = new Composite(parent, SWT.NO_FOCUS);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.verticalSpacing = 0;
- layout.horizontalSpacing = 0;
- layout.numColumns = 2;
- titleArea.setLayout(layout);
- titleArea.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- titleArea.setBackground(background);
-
- // Message label
- titleLabel = new CLabel(titleArea, SWT.LEFT);
- JFaceColors.setColors(titleLabel, foreground, background);
- titleLabel.setFont(TITLE_FONT);
-
- final IPropertyChangeListener fontListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (JFaceResources.HEADER_FONT.equals(event.getProperty())) {
- titleLabel.setFont(TITLE_FONT);
- }
- }
- };
- titleLabel.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- JFaceResources.getFontRegistry().removeListener(fontListener);
- }
- });
- JFaceResources.getFontRegistry().addListener(fontListener);
- GridData gd = new GridData(GridData.FILL_BOTH);
- titleLabel.setLayoutData(gd);
-
- // Title image
- Label titleImage = new Label(titleArea, SWT.LEFT);
- titleImage.setBackground(background);
- titleImage.setImage(WorkbenchImages.getImage(IDEInternalWorkbenchImages.IMG_OBJS_WELCOME_BANNER));
- gd = new GridData();
- gd.horizontalAlignment = GridData.END;
- titleImage.setLayoutData(gd);
- return titleArea;
- }
+// protected Composite createTitleArea(Composite parent) {
+// // Get the background color for the title area
+//
+// // Create the title area which will contain
+// // a title, message, and image.
+// Composite titleArea = new Composite(parent, SWT.NO_FOCUS);
+// GridLayout layout = new GridLayout();
+// layout.marginHeight = 0;
+// layout.marginWidth = 0;
+// layout.verticalSpacing = 0;
+// layout.horizontalSpacing = 0;
+// layout.numColumns = 2;
+// titleArea.setLayout(layout);
+// titleArea.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+// titleArea.setBackground(background);
+//
+// // Message label
+// titleLabel = new CLabel(titleArea, SWT.LEFT);
+// JFaceColors.setColors(titleLabel, foreground, background);
+// titleLabel.setFont(TITLE_FONT);
+//
+// final IPropertyChangeListener fontListener = new IPropertyChangeListener() {
+// public void propertyChange(PropertyChangeEvent event) {
+// if (JFaceResources.HEADER_FONT.equals(event.getProperty())) {
+// titleLabel.setFont(TITLE_FONT);
+// }
+// }
+// };
+// titleLabel.addDisposeListener(new DisposeListener() {
+// public void widgetDisposed(DisposeEvent event) {
+// JFaceResources.getFontRegistry().removeListener(fontListener);
+// }
+// });
+// JFaceResources.getFontRegistry().addListener(fontListener);
+// GridData gd = new GridData(GridData.FILL_BOTH);
+// titleLabel.setLayoutData(gd);
+//
+// // Title image
+// Label titleImage = new Label(titleArea, SWT.LEFT);
+// titleImage.setBackground(background);
+// titleImage.setImage(WorkbenchImages.getImage(IDEInternalWorkbenchImages.IMG_OBJS_WELCOME_BANNER));
+// gd = new GridData();
+// gd.horizontalAlignment = GridData.END;
+// titleImage.setLayoutData(gd);
+// return titleArea;
+// }
/**
* Creates the part of the editor that contains the information about the
@@ -550,8 +536,8 @@ public abstract class AbstractBugEditor extends EditorPart implements Listener {
// End Attributes Title
// Set the Attributes Title
- newAttributesLayout(attributesTitleComposite);
- titleLabel.setText(title);
+// newAttributesLayout(attributesTitleComposite);
+// titleLabel.setText(title);
bugzillaInput.setToolTipText(title);
int currentCol = 1;
@@ -1064,120 +1050,120 @@ public abstract class AbstractBugEditor extends EditorPart implements Listener {
return stext;
}
- /**
- * This creates the title header for the info area. Its style is similar to
- * one from calling the function <code>newLayout</code> with the style
- * <code>HEADER</code>.
- *
- * @param composite
- * The composite to put this text field into. Its layout style
- * should be a grid with columns.
- */
- protected void newAttributesLayout(Composite composite) {
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- data.horizontalSpan = 4;
- Composite generalTitleGroup = new Composite(composite, SWT.NONE);
- generalTitleGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- generalTitleGroup.setLayoutData(data);
- GridLayout generalTitleLayout = new GridLayout();
- generalTitleLayout.numColumns = 3;
- generalTitleLayout.marginWidth = 0;
- generalTitleLayout.marginHeight = 9;
- generalTitleGroup.setLayout(generalTitleLayout);
- generalTitleGroup.setBackground(background);
-
- Label image = new Label(generalTitleGroup, SWT.NONE);
- image.setBackground(background);
- image.setImage(WorkbenchImages.getImage(IDEInternalWorkbenchImages.IMG_OBJS_WELCOME_ITEM));
-
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.verticalAlignment = GridData.VERTICAL_ALIGN_BEGINNING;
- image.setLayoutData(gd);
-
- generalTitleText = new StyledText(generalTitleGroup, SWT.MULTI | SWT.READ_ONLY);
- generalTitleText.setBackground(background);
- generalTitleText.getCaret().setVisible(false);
- generalTitleText.setEditable(false);
- generalTitleText.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- StyledText c = (StyledText) e.widget;
- if (c != null && c.getSelectionCount() > 0) {
- if (currentSelectedText != null) {
- if (!c.equals(currentSelectedText)) {
- currentSelectedText.setSelectionRange(0, 0);
- }
- }
- }
- currentSelectedText = c;
- }
- });
+// /**
+// * This creates the title header for the info area. Its style is similar to
+// * one from calling the function <code>newLayout</code> with the style
+// * <code>HEADER</code>.
+// *
+// * @param composite
+// * The composite to put this text field into. Its layout style
+// * should be a grid with columns.
+// */
+// protected void newAttributesLayout(Composite composite) {
+// GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+// data.horizontalSpan = 4;
+// Composite generalTitleGroup = new Composite(composite, SWT.NONE);
+// generalTitleGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+// generalTitleGroup.setLayoutData(data);
+// GridLayout generalTitleLayout = new GridLayout();
+// generalTitleLayout.numColumns = 3;
+// generalTitleLayout.marginWidth = 0;
+// generalTitleLayout.marginHeight = 9;
+// generalTitleGroup.setLayout(generalTitleLayout);
+// generalTitleGroup.setBackground(background);
+//
+// Label image = new Label(generalTitleGroup, SWT.NONE);
+// image.setBackground(background);
+// image.setImage(WorkbenchImages.getImage(IDEInternalWorkbenchImages.IMG_OBJS_WELCOME_ITEM));
+//
+// GridData gd = new GridData(GridData.FILL_BOTH);
+// gd.verticalAlignment = GridData.VERTICAL_ALIGN_BEGINNING;
+// image.setLayoutData(gd);
+
+// generalTitleText = new StyledText(generalTitleGroup, SWT.MULTI | SWT.READ_ONLY);
+// generalTitleText.setBackground(background);
+// generalTitleText.getCaret().setVisible(false);
+// generalTitleText.setEditable(false);
+// generalTitleText.addSelectionListener(new SelectionAdapter() {
+//
+// @Override
+// public void widgetSelected(SelectionEvent e) {
+// StyledText c = (StyledText) e.widget;
+// if (c != null && c.getSelectionCount() > 0) {
+// if (currentSelectedText != null) {
+// if (!c.equals(currentSelectedText)) {
+// currentSelectedText.setSelectionRange(0, 0);
+// }
+// }
+// }
+// currentSelectedText = c;
+// }
+// });
// create context menu
- generalTitleGroup.setMenu(contextMenuManager.createContextMenu(generalTitleGroup));
- generalTitleText.setMenu(contextMenuManager.createContextMenu(generalTitleText));
+// generalTitleGroup.setMenu(contextMenuManager.createContextMenu(generalTitleGroup));
+// generalTitleText.setMenu(contextMenuManager.createContextMenu(generalTitleText));
- linkToBug = new Hyperlink(generalTitleGroup, SWT.MULTI | SWT.READ_ONLY);
- linkToBug.setBackground(background);
+// linkToBug = new Hyperlink(generalTitleGroup, SWT.MULTI | SWT.READ_ONLY);
+// linkToBug.setBackground(background);
- setGeneralTitleText();
+// setGeneralTitleText();
- image.setMenu(contextMenuManager.createContextMenu(image));
- composite.setMenu(contextMenuManager.createContextMenu(composite));
- }
+// image.setMenu(contextMenuManager.createContextMenu(image));
+// composite.setMenu(contextMenuManager.createContextMenu(composite));
+// }
/**
* This refreshes the text in the title label of the info area (it contains
* elements which can change).
*/
protected void setGeneralTitleText() {
- String text = "[Open in Internal Browser]";
- linkToBug.setText(text);
- linkToBug.setFont(TEXT_FONT);
- if (this instanceof ExistingBugEditor) {
- linkToBug.setUnderlined(true);
- linkToBug.setForeground(JFaceColors.getHyperlinkText(Display.getCurrent()));
- linkToBug.addMouseListener(new MouseListener() {
-
- public void mouseDoubleClick(MouseEvent e) {
- }
-
- public void mouseUp(MouseEvent e) {
- }
-
- public void mouseDown(MouseEvent e) {
- TaskListUiUtil.openUrl(getTitle(), getTitleToolTip(), BugzillaRepositoryUtil.getBugUrlWithoutLogin(
- bugzillaInput.getBug().getRepositoryUrl(), bugzillaInput.getBug().getId()));
- if (e.stateMask == SWT.MOD3) {
- // XXX come back to look at this ui
- close();
- }
-
- }
- });
- } else {
- linkToBug.setEnabled(false);
- }
- linkToBug.addListener(SWT.FocusIn, new GenericListener());
-
- // Resize the composite, in case the new summary is longer than the
- // previous one.
- // Then redraw it to show the changes.
- linkToBug.getParent().pack(true);
- linkToBug.redraw();
-
- text = getTitleString();
- generalTitleText.setText(text);
- StyleRange sr = new StyleRange(generalTitleText.getOffsetAtLine(0), text.length(), foreground, background,
- SWT.BOLD);
- generalTitleText.setStyleRange(sr);
- generalTitleText.addListener(SWT.FocusIn, new GenericListener());
-
- // Resize the composite, in case the new summary is longer than the
- // previous one.
- // Then redraw it to show the changes.
- generalTitleText.getParent().pack(true);
- generalTitleText.redraw();
+// String text = "[Open in Internal Browser]";
+// linkToBug.setText(text);
+// linkToBug.setFont(TEXT_FONT);
+// if (this instanceof ExistingBugEditor) {
+// linkToBug.setUnderlined(true);
+// linkToBug.setForeground(JFaceColors.getHyperlinkText(Display.getCurrent()));
+// linkToBug.addMouseListener(new MouseListener() {
+//
+// public void mouseDoubleClick(MouseEvent e) {
+// }
+//
+// public void mouseUp(MouseEvent e) {
+// }
+//
+// public void mouseDown(MouseEvent e) {
+// TaskListUiUtil.openUrl(getTitle(), getTitleToolTip(), BugzillaRepositoryUtil.getBugUrlWithoutLogin(
+// bugzillaInput.getBug().getRepositoryUrl(), bugzillaInput.getBug().getId()));
+// if (e.stateMask == SWT.MOD3) {
+// // XXX come back to look at this ui
+// close();
+// }
+//
+// }
+// });
+// } else {
+// linkToBug.setEnabled(false);
+// }
+// linkToBug.addListener(SWT.FocusIn, new GenericListener());
+//
+// // Resize the composite, in case the new summary is longer than the
+// // previous one.
+// // Then redraw it to show the changes.
+// linkToBug.getParent().pack(true);
+// linkToBug.redraw();
+
+// String text = getTitleString();
+// generalTitleText.setText(text);
+// StyleRange sr = new StyleRange(generalTitleText.getOffsetAtLine(0), text.length(), foreground, background,
+// SWT.BOLD);
+// generalTitleText.setStyleRange(sr);
+// generalTitleText.addListener(SWT.FocusIn, new GenericListener());
+//
+// // Resize the composite, in case the new summary is longer than the
+// // previous one.
+// // Then redraw it to show the changes.
+// generalTitleText.getParent().pack(true);
+// generalTitleText.redraw();
}
/**
@@ -1251,8 +1237,8 @@ public abstract class AbstractBugEditor extends EditorPart implements Listener {
protected void updateEditor() {
// Reset all summary occurrences, since it might have
// been edited.
- String title = getTitleString();
- titleLabel.setText(title);
+// String title = getTitleString();
+// titleLabel.setText(title);
setGeneralTitleText();
}
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-1.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-1.gif
new file mode 100644
index 000000000..0bdff0861
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-1.gif
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-2.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-2.gif
new file mode 100644
index 000000000..3306b041c
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-2.gif
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-3.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-3.gif
new file mode 100644
index 000000000..62e6f77e9
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-3.gif
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-4.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-4.gif
new file mode 100644
index 000000000..fa9dae353
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-4.gif
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-5.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-5.gif
new file mode 100644
index 000000000..309e3d785
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-5.gif
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/TaskListImages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/TaskListImages.java
index fcda970d3..fccd4cd86 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/TaskListImages.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/TaskListImages.java
@@ -139,6 +139,17 @@ public class TaskListImages {
public static final ImageDescriptor COLLAPSE_ALL = create(T_ELCL, "collapseall.png");
+ public static final ImageDescriptor PRIORITY_1 = create(T_EVIEW, "priority-1.gif");
+
+ public static final ImageDescriptor PRIORITY_2 = create(T_EVIEW, "priority-2.gif");
+
+ public static final ImageDescriptor PRIORITY_3 = create(T_EVIEW, "priority-3.gif");
+
+ public static final ImageDescriptor PRIORITY_4 = create(T_EVIEW, "priority-4.gif");
+
+ public static final ImageDescriptor PRIORITY_5 = create(T_EVIEW, "priority-5.gif");
+
+
private static ImageDescriptor create(String prefix, String name) {
try {
return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name));
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/editors/MylarTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/editors/MylarTaskEditor.java
index 4a1335dc6..a45600663 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/editors/MylarTaskEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/editors/MylarTaskEditor.java
@@ -47,7 +47,7 @@ import org.eclipse.ui.part.MultiPageSelectionProvider;
*/
public class MylarTaskEditor extends MultiPageEditorPart {
- private static final String TASK_INFO_PAGE_LABEL = "Task Info";
+ private static final String TASK_INFO_PAGE_LABEL = "Planning";
private static final String ISSUE_WEB_PAGE_LABEL = "Browser";
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/editors/TaskInfoEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/editors/TaskInfoEditor.java
index 349f39f25..8f40ac3b2 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/editors/TaskInfoEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/editors/TaskInfoEditor.java
@@ -77,12 +77,14 @@ import org.eclipse.ui.part.EditorPart;
*/
public class TaskInfoEditor extends EditorPart {
+ private static final String LABEL_PLAN = "Personal Planning";
+
private static final String NO_TIME_ELAPSED = "0 seconds";
- private static final String LABEL_OVERVIEW = "Task Summary";
-
+ private static final String LABEL_OVERVIEW = "Task Info";
+
private static final String LABEL_NOTES = "Notes";
-
+
private DatePicker datePicker;
private ITask task;
@@ -127,12 +129,7 @@ public class TaskInfoEditor extends EditorPart {
private ITaskActivityListener TASK_LIST_LISTENER = new ITaskActivityListener() {
public void taskActivated(ITask activeTask) {
- // if (task != null && !browse.isDisposed()
- // &&
- // activeTask.getHandleIdentifier().equals(task.getHandleIdentifier()))
- // {
- // browse.setEnabled(false);
- // }
+ // ignore
}
public void tasksActivated(List<ITask> tasks) {
@@ -142,12 +139,7 @@ public class TaskInfoEditor extends EditorPart {
}
public void taskDeactivated(ITask deactiveTask) {
- // if (task != null && !browse.isDisposed()
- // &&
- // deactiveTask.getHandleIdentifier().equals(task.getHandleIdentifier()))
- // {
- // browse.setEnabled(true);
- // }
+ // ignore
}
public void tasklistRead() {
@@ -177,14 +169,14 @@ public class TaskInfoEditor extends EditorPart {
}
}
});
- }
+ }
}
}
public void repositoryInfoChanged(ITask task) {
- localInfoChanged(task);
+ localInfoChanged(task);
}
-
+
public void taskListModified() {
// TODO Auto-generated method stub
@@ -242,7 +234,7 @@ public class TaskInfoEditor extends EditorPart {
// MylarTaskListPlugin.getTaskListManager().setStatus(task,
// statusCombo.getItem(statusCombo.getSelectionIndex()));
-// refreshTaskListView(task);
+ // refreshTaskListView(task);
MylarTaskListPlugin.getTaskListManager().notifyLocalInfoChanged(task);
markDirty(false);
@@ -313,7 +305,9 @@ public class TaskInfoEditor extends EditorPart {
}
try {
- createSummarySection(parent, toolkit);
+ if (!(task instanceof AbstractRepositoryTask)) {
+ createSummarySection(parent, toolkit);
+ }
createPlanningSection(parent, toolkit);
createDocumentationSection(parent, toolkit);
// // createRelatedLinksSection(parent, toolkit);
@@ -325,13 +319,13 @@ public class TaskInfoEditor extends EditorPart {
}
private void createSummarySection(Composite parent, FormToolkit toolkit) {
- Section section = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR | Section.DESCRIPTION
- | Section.TWISTIE);
+ Section section = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR | Section.TWISTIE);
section.setText(LABEL_OVERVIEW);
section.setExpanded(true);
- if (task instanceof AbstractRepositoryTask) {
- section.setDescription("To modify these fields use the repository editor.");
- }
+ // if (task instanceof AbstractRepositoryTask) {
+ // section.setDescription("To modify these fields use the repository
+ // editor.");
+ // }
section.setLayout(new GridLayout());
section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -489,7 +483,7 @@ public class TaskInfoEditor extends EditorPart {
private void createPlanningSection(Composite parent, FormToolkit toolkit) {
Section section = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR | Section.TWISTIE);
- section.setText("Planning");
+ section.setText(LABEL_PLAN);
section.setLayout(new GridLayout());
section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
section.setExpanded(true);
@@ -537,7 +531,7 @@ public class TaskInfoEditor extends EditorPart {
});
datePicker.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- removeReminder = toolkit.createButton(sectionClient, "Clear", SWT.PUSH | SWT.CENTER);
+ removeReminder = toolkit.createButton(sectionClient, "Clear", SWT.PUSH | SWT.CENTER);
removeReminder.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -553,7 +547,7 @@ public class TaskInfoEditor extends EditorPart {
dummyLabelDataLayout.horizontalSpan = 1;
dummyLabelDataLayout.widthHint = 30;
dummy.setLayoutData(dummyLabelDataLayout);
-
+
// Creation date
label = toolkit.createLabel(sectionClient, "Creation date:");
label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
@@ -572,7 +566,6 @@ public class TaskInfoEditor extends EditorPart {
creationDate.setEditable(false);
creationDate.setEnabled(true);
-
// Estimated time
label = toolkit.createLabel(sectionClient, "Estimated time:");
@@ -598,7 +591,6 @@ public class TaskInfoEditor extends EditorPart {
label = toolkit.createLabel(sectionClient, "hours ");
label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
-
// 1 Blank column
Label blankLabel2 = toolkit.createLabel(sectionClient, "");
GridData blankLabl2Layout = new GridData(GridData.HORIZONTAL_ALIGN_CENTER);
@@ -619,7 +611,6 @@ public class TaskInfoEditor extends EditorPart {
endDateDataLayout.widthHint = 120;
endDate.setLayoutData(endDateDataLayout);
-
endDate.setEditable(false);
endDate.setEnabled(true);
toolkit.paintBordersFor(sectionClient);
@@ -628,7 +619,7 @@ public class TaskInfoEditor extends EditorPart {
label = toolkit.createLabel(sectionClient, "Elapsed time:");
label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
-
+
Composite elapsedComposite = toolkit.createComposite(sectionClient);
GridLayout elapsedLayout = new GridLayout();
elapsedLayout.numColumns = 2;
@@ -638,8 +629,6 @@ public class TaskInfoEditor extends EditorPart {
GridData elapsedCompositeGridData = new GridData();
elapsedCompositeGridData.horizontalSpan = 5;
elapsedComposite.setLayoutData(elapsedCompositeGridData);
-
-
String elapsedTimeString = NO_TIME_ELAPSED;
try {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/views/TaskListTableLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/views/TaskListTableLabelProvider.java
index 0e30f8467..4d4427d03 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/views/TaskListTableLabelProvider.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/views/TaskListTableLabelProvider.java
@@ -26,6 +26,7 @@ import org.eclipse.mylar.provisional.tasklist.ITask;
import org.eclipse.mylar.provisional.tasklist.ITaskContainer;
import org.eclipse.mylar.provisional.tasklist.ITaskListElement;
import org.eclipse.mylar.provisional.tasklist.Task;
+import org.eclipse.mylar.provisional.tasklist.Task.PriorityLevel;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
@@ -46,34 +47,35 @@ public class TaskListTableLabelProvider extends DecoratingLabelProvider implemen
public Image getImageForPriority(Task.PriorityLevel priorityLevel) {
switch (priorityLevel) {
case P1:
- return TaskListImages.getImage(TaskListImages.TASK_ACTIVE);
+ return TaskListImages.getImage(TaskListImages.PRIORITY_1);
case P2:
- return TaskListImages.getImage(TaskListImages.NAVIGATE_NEXT);
+ return TaskListImages.getImage(TaskListImages.PRIORITY_2);
case P3:
- return TaskListImages.getImage(TaskListImages.NAVIGATE_PREVIOUS);
+ return TaskListImages.getImage(TaskListImages.PRIORITY_3);
case P4:
- return TaskListImages.getImage(TaskListImages.GO_UP);
+ return TaskListImages.getImage(TaskListImages.PRIORITY_4);
case P5:
- return TaskListImages.getImage(TaskListImages.GO_INTO);
+ return TaskListImages.getImage(TaskListImages.PRIORITY_5);
default:
- return TaskListImages.getImage(TaskListImages.OVERLAY_INCOMMING);
+ return null;
}
}
public String getColumnText(Object obj, int columnIndex) {
if (obj instanceof ITaskListElement) {
- ITaskListElement element = (ITaskListElement) obj;
+// ITaskListElement element = (ITaskListElement) obj;
switch (columnIndex) {
case 0:
return null;
case 1:
return null;
case 2:
- if (element instanceof ITaskContainer || element instanceof AbstractRepositoryQuery) {
- return null;
- } else {
- return element.getPriority();
- }
+ return null;
+// if (element instanceof ITaskContainer || element instanceof AbstractRepositoryQuery) {
+// return null;
+// } else {
+// return element.getPriority();
+// }
case 3:
return super.getText(obj);
}
@@ -109,11 +111,11 @@ public class TaskListTableLabelProvider extends DecoratingLabelProvider implemen
return null;
}
return super.getImage(element);
-// } else if (columnIndex == 2) {
-// if (element instanceof ITaskListElement && !(element instanceof ITaskContainer)) {
-// ITaskListElement taskElement = (ITaskListElement) element;
-// return getImageForPriority(PriorityLevel.fromString(taskElement.getPriority()));
-// }
+ } else if (columnIndex == 2) {
+ if (element instanceof ITaskListElement && !(element instanceof ITaskContainer)) {
+ ITaskListElement taskElement = (ITaskListElement) element;
+ return getImageForPriority(PriorityLevel.fromString(taskElement.getPriority()));
+ }
}
return null;
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/views/TaskListView.java
index 773ddd533..8c3a76f5c 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/views/TaskListView.java
@@ -28,7 +28,6 @@ import org.eclipse.jface.action.Separator;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.CheckboxCellEditor;
-import org.eclipse.jface.viewers.ComboBoxCellEditor;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.ICellModifier;
import org.eclipse.jface.viewers.IDoubleClickListener;
@@ -294,7 +293,7 @@ public class TaskListView extends ViewPart {
}
public void addActionsToMenu() {
- Action P1 = new Action(PRIORITY_LEVELS[0], AS_CHECK_BOX) {
+ Action P1 = new Action("", AS_CHECK_BOX) {
@Override
public void run() {
MylarTaskListPlugin.setCurrentPriorityLevel(Task.PriorityLevel.P1);
@@ -303,11 +302,12 @@ public class TaskListView extends ViewPart {
}
};
P1.setEnabled(true);
- P1.setToolTipText(PRIORITY_LEVELS[0]);
+// P1.setToolTipText(PRIORITY_LEVELS[0]);
+ P1.setImageDescriptor(TaskListImages.PRIORITY_1);
ActionContributionItem item = new ActionContributionItem(P1);
item.fill(dropDownMenu, -1);
- Action P2 = new Action(PRIORITY_LEVELS[1], AS_CHECK_BOX) {
+ Action P2 = new Action("", AS_CHECK_BOX) {
@Override
public void run() {
MylarTaskListPlugin.setCurrentPriorityLevel(Task.PriorityLevel.P2);
@@ -316,11 +316,12 @@ public class TaskListView extends ViewPart {
}
};
P2.setEnabled(true);
- P2.setToolTipText(PRIORITY_LEVELS[1]);
+// P2.setToolTipText(PRIORITY_LEVELS[1]);
+ P2.setImageDescriptor(TaskListImages.PRIORITY_2);
item = new ActionContributionItem(P2);
item.fill(dropDownMenu, -1);
- Action P3 = new Action(PRIORITY_LEVELS[2], AS_CHECK_BOX) {
+ Action P3 = new Action("", AS_CHECK_BOX) {
@Override
public void run() {
MylarTaskListPlugin.setCurrentPriorityLevel(Task.PriorityLevel.P3);
@@ -329,11 +330,12 @@ public class TaskListView extends ViewPart {
}
};
P3.setEnabled(true);
- P3.setToolTipText(PRIORITY_LEVELS[2]);
+// P3.setToolTipText(PRIORITY_LEVELS[2]);
+ P3.setImageDescriptor(TaskListImages.PRIORITY_3);
item = new ActionContributionItem(P3);
item.fill(dropDownMenu, -1);
- Action P4 = new Action(PRIORITY_LEVELS[3], AS_CHECK_BOX) {
+ Action P4 = new Action("", AS_CHECK_BOX) {
@Override
public void run() {
MylarTaskListPlugin.setCurrentPriorityLevel(Task.PriorityLevel.P4);
@@ -342,11 +344,12 @@ public class TaskListView extends ViewPart {
}
};
P4.setEnabled(true);
- P4.setToolTipText(PRIORITY_LEVELS[3]);
+// P4.setToolTipText(PRIORITY_LEVELS[3]);
+ P4.setImageDescriptor(TaskListImages.PRIORITY_4);
item = new ActionContributionItem(P4);
item.fill(dropDownMenu, -1);
- Action P5 = new Action(PRIORITY_LEVELS[4], AS_CHECK_BOX) {
+ Action P5 = new Action("", AS_CHECK_BOX) {
@Override
public void run() {
MylarTaskListPlugin.setCurrentPriorityLevel(Task.PriorityLevel.P5);
@@ -355,7 +358,8 @@ public class TaskListView extends ViewPart {
}
};
P5.setEnabled(true);
- P5.setToolTipText(PRIORITY_LEVELS[4]);
+ P5.setImageDescriptor(TaskListImages.PRIORITY_5);
+// P5.setToolTipText(PRIORITY_LEVELS[4]);
item = new ActionContributionItem(P5);
item.fill(dropDownMenu, -1);
@@ -736,9 +740,9 @@ public class TaskListView extends ViewPart {
((Text) textEditor.getControl()).setOrientation(SWT.LEFT_TO_RIGHT);
editors[0] = new CheckboxCellEditor();
editors[1] = textEditor;
- editors[2] = new ComboBoxCellEditor(getViewer().getTree(), PRIORITY_LEVELS, SWT.READ_ONLY);
- // editors[2] = new ImageTableCellEditor(getViewer().getTree(),
- // getPirorityImages());
+// editors[2] = new ComboBoxCellEditor(getViewer().getTree(), PRIORITY_LEVELS, SWT.READ_ONLY);
+ editors[2] = new ImageTableCellEditor(getViewer().getTree(),
+ getPirorityImages());
editors[3] = textEditor;
getViewer().setCellEditors(editors);
getViewer().setCellModifier(new TaskListCellModifier());

Back to the top