|
Lines 10-15
Link Here
|
| 10 |
|
10 |
|
| 11 |
import java.text.MessageFormat; |
11 |
import java.text.MessageFormat; |
| 12 |
|
12 |
|
|
|
13 |
import org.eclipse.jface.dialogs.MessageDialog; |
| 13 |
import org.eclipse.mylyn.tasks.core.AbstractTask; |
14 |
import org.eclipse.mylyn.tasks.core.AbstractTask; |
| 14 |
import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute; |
15 |
import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute; |
| 15 |
import org.eclipse.mylyn.tasks.core.RepositoryTaskData; |
16 |
import org.eclipse.mylyn.tasks.core.RepositoryTaskData; |
|
Lines 32-45
Link Here
|
| 32 |
|
33 |
|
| 33 |
public NewXPlannerTaskEditor(FormEditor editor) { |
34 |
public NewXPlannerTaskEditor(FormEditor editor) { |
| 34 |
super(editor); |
35 |
super(editor); |
| 35 |
|
|
|
| 36 |
} |
36 |
} |
| 37 |
// private Label remainingTimeValueLabel; |
|
|
| 38 |
// private Button completedButton; |
| 39 |
|
37 |
|
| 40 |
public void init(IEditorSite site, IEditorInput input) { |
38 |
public void init(IEditorSite site, IEditorInput input) { |
| 41 |
super.init(site, input); |
39 |
super.init(site, input); |
| 42 |
extraControls = new XPlannerTaskEditorExtraControls(this, getRepositoryTaskData()); |
40 |
extraControls = new XPlannerTaskEditorExtraControls(this, getRepositoryTaskData()); |
|
|
41 |
setExpandAttributeSection(true); |
| 43 |
} |
42 |
} |
| 44 |
|
43 |
|
| 45 |
protected void validateInput() { |
44 |
protected void validateInput() { |
|
Lines 109-112
Link Here
|
| 109 |
public boolean xplannerAttributeChanged(RepositoryTaskAttribute attribute) { |
108 |
public boolean xplannerAttributeChanged(RepositoryTaskAttribute attribute) { |
| 110 |
return attributeChanged(attribute); |
109 |
return attributeChanged(attribute); |
| 111 |
} |
110 |
} |
|
|
111 |
|
| 112 |
@Override |
| 113 |
public void submitToRepository() { |
| 114 |
boolean ok = true; |
| 115 |
|
| 116 |
if (summaryText.getText().equals("")) { |
| 117 |
MessageDialog.openInformation(this.getSite().getShell(), "Submit Error", |
| 118 |
"Please provide a name for the new task."); |
| 119 |
summaryText.setFocus(); |
| 120 |
ok = false; |
| 121 |
} |
| 122 |
|
| 123 |
if (ok) { |
| 124 |
super.submitToRepository(); |
| 125 |
} |
| 126 |
} |
| 127 |
|
| 128 |
|
| 112 |
} |
129 |
} |