Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchris.poon2015-11-17 17:11:21 -0500
committerGerrit Code Review @ Eclipse.org2015-12-01 20:15:00 -0500
commit444fcccff52839d95667e5bf2f9a816e1c51af4f (patch)
tree66ddad81c01be924cac1c64fedaaa94377d5df49 /org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data
parentff319144e7d78418205f186ae571b94048d08c46 (diff)
downloadorg.eclipse.mylyn.tasks-444fcccff52839d95667e5bf2f9a816e1c51af4f.tar.gz
org.eclipse.mylyn.tasks-444fcccff52839d95667e5bf2f9a816e1c51af4f.tar.xz
org.eclipse.mylyn.tasks-444fcccff52839d95667e5bf2f9a816e1c51af4f.zip
483421: enable attribute editors to be used for child attributes
Change-Id: I9f4f8bb7b62dd173850907dc5b5f17e819b66b35 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=483421 Signed-off-by: chris.poon <chris.poon@tasktop.com>
Diffstat (limited to 'org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModel.java15
1 files changed, 4 insertions, 11 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModel.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModel.java
index eab2bd361..a02a5b2d2 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModel.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModel.java
@@ -66,16 +66,11 @@ public class TaskDataModel {
/**
* Invoke upon change to attribute value.
- *
+ *
* @param attribute
* changed attribute
*/
public void attributeChanged(TaskAttribute attribute) {
- if (attribute.getParentAttribute() != getTaskData().getRoot()) {
- throw new RuntimeException(
- "Editing is only supported for attributes that are attached to the root of task data"); //$NON-NLS-1$
- }
-
unsavedChangedAttributes.add(attribute);
if (this.listeners != null) {
final TaskDataModelEvent event = new TaskDataModelEvent(this, EventKind.CHANGED, attribute);
@@ -84,8 +79,7 @@ public class TaskDataModel {
for (final TaskDataModelListener listener : listeners) {
SafeRunner.run(new ISafeRunnable() {
public void handleException(Throwable e) {
- StatusHandler
- .log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Listener failed", e)); //$NON-NLS-1$
+ StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Listener failed", e)); //$NON-NLS-1$
}
public void run() throws Exception {
@@ -98,7 +92,7 @@ public class TaskDataModel {
/**
* Returns the instance of <code>taskAttribute</code> that the user last read.
- *
+ *
* @param taskAttribute
* the attribute
* @return the last read state; null, if <code>taskAttribute</code> has never been read
@@ -182,8 +176,7 @@ public class TaskDataModel {
for (final TaskDataModelListener listener : listeners) {
SafeRunner.run(new ISafeRunnable() {
public void handleException(Throwable e) {
- StatusHandler
- .log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Listener failed", e)); //$NON-NLS-1$
+ StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Listener failed", e)); //$NON-NLS-1$
}
public void run() throws Exception {

Back to the top