Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2007-06-25 18:43:28 -0400
committerrelves2007-06-25 18:43:28 -0400
commita931b21be7dd85eab75c372f59fe33a743ee395a (patch)
tree05b66beebffe9da696975bc8a3b6db2901678bea
parentdb59c776f8150784cdc4df9fc8fd94316c712dcb (diff)
downloadorg.eclipse.mylyn.tasks-a931b21be7dd85eab75c372f59fe33a743ee395a.tar.gz
org.eclipse.mylyn.tasks-a931b21be7dd85eab75c372f59fe33a743ee395a.tar.xz
org.eclipse.mylyn.tasks-a931b21be7dd85eab75c372f59fe33a743ee395a.zip
NEW - bug 194325: NPE upon closing editor during submit
https://bugs.eclipse.org/bugs/show_bug.cgi?id=194325
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java8
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java11
2 files changed, 10 insertions, 9 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java
index 4f9c3bf64..822dc540f 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java
@@ -2353,8 +2353,6 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
return outlinePage;
}
- private boolean isDisposed = false;
-
private Button[] radios;
private Control[] radioOptions;
@@ -2634,7 +2632,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
@Override
public void showBusy(boolean busy) {
- if (!isDisposed && busy != formBusy) {
+ if (!getManagedForm().getForm().isDisposed() && busy != formBusy) {
// parentEditor.showBusy(busy);
if (synchronizeEditorAction != null) {
synchronizeEditorAction.setEnabled(!busy);
@@ -2856,7 +2854,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
}
} finally {
- if (!this.isDisposed) {
+ if (!getManagedForm().getForm().isDisposed()) {
setGlobalBusy(false);
}
}
@@ -2894,7 +2892,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
StatusHandler.log(exception.getStatus());
} else if (exception.getStatus().getCode() == RepositoryStatus.REPOSITORY_COMMENT_REQUIRED) {
StatusHandler.displayStatus("Comment required", exception.getStatus());
- if (!isDisposed && newCommentTextViewer != null
+ if (!getManagedForm().getForm().isDisposed() && newCommentTextViewer != null
&& !newCommentTextViewer.getControl().isDisposed()) {
newCommentTextViewer.getControl().setFocus();
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java
index 38dc211a7..75155c6b3 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java
@@ -122,11 +122,14 @@ public final class TaskEditor extends SharedHeaderFormEditor implements IBusyEdi
@SuppressWarnings("unchecked")
IFormPage[] getPages() {
+
ArrayList formPages = new ArrayList();
- for (int i = 0; i < pages.size(); i++) {
- Object page = pages.get(i);
- if (page instanceof IFormPage)
- formPages.add(page);
+ if (pages != null) {
+ for (int i = 0; i < pages.size(); i++) {
+ Object page = pages.get(i);
+ if (page instanceof IFormPage)
+ formPages.add(page);
+ }
}
return (IFormPage[]) formPages.toArray(new IFormPage[formPages.size()]);
}

Back to the top