Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsminto2009-05-28 21:35:13 +0000
committersminto2009-05-28 21:35:13 +0000
commitbf4b060aad3f72c8a81c397c691bf458909049ba (patch)
tree8a6a7c42779f4426aabb2e7f0ebfdf35447d62ad /org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java
parent3c24898cf3a97045dcc3c567b33e0e68ec553afa (diff)
downloadorg.eclipse.mylyn.tasks-bf4b060aad3f72c8a81c397c691bf458909049ba.tar.gz
org.eclipse.mylyn.tasks-bf4b060aad3f72c8a81c397c691bf458909049ba.tar.xz
org.eclipse.mylyn.tasks-bf4b060aad3f72c8a81c397c691bf458909049ba.zip
RESOLVED - bug 278298: [api] add support for enabling and disabling the new private section
https://bugs.eclipse.org/bugs/show_bug.cgi?id=278298
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java36
1 files changed, 30 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java
index de7ce570e..7a5eb3241 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java
@@ -404,6 +404,8 @@ public abstract class AbstractTaskEditorPage extends TaskFormPage implements ISe
private boolean needsSubmitButton;
+ private boolean needsPrivateSection;
+
private FocusTracker focusTracker;
/**
@@ -689,12 +691,14 @@ public abstract class AbstractTaskEditorPage extends TaskFormPage implements ISe
}
}.setPath(PATH_COMMENTS));
- descriptors.add(new TaskEditorPartDescriptor(ID_PART_PLANNING) {
- @Override
- public AbstractTaskEditorPart createPart() {
- return new TaskEditorPlanningPart();
- }
- }.setPath(PATH_PLANNING));
+ if (needsPrivateSection() || taskData.isNew()) {
+ descriptors.add(new TaskEditorPartDescriptor(ID_PART_PLANNING) {
+ @Override
+ public AbstractTaskEditorPart createPart() {
+ return new TaskEditorPlanningPart();
+ }
+ }.setPath(PATH_PLANNING));
+ }
descriptors.add(new TaskEditorPartDescriptor(ID_PART_ACTIONS) {
@Override
@@ -1470,6 +1474,26 @@ public abstract class AbstractTaskEditorPage extends TaskFormPage implements ISe
}
/**
+ * Returns true, if the page provides a submit button.
+ *
+ * @since 3.2
+ * @see #setNeedsPrivateSection(boolean)
+ */
+ public boolean needsPrivateSection() {
+ return needsPrivateSection;
+ }
+
+ /**
+ * Specifies that the page should provide the private section. This flag is not set by default.
+ *
+ * @since 3.2
+ * @see #needsPrivateSection()
+ */
+ public void setNeedsPrivateSection(boolean needsPrivateSection) {
+ this.needsPrivateSection = needsPrivateSection;
+ }
+
+ /**
* This is a provisional method. Do not call or override until the API has been finalized. See bug 274790 for
* details.
*

Back to the top