Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2007-01-11 21:59:33 -0500
committerrelves2007-01-11 21:59:33 -0500
commit69e25ef97e57e6690d8230f9aec7ccae8bafebdf (patch)
tree9b187f232b9dc69a5d2a6181a11693376260113d /org.eclipse.mylyn.bugzilla.ui
parent393107f6f2c66693fa1cc306ad77080f17b8c718 (diff)
downloadorg.eclipse.mylyn.tasks-69e25ef97e57e6690d8230f9aec7ccae8bafebdf.tar.gz
org.eclipse.mylyn.tasks-69e25ef97e57e6690d8230f9aec7ccae8bafebdf.tar.xz
org.eclipse.mylyn.tasks-69e25ef97e57e6690d8230f9aec7ccae8bafebdf.zip
NEW - bug 170256: can't set assignee for new repository task (forced to be initial owner)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=170256
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui')
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java45
1 files changed, 45 insertions, 0 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 035e7b346..0cb22a432 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
@@ -13,15 +13,27 @@ package org.eclipse.mylar.internal.bugzilla.ui.editor;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
+import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.mylar.context.core.MylarStatusHandler;
+import org.eclipse.mylar.internal.bugzilla.core.BugzillaReportElement;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaRepositoryQuery;
import org.eclipse.mylar.internal.bugzilla.ui.BugzillaUiPlugin;
+import org.eclipse.mylar.tasks.core.RepositoryTaskAttribute;
import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
import org.eclipse.mylar.tasks.ui.editors.AbstractNewRepositoryTaskEditor;
import org.eclipse.mylar.tasks.ui.search.SearchHitCollector;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.widgets.FormToolkit;
/**
* An editor used to view a locally created bug that does not yet exist on a
@@ -53,6 +65,39 @@ public class NewBugzillaTaskEditor extends AbstractNewRepositoryTaskEditor {
super.updateTask();
}
+ @Override
+ protected void createCustomAttributeLayout(Composite composite) {
+ FormToolkit toolkit = getManagedForm().getToolkit();
+ Label label = toolkit.createLabel(composite, BugzillaReportElement.ASSIGNED_TO.toString());
+
+ GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
+ Composite textFieldComposite = toolkit.createComposite(composite);
+ GridLayout textLayout = new GridLayout();
+ textLayout.marginWidth = 1;
+ textLayout.marginHeight = 2;
+ textFieldComposite.setLayout(textLayout);
+ GridData textData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+ textData.horizontalSpan = 1;
+ textData.widthHint = 135;
+ RepositoryTaskAttribute attribute = taskData.getAttribute(RepositoryTaskAttribute.USER_ASSIGNED);
+ final Text text = createTextField(textFieldComposite, attribute, SWT.FLAT);
+ // text.setFont(COMMENT_FONT);
+ text.setLayoutData(textData);
+ toolkit.paintBordersFor(textFieldComposite);
+ text.setData(attribute);
+ text.addListener(SWT.KeyUp, new Listener() {
+ public void handleEvent(Event event) {
+ String sel = text.getText();
+ RepositoryTaskAttribute a = (RepositoryTaskAttribute) text.getData();
+ if (!(a.getValue().equals(sel))) {
+ a.setValue(sel);
+ markDirty(true);
+ }
+ }
+ });
+ text.addListener(SWT.FocusIn, new GenericListener());
+ }
+
// @Override
// protected void submitToRepository() {
// if (!prepareSubmit()) {

Back to the top