Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2007-02-15 19:15:20 +0000
committerrelves2007-02-15 19:15:20 +0000
commit8ccec937aded8fe59476c00f8afdb139203c1a06 (patch)
treef664b233f87d5d582a6211b7367693fc3c5d4239
parentb1a50c64c835ee5c45cb3e31b081a1e4767bd0fe (diff)
downloadorg.eclipse.mylyn.tasks-8ccec937aded8fe59476c00f8afdb139203c1a06.tar.gz
org.eclipse.mylyn.tasks-8ccec937aded8fe59476c00f8afdb139203c1a06.tar.xz
org.eclipse.mylyn.tasks-8ccec937aded8fe59476c00f8afdb139203c1a06.zip
NEW - bug 174205: "View past activity" link causes NullPointerException
https://bugs.eclipse.org/bugs/show_bug.cgi?id=174205
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java40
1 files changed, 22 insertions, 18 deletions
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 f3ff0946b..e4af10a98 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
@@ -283,19 +283,21 @@ public class TaskEditor extends FormEditor {
return;
}
-// @Override
-// public void setFocus() {
-// if (this.getActivePage() > -1 && this.getActivePage() != browserPageIndex) {
-// IFormPage page = this.getPages()[this.getActivePage()];
-// if (page != null) {
-// page.setFocus();
-// }
-// } else if(this.getActivePage() == browserPageIndex && webBrowser != null) {
-// webBrowser.setFocus();
-// }
-// }
-
- public void setFocusOfActivePage() {
+ // @Override
+ // public void setFocus() {
+ // if (this.getActivePage() > -1 && this.getActivePage() !=
+ // browserPageIndex) {
+ // IFormPage page = this.getPages()[this.getActivePage()];
+ // if (page != null) {
+ // page.setFocus();
+ // }
+ // } else if(this.getActivePage() == browserPageIndex && webBrowser != null)
+ // {
+ // webBrowser.setFocus();
+ // }
+ // }
+
+ public void setFocusOfActivePage() {
if (this.getActivePage() > -1 && this.getActivePage() != browserPageIndex) {
IFormPage page = this.getPages()[this.getActivePage()];
if (page != null) {
@@ -305,7 +307,7 @@ public class TaskEditor extends FormEditor {
webBrowser.setFocus();
}
}
-
+
public Browser getWebBrowser() {
return webBrowser;
}
@@ -315,8 +317,10 @@ public class TaskEditor extends FormEditor {
}
public void displayInBrowser(String url) {
- webBrowser.setUrl(url);
- revealBrowser();
+ if (webBrowser != null) {
+ webBrowser.setUrl(url);
+ revealBrowser();
+ }
}
@Override
@@ -449,11 +453,11 @@ public class TaskEditor extends FormEditor {
* Update the title of the editor
*/
public void updateTitle(String name) {
- //setContentDescription(name);
+ // setContentDescription(name);
setPartName(name);
setTitleToolTip(name);
}
-
+
public ISelection getSelection() {
if (getSite() != null && getSite().getSelectionProvider() != null) {
return getSite().getSelectionProvider().getSelection();

Back to the top