Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPageFactory.java30
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java4
2 files changed, 32 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPageFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPageFactory.java
index 081e3c7c5..026632cb4 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPageFactory.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPageFactory.java
@@ -85,4 +85,34 @@ public abstract class AbstractTaskEditorPageFactory implements IPluginContributi
this.pluginId = pluginId;
}
+ /**
+ * Clients should override to provide an image for <code>page</code>. Invokes {@link #getPageImage()} for backwards
+ * compatibility.
+ *
+ * @param editor
+ * the task editor instance
+ * @param page
+ * the page that uses the image
+ * @return an image
+ * @since 3.10
+ */
+ public Image getPageImage(TaskEditor editor, IFormPage page) {
+ return getPageImage();
+ }
+
+ /**
+ * Clients should override to provide a label for <code>page</code>. Invokes {@link #getPageText()} for backwards
+ * compatibility.
+ *
+ * @param editor
+ * the task editor instance
+ * @param page
+ * the page that uses the label
+ * @return a label
+ * @since 3.10
+ */
+ public String getPageText(TaskEditor editor, IFormPage page) {
+ return getPageText();
+ }
+
}
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 daf2998ff..cd9113ab9 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
@@ -408,8 +408,8 @@ public class TaskEditor extends SharedHeaderFormEditor {
try {
IFormPage page = factory.createPage(this);
int index = addPage(page);
- setPageImage(index, factory.getPageImage());
- setPageText(index, factory.getPageText());
+ setPageImage(index, factory.getPageImage(this, page));
+ setPageText(index, factory.getPageText(this, page));
if (factory.getPriority() == AbstractTaskEditorPageFactory.PRIORITY_TASK) {
setActivePage(index);
}

Back to the top