|
Lines 18-23
Link Here
|
| 18 |
import org.eclipse.jface.dialogs.Dialog; |
18 |
import org.eclipse.jface.dialogs.Dialog; |
| 19 |
import org.eclipse.jface.dialogs.MessageDialog; |
19 |
import org.eclipse.jface.dialogs.MessageDialog; |
| 20 |
import org.eclipse.jface.layout.GridDataFactory; |
20 |
import org.eclipse.jface.layout.GridDataFactory; |
|
|
21 |
import org.eclipse.jface.text.ITextListener; |
| 22 |
import org.eclipse.jface.text.TextEvent; |
| 23 |
import org.eclipse.jface.text.TextViewer; |
| 21 |
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin; |
24 |
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin; |
| 22 |
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaReportElement; |
25 |
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaReportElement; |
| 23 |
import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants; |
26 |
import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants; |
|
Lines 33-38
Link Here
|
| 33 |
import org.eclipse.mylyn.tasks.ui.editors.AbstractRepositoryTaskEditor; |
36 |
import org.eclipse.mylyn.tasks.ui.editors.AbstractRepositoryTaskEditor; |
| 34 |
import org.eclipse.mylyn.tasks.ui.editors.TaskEditor; |
37 |
import org.eclipse.mylyn.tasks.ui.editors.TaskEditor; |
| 35 |
import org.eclipse.swt.SWT; |
38 |
import org.eclipse.swt.SWT; |
|
|
39 |
import org.eclipse.swt.custom.StyledText; |
| 36 |
import org.eclipse.swt.events.ModifyEvent; |
40 |
import org.eclipse.swt.events.ModifyEvent; |
| 37 |
import org.eclipse.swt.events.ModifyListener; |
41 |
import org.eclipse.swt.events.ModifyListener; |
| 38 |
import org.eclipse.swt.events.SelectionAdapter; |
42 |
import org.eclipse.swt.events.SelectionAdapter; |
|
Lines 162-169
Link Here
|
| 162 |
if (attribute != null && !attribute.isReadOnly()) { |
166 |
if (attribute != null && !attribute.isReadOnly()) { |
| 163 |
Label label = createLabel(composite, attribute); |
167 |
Label label = createLabel(composite, attribute); |
| 164 |
GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label); |
168 |
GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label); |
| 165 |
Text urlField = createTextField(composite, attribute, SWT.FLAT); |
169 |
|
| 166 |
GridDataFactory.fillDefaults().hint(135, SWT.DEFAULT).applyTo(urlField); |
170 |
TextViewer urlTextViewer = addTextEditor(repository, composite, attribute.getValue(), // |
|
|
171 |
false, SWT.FLAT); |
| 172 |
// false, SWT.FLAT | SWT.SINGLE); |
| 173 |
final StyledText urlText = urlTextViewer.getTextWidget(); |
| 174 |
urlText.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER); |
| 175 |
urlText.setIndent(2); |
| 176 |
|
| 177 |
final RepositoryTaskAttribute urlAttribute = attribute; |
| 178 |
|
| 179 |
urlTextViewer.setEditable(true); |
| 180 |
urlTextViewer.addTextListener(new ITextListener() { |
| 181 |
public void textChanged(TextEvent event) { |
| 182 |
String newValue = urlText.getText(); |
| 183 |
if (!newValue.equals(urlAttribute.getValue())) { |
| 184 |
urlAttribute.setValue(newValue); |
| 185 |
attributeChanged(urlAttribute); |
| 186 |
} |
| 187 |
} |
| 188 |
}); |
| 189 |
|
| 190 |
GridDataFactory.fillDefaults().hint(135, SWT.DEFAULT).applyTo(urlText); |
| 191 |
|
| 192 |
if (hasChanged(attribute)) { |
| 193 |
urlText.setBackground(getColorIncoming()); |
| 194 |
} |
| 167 |
} |
195 |
} |
| 168 |
|
196 |
|
| 169 |
attribute = this.taskData.getAttribute(BugzillaReportElement.STATUS_WHITEBOARD.getKeyString()); |
197 |
attribute = this.taskData.getAttribute(BugzillaReportElement.STATUS_WHITEBOARD.getKeyString()); |