Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2007-02-16 18:12:53 -0500
committerrelves2007-02-16 18:12:53 -0500
commite6ef191c12d7db6b6709bf15741d50125b8feacc (patch)
tree5388be06feb3fc5e45de3740e2b46c05517aa997
parentf4d42bce220f516f33ad29e343cab9ad7a15b27a (diff)
downloadorg.eclipse.mylyn.tasks-e6ef191c12d7db6b6709bf15741d50125b8feacc.tar.gz
org.eclipse.mylyn.tasks-e6ef191c12d7db6b6709bf15741d50125b8feacc.tar.xz
org.eclipse.mylyn.tasks-e6ef191c12d7db6b6709bf15741d50125b8feacc.zip
NEW - bug 158921: improve task editor information density
https://bugs.eclipse.org/bugs/show_bug.cgi?id=158921
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractNewRepositoryTaskEditor.java50
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java44
3 files changed, 59 insertions, 39 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java
index 7c5451698..59747462c 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java
@@ -77,10 +77,6 @@ public class NewBugzillaTaskEditor extends AbstractNewRepositoryTaskEditor {
GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
Composite textFieldComposite = toolkit.createComposite(peopleComposite);
GridLayout textLayout = new GridLayout();
-// textLayout.marginWidth = 1;
-// textLayout.verticalSpacing = 0;
-// textLayout.marginHeight = 0;
-// textLayout.marginRight = 5;
textFieldComposite.setLayout(textLayout);
Text textField = createTextField(textFieldComposite, taskData
.getAttribute(RepositoryTaskAttribute.USER_ASSIGNED), SWT.FLAT);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractNewRepositoryTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractNewRepositoryTaskEditor.java
index 1d2d43b10..610c85905 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractNewRepositoryTaskEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractNewRepositoryTaskEditor.java
@@ -24,6 +24,7 @@ import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.mylar.internal.tasks.ui.TaskListColorsAndFonts;
import org.eclipse.mylar.internal.tasks.ui.TaskListPreferenceConstants;
import org.eclipse.mylar.internal.tasks.ui.views.TaskListView;
import org.eclipse.mylar.tasks.core.AbstractRepositoryTask;
@@ -39,6 +40,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
@@ -56,6 +58,7 @@ import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
+import org.eclipse.ui.themes.IThemeManager;
/**
* An editor used to view a locally created bug that does not yet exist on a
@@ -148,6 +151,31 @@ public abstract class AbstractNewRepositoryTaskEditor extends AbstractRepository
}
@Override
+ protected void addSummaryText(Composite attributesComposite) {
+
+ Composite summaryComposite = toolkit.createComposite(attributesComposite);
+ GridLayout summaryLayout = new GridLayout(2, false);
+ summaryLayout.verticalSpacing = 0;
+ summaryLayout.marginHeight = 2;
+ summaryComposite.setLayout(summaryLayout);
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(summaryComposite);
+
+ RepositoryTaskAttribute attribute = taskData.getAttribute(RepositoryTaskAttribute.SUMMARY);
+ if (attribute != null) {
+ createLabel(summaryComposite, attribute);
+ summaryText = createTextField(summaryComposite, attribute, SWT.FLAT);
+ IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager();
+ Font summaryFont = themeManager.getCurrentTheme().getFontRegistry().get(
+ TaskListColorsAndFonts.TASK_EDITOR_FONT);
+ summaryText.setFont(summaryFont);
+
+ GridDataFactory.fillDefaults().grab(true, false).hint(DESCRIPTION_WIDTH, SWT.DEFAULT).applyTo(summaryText);
+ summaryText.addListener(SWT.KeyUp, new SummaryListener());
+ }
+ toolkit.paintBordersFor(summaryComposite);
+ }
+
+ @Override
protected void createAttachmentLayout(Composite comp) {
// currently can't attach while creating new bug
}
@@ -182,7 +210,7 @@ public abstract class AbstractNewRepositoryTaskEditor extends AbstractRepository
// Reminder
toolkit.createLabel(sectionClient, "Scheduled for:");
-// label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
+ // label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
scheduledForDate = new DatePicker(sectionClient, SWT.NONE, DatePicker.LABEL_CHOOSE);
scheduledForDate.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
scheduledForDate.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
@@ -213,7 +241,7 @@ public abstract class AbstractNewRepositoryTaskEditor extends AbstractRepository
// Estimated time
toolkit.createLabel(sectionClient, "Estimated time:");
-// label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
+ // label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
estimatedTime = new Spinner(sectionClient, SWT.NONE);
estimatedTime.setDigits(0);
estimatedTime.setMaximum(100);
@@ -225,7 +253,7 @@ public abstract class AbstractNewRepositoryTaskEditor extends AbstractRepository
estimatedDataLayout.widthHint = 110;
estimatedTime.setLayoutData(estimatedDataLayout);
toolkit.createLabel(sectionClient, "hours ");
-// label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
+ // label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
// 1 Blank column
Label blankLabel2 = toolkit.createLabel(sectionClient, "");
@@ -343,19 +371,17 @@ public abstract class AbstractNewRepositoryTaskEditor extends AbstractRepository
@Override
protected void createActionsLayout(Composite formComposite) {
Section section = toolkit.createSection(formComposite, ExpandableComposite.TITLE_BAR);
-
+
section.setText(getSectionLabel(SECTION_NAME.ACTIONS_SECTION));
section.setExpanded(true);
section.setLayout(new GridLayout());
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP).grab(true, true).applyTo(section);
-
Composite buttonComposite = toolkit.createComposite(section);
buttonComposite.setLayout(new GridLayout(4, false));
buttonComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
section.setClient(buttonComposite);
-
-
+
addToCategory = toolkit.createButton(buttonComposite, "Add to Category", SWT.CHECK);
categoryChooser = new CCombo(buttonComposite, SWT.FLAT | SWT.READ_ONLY);
categoryChooser.setLayoutData(GridDataFactory.swtDefaults().hint(150, SWT.DEFAULT).create());
@@ -385,13 +411,11 @@ public abstract class AbstractNewRepositoryTaskEditor extends AbstractRepository
}
});
-
- GridDataFactory.fillDefaults().hint(DEFAULT_FIELD_WIDTH, SWT.DEFAULT).span(3, SWT.DEFAULT).applyTo(categoryChooser);
-
-
- addActionButtons(buttonComposite);
-
+ GridDataFactory.fillDefaults().hint(DEFAULT_FIELD_WIDTH, SWT.DEFAULT).span(3, SWT.DEFAULT).applyTo(
+ categoryChooser);
+
+ addActionButtons(buttonComposite);
toolkit.paintBordersFor(buttonComposite);
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java
index 3dcc1c55c..f458e55ab 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java
@@ -172,7 +172,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
public static final String LABEL_JOB_SUBMIT = "Submitting to repository";
- protected static final String HEADER_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
+ protected static final String HEADER_DATE_FORMAT = "yyyy-MM-dd HH:mm";
private static final String ATTACHMENT_DEFAULT_NAME = "attachment";
@@ -671,7 +671,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
}
/**
- *
+ *
*/
protected void createFormContent(final IManagedForm managedForm) {
IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager();
@@ -698,10 +698,10 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
} else {
idLabel = taskData.getId();
}
-
+
form.setText(kindLabel + " " + idLabel);
toolkit.decorateFormHeading(form.getForm());
-
+
editorComposite = form.getBody();
GridLayout editorLayout = new GridLayout();
editorComposite.setLayout(editorLayout);
@@ -756,24 +756,26 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
GridLayout headerLayout = new GridLayout(11, false);
headerLayout.verticalSpacing = 1;
headerLayout.marginHeight = 1;
- headerLayout.horizontalSpacing = 2;
+ headerLayout.marginHeight = 1;
+ headerLayout.marginWidth = 1;
+ headerLayout.horizontalSpacing = 6;
headerInfoComposite.setLayout(headerLayout);
RepositoryTaskAttribute statusAtribute = taskData.getAttribute(RepositoryTaskAttribute.STATUS);
if (statusAtribute != null) {
- createLabel(headerInfoComposite, statusAtribute);//.setFont(TITLE_FONT);
- createTextField(headerInfoComposite, statusAtribute, SWT.FLAT | SWT.READ_ONLY);
+ createLabel(headerInfoComposite, statusAtribute);// .setFont(TITLE_FONT);
+ createTextField(headerInfoComposite, statusAtribute, SWT.NONE | SWT.READ_ONLY);
}
RepositoryTaskAttribute priorityAttribute = taskData.getAttribute(RepositoryTaskAttribute.PRIORITY);
if (priorityAttribute != null) {
- createLabel(headerInfoComposite, priorityAttribute);//.setFont(TITLE_FONT);
- createTextField(headerInfoComposite, priorityAttribute, SWT.FLAT | SWT.READ_ONLY);
+ createLabel(headerInfoComposite, priorityAttribute);// .setFont(TITLE_FONT);
+ createTextField(headerInfoComposite, priorityAttribute, SWT.NONE | SWT.READ_ONLY);
}
String idLabel = (repositoryTask != null) ? repositoryTask.getIdentifyingLabel() : taskData.getId();
if (idLabel != null) {
- toolkit.createLabel(headerInfoComposite, "ID");//.setFont(TITLE_FONT);
+ toolkit.createLabel(headerInfoComposite, "ID:");// .setFont(TITLE_FONT);
toolkit.createText(headerInfoComposite, idLabel, SWT.FLAT | SWT.READ_ONLY);
}
@@ -792,17 +794,17 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
RepositoryTaskAttribute creationAttribute = taskData.getAttribute(RepositoryTaskAttribute.DATE_CREATION);
if (creationAttribute != null) {
- createLabel(headerInfoComposite, creationAttribute);//.setFont(TITLE_FONT);
+ createLabel(headerInfoComposite, creationAttribute);// .setFont(TITLE_FONT);
toolkit.createText(headerInfoComposite, openedDateString, SWT.FLAT | SWT.READ_ONLY);
}
RepositoryTaskAttribute modifiedAttribute = taskData.getAttribute(RepositoryTaskAttribute.DATE_MODIFIED);
if (modifiedAttribute != null) {
- createLabel(headerInfoComposite, modifiedAttribute);//.setFont(TITLE_FONT);
+ createLabel(headerInfoComposite, modifiedAttribute);// .setFont(TITLE_FONT);
toolkit.createText(headerInfoComposite, modifiedDateString, SWT.FLAT | SWT.READ_ONLY);
}
-
- if (getActivityUrl() != null) {
+
+ if (getActivityUrl() != null) {
Hyperlink hyperlink = toolkit.createHyperlink(headerInfoComposite, "Past activity", SWT.NONE);
hyperlink.addHyperlinkListener(new HyperlinkAdapter() {
@Override
@@ -813,7 +815,8 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
}
}
});
-// GridDataFactory.fillDefaults().span(1, SWT.DEFAULT).align(SWT.RIGHT, SWT.DEFAULT).applyTo(hyperlink);
+ // GridDataFactory.fillDefaults().span(1,
+ // SWT.DEFAULT).align(SWT.RIGHT, SWT.DEFAULT).applyTo(hyperlink);
}
}
@@ -834,7 +837,6 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
value = attribute.getValue();
}
text = toolkit.createText(composite, value, style);
- text.setData(attribute);
if (attribute != null && !attribute.isReadOnly()) {
text.setData(attribute);
text.addModifyListener(new ModifyListener() {
@@ -1002,8 +1004,8 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
RepositoryTaskAttribute attribute = taskData.getAttribute(RepositoryTaskAttribute.SUMMARY);
if (attribute != null) {
-// Label summaryLabel = createLabel(summaryComposite, attribute);
-// summaryLabel.setFont(TITLE_FONT);
+ // Label summaryLabel = createLabel(summaryComposite, attribute);
+ // summaryLabel.setFont(TITLE_FONT);
summaryText = createTextField(summaryComposite, attribute, SWT.FLAT);
IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager();
Font summaryFont = themeManager.getCurrentTheme().getFontRegistry().get(
@@ -1887,7 +1889,6 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
protected void addActionButtons(Composite buttonComposite) {
submitButton = toolkit.createButton(buttonComposite, LABEL_BUTTON_SUBMIT, SWT.NONE);
GridData submitButtonData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- submitButtonData.horizontalSpan = 1;
submitButtonData.widthHint = 100;
submitButton.setLayoutData(submitButtonData);
submitButton.addListener(SWT.Selection, new Listener() {
@@ -1896,6 +1897,8 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
}
});
submitButton.setToolTipText("Submit to " + this.repository.getUrl());
+
+ toolkit.createLabel(buttonComposite, " ");
ITask task = TasksUiPlugin.getTaskListManager().getTaskList().getTask(repository.getUrl(), taskData.getId());
if (attachContext && task != null) {
@@ -2468,9 +2471,6 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
protected void addAttachContextButton(Composite buttonComposite, ITask task) {
attachContextButton = toolkit.createButton(buttonComposite, "Attach Context", SWT.CHECK);
attachContextButton.setImage(TaskListImages.getImage(TaskListImages.CONTEXT_ATTACH));
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- data.horizontalSpan = 4;
- attachContextButton.setLayoutData(data);
}
/**

Back to the top