Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 166595 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java (-4 / +157 lines)
Lines 7-26 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     Tasktop Technologies - initial API and implementation
9
 *     Tasktop Technologies - initial API and implementation
10
 *     Frank Becker - enhancements for bug 166595
10
 *******************************************************************************/
11
 *******************************************************************************/
11
12
12
package org.eclipse.mylyn.internal.bugzilla.ui.editor;
13
package org.eclipse.mylyn.internal.bugzilla.ui.editor;
13
14
15
import java.util.Collections;
16
import java.util.HashMap;
17
import java.util.List;
18
import java.util.Map;
14
import java.util.Set;
19
import java.util.Set;
15
20
16
import org.eclipse.core.runtime.CoreException;
21
import org.eclipse.core.runtime.CoreException;
22
import org.eclipse.core.runtime.IStatus;
23
import org.eclipse.core.runtime.NullProgressMonitor;
17
import org.eclipse.jface.dialogs.IMessageProvider;
24
import org.eclipse.jface.dialogs.IMessageProvider;
25
import org.eclipse.mylyn.commons.core.StatusHandler;
18
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
26
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
19
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
27
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
20
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCustomField;
28
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCustomField;
21
import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
29
import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
30
import org.eclipse.mylyn.internal.bugzilla.core.RepositoryConfiguration;
31
import org.eclipse.mylyn.internal.bugzilla.ui.BugzillaUiPlugin;
32
import org.eclipse.mylyn.tasks.core.RepositoryStatus;
22
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
33
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
23
import org.eclipse.mylyn.tasks.core.data.TaskData;
34
import org.eclipse.mylyn.tasks.core.data.TaskData;
35
import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
36
import org.eclipse.mylyn.tasks.core.data.TaskDataModelEvent;
37
import org.eclipse.mylyn.tasks.core.data.TaskDataModelListener;
24
import org.eclipse.mylyn.tasks.ui.TasksUi;
38
import org.eclipse.mylyn.tasks.ui.TasksUi;
25
import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
39
import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
26
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
40
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
Lines 28-33 Link Here
28
import org.eclipse.mylyn.tasks.ui.editors.AttributeEditorFactory;
42
import org.eclipse.mylyn.tasks.ui.editors.AttributeEditorFactory;
29
import org.eclipse.mylyn.tasks.ui.editors.LayoutHint;
43
import org.eclipse.mylyn.tasks.ui.editors.LayoutHint;
30
import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
44
import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
45
import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
31
import org.eclipse.mylyn.tasks.ui.editors.TaskEditorPartDescriptor;
46
import org.eclipse.mylyn.tasks.ui.editors.TaskEditorPartDescriptor;
32
47
33
/**
48
/**
Lines 38-45 Link Here
38
53
39
	public static final String ID_PART_BUGZILLA_PLANNING = "org.eclipse.mylyn.bugzilla.ui.editors.part.planning"; //$NON-NLS-1$
54
	public static final String ID_PART_BUGZILLA_PLANNING = "org.eclipse.mylyn.bugzilla.ui.editors.part.planning"; //$NON-NLS-1$
40
55
56
	private final Map<TaskAttribute, AbstractAttributeEditor> attributeEditorMap;
57
58
	private TaskDataModelListener productListener;
59
41
	public BugzillaTaskEditorPage(TaskEditor editor) {
60
	public BugzillaTaskEditorPage(TaskEditor editor) {
42
		super(editor, BugzillaCorePlugin.CONNECTOR_KIND);
61
		this(editor, BugzillaCorePlugin.CONNECTOR_KIND);
43
	}
62
	}
44
63
45
	/**
64
	/**
Lines 50-55 Link Here
50
	 */
69
	 */
51
	public BugzillaTaskEditorPage(TaskEditor editor, String connectorKind) {
70
	public BugzillaTaskEditorPage(TaskEditor editor, String connectorKind) {
52
		super(editor, connectorKind);
71
		super(editor, connectorKind);
72
		this.attributeEditorMap = new HashMap<TaskAttribute, AbstractAttributeEditor>();
53
	}
73
	}
54
74
55
	@Override
75
	@Override
Lines 125-130 Link Here
125
					});
145
					});
126
				}
146
				}
127
147
148
				BugzillaTaskEditorPage.this.addToAttributeEditorMap(taskAttribute, editor);
128
				return editor;
149
				return editor;
129
			}
150
			}
130
		};
151
		};
Lines 132-142 Link Here
132
	}
153
	}
133
154
134
	@Override
155
	@Override
