Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbecker2011-02-28 21:12:06 +0000
committerfbecker2011-02-28 21:12:06 +0000
commitc7a25dc39530059036063865132ee6a8c2e01625 (patch)
treed381278809256676ff4e13cdb2d58108a9276489 /org.eclipse.mylyn.tasks.ui
parent4ba11dbe28fc2377fa6c8349b1cc09236071b829 (diff)
downloadorg.eclipse.mylyn.tasks-c7a25dc39530059036063865132ee6a8c2e01625.tar.gz
org.eclipse.mylyn.tasks-c7a25dc39530059036063865132ee6a8c2e01625.tar.xz
org.eclipse.mylyn.tasks-c7a25dc39530059036063865132ee6a8c2e01625.zip
ASSIGNED - bug 337908: Support custom attribute editor parts
https://bugs.eclipse.org/bugs/show_bug.cgi?id=337908
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java21
1 files changed, 14 insertions, 7 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 42e673fe9..d47b735e0 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
@@ -1813,13 +1813,20 @@ public abstract class AbstractTaskEditorPage extends TaskFormPage implements ISe
}
}
} else {
- TaskEditorAttributePart actionPart = (TaskEditorAttributePart) this.getPart(AbstractTaskEditorPage.ID_PART_ATTRIBUTES);
- Section section = actionPart.getSection();
- boolean expanded = section.isExpanded();
- if (!expanded && actionPart != null && actionPart.getControl() instanceof ExpandableComposite) {
- CommonFormUtil.setExpanded((ExpandableComposite) actionPart.getControl(), true);
- if (!expanded) {
- CommonFormUtil.setExpanded((ExpandableComposite) actionPart.getControl(), false);
+ AbstractTaskEditorPart actionPart = this.getPart(AbstractTaskEditorPage.ID_PART_ATTRIBUTES);
+ Section section;
+ if (actionPart instanceof AbstractTaskEditorSection) {
+ section = ((AbstractTaskEditorSection) actionPart).getSection();
+ } else {
+ section = null;
+ }
+ if (section != null) {
+ boolean expanded = section.isExpanded();
+ if (!expanded && actionPart != null && actionPart.getControl() instanceof ExpandableComposite) {
+ CommonFormUtil.setExpanded((ExpandableComposite) actionPart.getControl(), true);
+ if (!expanded) {
+ CommonFormUtil.setExpanded((ExpandableComposite) actionPart.getControl(), false);
+ }
}
}

Back to the top