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