156
	protected void createParts() {
157
		attributeEditorMap.clear();
158
		super.createParts();
159
	}
160
161
	@Override
162
	protected TaskDataModel createModel(TaskEditorInput input) throws CoreException {
163
		TaskDataModel model = super.createModel(input);
164
		productListener = new ProductSelectionListener();
165
		model.addModelListener(productListener);
166
		return model;
167
	}
168
169
	@Override
135
	public void doSubmit() {
170
	public void doSubmit() {
136
171
137
		TaskAttribute summaryAttribute = getModel().getTaskData().getRoot().getMappedAttribute(TaskAttribute.SUMMARY);
172
		TaskAttribute summaryAttribute = getModel().getTaskData().getRoot().getMappedAttribute(TaskAttribute.SUMMARY);
138
		if (summaryAttribute != null && summaryAttribute.getValue().length() == 0) {
173
		if (summaryAttribute != null && summaryAttribute.getValue().length() == 0) {
139
			getTaskEditor().setMessage(Messages.BugzillaTaskEditorPage_Please_enter_a_short_summary_before_submitting, IMessageProvider.ERROR);
174
			getTaskEditor().setMessage(Messages.BugzillaTaskEditorPage_Please_enter_a_short_summary_before_submitting,
175
					IMessageProvider.ERROR);
140
			AbstractTaskEditorPart part = getPart(ID_PART_SUMMARY);
176
			AbstractTaskEditorPart part = getPart(ID_PART_SUMMARY);
141
			if (part != null) {
177
			if (part != null) {
142
				part.setFocus();
178
				part.setFocus();
Lines 147-153 Link Here
147
		TaskAttribute componentAttribute = getModel().getTaskData().getRoot().getMappedAttribute(
183
		TaskAttribute componentAttribute = getModel().getTaskData().getRoot().getMappedAttribute(
148
				BugzillaAttribute.COMPONENT.getKey());
184
				BugzillaAttribute.COMPONENT.getKey());
149
		if (componentAttribute != null && componentAttribute.getValue().length() == 0) {
185
		if (componentAttribute != null && componentAttribute.getValue().length() == 0) {
150
			getTaskEditor().setMessage(Messages.BugzillaTaskEditorPage_Please_select_a_component_before_submitting, IMessageProvider.ERROR);
186
			getTaskEditor().setMessage(Messages.BugzillaTaskEditorPage_Please_select_a_component_before_submitting,
187
					IMessageProvider.ERROR);
151
			AbstractTaskEditorPart part = getPart(ID_PART_ATTRIBUTES);
188
			AbstractTaskEditorPart part = getPart(ID_PART_ATTRIBUTES);
152
			if (part != null) {
189
			if (part != null) {
153
				part.setFocus();
190
				part.setFocus();
Lines 158-164 Link Here
158
		TaskAttribute descriptionAttribute = getModel().getTaskData().getRoot().getMappedAttribute(
195
		TaskAttribute descriptionAttribute = getModel().getTaskData().getRoot().getMappedAttribute(
159
				TaskAttribute.DESCRIPTION);
196
				TaskAttribute.DESCRIPTION);
160
		if (descriptionAttribute != null && descriptionAttribute.getValue().length() == 0) {
197
		if (descriptionAttribute != null && descriptionAttribute.getValue().length() == 0) {
161
			getTaskEditor().setMessage(Messages.BugzillaTaskEditorPage_Please_enter_a_description_before_submitting, IMessageProvider.ERROR);
198
			getTaskEditor().setMessage(Messages.BugzillaTaskEditorPage_Please_enter_a_description_before_submitting,
199
					IMessageProvider.ERROR);
162
			AbstractTaskEditorPart descriptionPart = getPart(ID_PART_DESCRIPTION);
200
			AbstractTaskEditorPart descriptionPart = getPart(ID_PART_DESCRIPTION);
163
			if (descriptionPart != null) {
201
			if (descriptionPart != null) {
164
				descriptionPart.setFocus();
202
				descriptionPart.setFocus();
Lines 169-172 Link Here
169
		super.doSubmit();
207
		super.doSubmit();
170
	}
208
	}
171
209
210
	/**
211
	 * @since 3.1
212
	 */
213
	public void addToAttributeEditorMap(TaskAttribute attribute, AbstractAttributeEditor editor) {
214
		if (attributeEditorMap.containsKey(attribute)) {
215
			attributeEditorMap.remove(attribute);
216
		}
217
		attributeEditorMap.put(attribute, editor);
218
	}
219
220
	/**
221
	 * @since 3.1
222
	 */
223
	public AbstractAttributeEditor getEditorForAttribute(TaskAttribute attribute) {
224
		return attributeEditorMap.get(attribute);
225
	}
226
227
	/**
228
	 * @since 3.1
229
	 */
230
	public Map<TaskAttribute, AbstractAttributeEditor> getAttributeEditorMap() {
231
		return attributeEditorMap;
232
	}
233
234
	/**
235
	 * @since 3.1
236
	 */
237
	public void refresh() {
238
		try {
239
			showEditorBusy(true);
240
			for (AbstractAttributeEditor abstractAttributeEditor : attributeEditorMap.values()) {
241
				try {
242
					abstractAttributeEditor.refresh();
243
				} catch (UnsupportedOperationException e) {
244
					// ignore
245
				}
246
			}
247
		} finally {
248
			showEditorBusy(false);
249
		}
250
	}
251
252
	public void refresh(TaskAttribute attributeComponent) {
253
		AbstractAttributeEditor editor = getEditorForAttribute(attributeComponent);
254
		if (editor != null) {
255
			try {
256
				editor.refresh();
257
			} catch (UnsupportedOperationException e) {
258
				// ignore
259
			}
260
		}
261
	}
262
263
	private class ProductSelectionListener extends TaskDataModelListener {
264
		@Override
265
		public void attributeChanged(TaskDataModelEvent event) {
266
			TaskAttribute taskAttribute = event.getTaskAttribute();
267
			if (taskAttribute != null) {
268
				if (taskAttribute.getId().equals(BugzillaAttribute.PRODUCT.getKey())) {
269
					RepositoryConfiguration repositoryConfiguration = null;
270
					try {
271
						repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(
272
								getModel().getTaskRepository(), false, new NullProgressMonitor());
273
					} catch (CoreException e) {
274
						StatusHandler.log(new RepositoryStatus(getTaskRepository(), IStatus.ERROR,
275
								BugzillaUiPlugin.ID_PLUGIN, 0, "Failed to obtain repository configuration", e)); //$NON-NLS-1$
276
						getTaskEditor().setMessage("Problem occured when updating attributes", IMessageProvider.ERROR); //$NON-NLS-1$
277
						return;
278
					}
279
280
					TaskAttribute attributeComponent = taskAttribute.getTaskData().getRoot().getMappedAttribute(
281
							BugzillaAttribute.COMPONENT.getKey());
282
					if (attributeComponent != null) {
283
						List<String> optionValues = repositoryConfiguration.getComponents(taskAttribute.getValue());
284
						Collections.sort(optionValues);
285
						attributeComponent.clearOptions();
286
						for (String option : optionValues) {
287
							attributeComponent.putOption(option, option);
288
						}
289
						if (optionValues.size() == 1) {
290
							attributeComponent.setValue(optionValues.get(0));
291
						} else {
292
							attributeComponent.setValue(""); //$NON-NLS-1$
293
						}
294
						refresh(attributeComponent);
295
					}
296
297
					TaskAttribute attributeTargetMilestone = taskAttribute.getTaskData().getRoot().getMappedAttribute(
298
							BugzillaAttribute.TARGET_MILESTONE.getKey());
299
					if (attributeTargetMilestone != null) {
300
						List<String> optionValues = repositoryConfiguration.getTargetMilestones(taskAttribute.getValue());
301
						Collections.sort(optionValues);
302
						attributeTargetMilestone.clearOptions();
303
						for (String option : optionValues) {
304
							attributeTargetMilestone.putOption(option, option);
305
						}
306
						if (optionValues.size() == 1) {
307
							attributeTargetMilestone.setValue(optionValues.get(0));
308
						} else {
309
							attributeTargetMilestone.setValue("---"); //$NON-NLS-1$
310
						}
311
						refresh(attributeTargetMilestone);
312
					}
313
314
					TaskAttribute attributeDefaultAssignee = taskAttribute.getTaskData().getRoot().getMappedAttribute(
315
							BugzillaAttribute.SET_DEFAULT_ASSIGNEE.getKey());
316
					if (attributeDefaultAssignee != null) {
317
						attributeDefaultAssignee.setValue("1"); //$NON-NLS-1$
318
						refresh(attributeDefaultAssignee);
319
					}
320
				}
321
			}
322
		}
323
	}
324
172
}
325
}
(-)src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttribute.java (-1 / +1 lines)
Lines 109-115 Link Here
109
109
110
	PRIORITY(Messages.BugzillaAttribute_Priority, "priority", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
110
	PRIORITY(Messages.BugzillaAttribute_Priority, "priority", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
111
111
112
	PRODUCT(Messages.BugzillaAttribute_Product, "product", TaskAttribute.TYPE_SHORT_TEXT, false, true), //$NON-NLS-1$
112
	PRODUCT(Messages.BugzillaAttribute_Product, "product", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
113
113
114
	REP_PLATFORM(Messages.BugzillaAttribute_Platform, "rep_platform", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
114
	REP_PLATFORM(Messages.BugzillaAttribute_Platform, "rep_platform", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
115
115
(-)src/org/eclipse/mylyn/internal/tasks/ui/editors/SingleSelectionAttributeEditor.java (-29 / +50 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
* Copyright (c) 2004, 2008 Tasktop Technologies and others.
2
 * Copyright (c) 2004, 2008 Tasktop Technologies and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 34-39 Link Here
34
34
35
	private CCombo combo;
35
	private CCombo combo;
36
36
37
	private boolean ignoreNotification;
38
39
	private Text text;
40
37
	public SingleSelectionAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute) {
41
	public SingleSelectionAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute) {
38
		super(manager, taskAttribute);
42
		super(manager, taskAttribute);
39
	}
43
	}
Lines 41-88 Link Here
41
	@Override
45
	@Override
42
	public void createControl(Composite parent, FormToolkit toolkit) {
46
	public void createControl(Composite parent, FormToolkit toolkit) {
43
		if (isReadOnly()) {
47
		if (isReadOnly()) {
44
			Text text = new Text(parent, SWT.FLAT | SWT.READ_ONLY);
48
			text = new Text(parent, SWT.FLAT | SWT.READ_ONLY);
45
			text.setFont(EditorUtil.TEXT_FONT);
46
			toolkit.adapt(text, false, false);
49
			toolkit.adapt(text, false, false);
50
			text.setFont(EditorUtil.TEXT_FONT);
47
			text.setData(FormToolkit.KEY_DRAW_BORDER, Boolean.FALSE);
51
			text.setData(FormToolkit.KEY_DRAW_BORDER, Boolean.FALSE);
48
			String label = getValueLabel();
52
			refresh();
49
			if ("".equals(label)) { //$NON-NLS-1$
50
				// if set to the empty string the label will use 64px on GTK 
51
				text.setText(" "); //$NON-NLS-1$
52
			} else {
53
				text.setText(label);
54
			}
55
			setControl(text);
53
			setControl(text);
56
		} else {
54
		} else {
57
			combo = new CCombo(parent, SWT.FLAT | SWT.READ_ONLY);
55
			combo = new CCombo(parent, SWT.FLAT | SWT.READ_ONLY);
58
			toolkit.adapt(combo, false, false);
56
			toolkit.adapt(combo, false, false);
59
			combo.setFont(EditorUtil.TEXT_FONT);
57
			combo.setFont(EditorUtil.TEXT_FONT);
60
			combo.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
58
			combo.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
61
59
			refresh();
62
			Map<String, String> labelByValue = getAttributeMapper().getOptions(getTaskAttribute());
63
			if (labelByValue != null) {
64
				values = labelByValue.keySet().toArray(new String[0]);
65
				for (String value : values) {
66
					combo.add(labelByValue.get(value));
67
				}
68
			}
69
70
			select(getValue(), getValueLabel());
71
72
			if (values != null) {
60
			if (values != null) {
73
				combo.addSelectionListener(new SelectionAdapter() {
61
				combo.addSelectionListener(new SelectionAdapter() {
74
					@Override
62
					@Override
75
					public void widgetSelected(SelectionEvent event) {
63
					public void widgetSelected(SelectionEvent event) {
76
						int index = combo.getSelectionIndex();
64
						if (!ignoreNotification) {
77
						if (index > -1) {
65
							int index = combo.getSelectionIndex();
78
							Assert.isNotNull(values);
66
							if (index > -1) {
79
							Assert.isLegal(index >= 0 && index <= values.length - 1);
67
								Assert.isNotNull(values);
80
							setValue(values[index]);
68
								Assert.isLegal(index >= 0 && index <= values.length - 1);
69
								setValue(values[index]);
70
							}
81
						}
71
						}
82
					}
72
					}
83
				});
73
				});
84
			}
74
			}
85
86
			setControl(combo);
75
			setControl(combo);
87
		}
76
		}
88
	}
77
	}
Lines 109-116 Link Here
109
	}
98
	}
110
99
111
	public void setValue(String value) {
100
	public void setValue(String value) {
112
		getAttributeMapper().setValue(getTaskAttribute(), value);
101
		String oldValue = getAttributeMapper().getValue(getTaskAttribute());
113
		attributeChanged();
102
		if (!oldValue.equals(value)) {
103
			getAttributeMapper().setValue(getTaskAttribute(), value);
104
			attributeChanged();
105
		}
114
	}
106
	}
115
107
116
	void selectDefaultValue() {
108
	void selectDefaultValue() {
Lines 120-123 Link Here
120
		}
112
		}
121
	}
113
	}
122
114
115
	@Override
116
	public void refresh() {
117
		try {
118
			ignoreNotification = true;
119
			if (text != null) {
120
				String label = getValueLabel();
121
				if ("".equals(label)) { //$NON-NLS-1$
122
					// if set to the empty string the label will use 64px on GTK 
123
					text.setText(" "); //$NON-NLS-1$
124
				} else {
125
					text.setText(label);
126
				}
127
			} else {
128
				combo.removeAll();
129
				Map<String, String> labelByValue = getAttributeMapper().getOptions(getTaskAttribute());
130
				if (labelByValue != null) {
131
					values = labelByValue.keySet().toArray(new String[0]);
132
					for (String value : values) {
133
						combo.add(labelByValue.get(value));
134
					}
135
				}
136
				select(getValue(), getValueLabel());
137
				combo.redraw();
138
			}
139
		} finally {
140
			ignoreNotification = false;
141
		}
142
	}
143
123
}
144
}
(-)src/org/eclipse/mylyn/internal/tasks/ui/editors/BooleanAttributeEditor.java (-4 / +20 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
* Copyright (c) 2004, 2008 Tasktop Technologies and others.
2
 * Copyright (c) 2004, 2008 Tasktop Technologies and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 26-46 Link Here
26
 */
26
 */
27
public class BooleanAttributeEditor extends AbstractAttributeEditor {
27
public class BooleanAttributeEditor extends AbstractAttributeEditor {
28
28
29
	private Button button;
30
31
	private boolean ignoreNotification;
32
29
	public BooleanAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute) {
33
	public BooleanAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute) {
30
		super(manager, taskAttribute);
34
		super(manager, taskAttribute);
31
	}
35
	}
32
36
33
	@Override
37
	@Override
34
	public void createControl(Composite parent, FormToolkit toolkit) {
38
	public void createControl(Composite parent, FormToolkit toolkit) {
35
		final Button button = toolkit.createButton(parent, super.getLabel(), SWT.CHECK);
39
		button = toolkit.createButton(parent, super.getLabel(), SWT.CHECK);
36
		button.setEnabled(!isReadOnly());
40
		button.setEnabled(!isReadOnly());
37
		button.setSelection(getValue());
38
		button.addSelectionListener(new SelectionAdapter() {
41
		button.addSelectionListener(new SelectionAdapter() {
39
			@Override
42
			@Override
40
			public void widgetSelected(SelectionEvent e) {
43
			public void widgetSelected(SelectionEvent e) {
41
				setValue(button.getSelection());
44
				if (!ignoreNotification) {
45
					setValue(button.getSelection());
46
				}
42
			}
47
			}
43
		});
48
		});
49
		refresh();
44
		setControl(button);
50
		setControl(button);
45
	}
51
	}
46
52
Lines 58-61 Link Here
58
		attributeChanged();
64
		attributeChanged();
59
	}
65
	}
60
66
67
	@Override
68
	public void refresh() {
69
		try {
70
			ignoreNotification = true;
71
			button.setSelection(getValue());
72
		} finally {
73
			ignoreNotification = false;
74
		}
75
	}
76
61
}
77
}
(-)src/org/eclipse/mylyn/tasks/ui/editors/AbstractAttributeEditor.java (+15 lines)
Lines 213-216 Link Here
213
		this.readOnly = readOnly;
213
		this.readOnly = readOnly;
214
	}
214
	}
215
215
216
	/**
217
	 * Refreshes the state of the widget from the data model. The default implementation throws
218
	 * <code>UnsupportedOperationException</code>.
219
	 * 
220
	 * <p>
221
	 * Subclasses should overwrite this method.
222
	 * 
223
	 * @since 3.1
224
	 * @throws UnsupportedOperationException
225
	 *             if this method is not supported by the editor
226
	 */
227
	public void refresh() {
228
		throw new UnsupportedOperationException();
229
	}
230
216
}
231
}

Return to bug 166595