Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-11-04 20:40:13 -0500
committermkersten2005-11-04 20:40:13 -0500
commit96e95cd856753d331854e045397cb15fc48b1468 (patch)
tree3e14bb9fefb99fbc88a95cbb6caab32b35ca22ce
parent961de6f1de144cd8ca2b4a56476654bb8854baae (diff)
downloadorg.eclipse.mylyn.tasks-96e95cd856753d331854e045397cb15fc48b1468.tar.gz
org.eclipse.mylyn.tasks-96e95cd856753d331854e045397cb15fc48b1468.tar.xz
org.eclipse.mylyn.tasks-96e95cd856753d331854e045397cb15fc48b1468.zip
Progress on Bugzilla Bug 114966: fix web docs support
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/IContextEditorFactory.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskEditor.java15
2 files changed, 17 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/IContextEditorFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/IContextEditorFactory.java
index 1bcd841ff..00b63dacc 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/IContextEditorFactory.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/IContextEditorFactory.java
@@ -27,4 +27,6 @@ public interface IContextEditorFactory {
public IEditorInput createEditorInput(IMylarContext context);
public String getTitle();
+
+ public void notifyEditorActivationChange(IEditorPart editor);
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskEditor.java
index 188bc44a0..2a0ad3aaf 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskEditor.java
@@ -11,6 +11,9 @@
package org.eclipse.mylar.tasklist.ui;
+import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionProvider;
@@ -45,6 +48,7 @@ public class TaskEditor extends MultiPageEditorPart {
private TaskSummaryEditor taskSummaryEditor;
private Browser webBrowser;
private TaskEditorInput taskEditorInput;
+ private List<IEditorPart> editorsToNotifyOnChange = new ArrayList<IEditorPart>();
private static class TaskEditorSelectionProvider extends MultiPageSelectionProvider {
private ISelection globalSelection;
@@ -95,6 +99,7 @@ public class TaskEditor extends MultiPageEditorPart {
for (IContextEditorFactory factory : MylarTasklistPlugin.getDefault().getContextEditors()) {
taskSummaryEditor.setParentEditor(this);
IEditorPart editor = factory.createEditor();
+ editorsToNotifyOnChange.add(editor);
index = addPage(editor, factory.createEditorInput(MylarPlugin.getContextManager().getActiveContext()));
setPageText(index++, factory.getTitle());
}
@@ -254,4 +259,14 @@ public class TaskEditor extends MultiPageEditorPart {
public Browser getWebBrowser() {
return webBrowser;
}
+
+ @Override
+ protected void pageChange(int newPageIndex) {
+ super.pageChange(newPageIndex);
+ for (IContextEditorFactory factory : MylarTasklistPlugin.getDefault().getContextEditors()) {
+ for (IEditorPart editor: editorsToNotifyOnChange) {
+ factory.notifyEditorActivationChange(editor);
+ }
+ }
+ }
}

Back to the top