Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2011-08-26 21:31:54 +0000
committerSteffen Pingel2011-08-26 21:31:54 +0000
commit5e5f84049cb73a53b079166193ec7f6bc4f2964f (patch)
treeb12576b0b422c6edb69319bb8b18d8746280c8b8 /org.eclipse.mylyn.tasks.ui
parent187e101740d60dbfd9f61b2c23c96e9c8a3a0b78 (diff)
downloadorg.eclipse.mylyn.tasks-5e5f84049cb73a53b079166193ec7f6bc4f2964f.tar.gz
org.eclipse.mylyn.tasks-5e5f84049cb73a53b079166193ec7f6bc4f2964f.tar.xz
org.eclipse.mylyn.tasks-5e5f84049cb73a53b079166193ec7f6bc4f2964f.zip
NEW - bug 349473: task outline selection does not focus on comment for a
task with many comments https://bugs.eclipse.org/bugs/show_bug.cgi?id=349473
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java22
1 files changed, 15 insertions, 7 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java
index ffbdecbd9..c877b179a 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java
@@ -229,10 +229,16 @@ public class TaskEditorCommentPart extends AbstractTaskEditorPart {
return renderedInSubSection;
}
+ public void setExpanded(boolean expanded) {
+ if (groupSection != null && groupSection.isExpanded() != expanded) {
+ CommonFormUtil.setExpanded(groupSection, expanded);
+ }
+ }
+
/**
* Expands this group and all comments in it.
*/
- public void setExpanded(boolean expanded) {
+ public void setFullyExpanded(boolean expanded) {
if (groupSection != null && groupSection.isExpanded() != expanded) {
CommonFormUtil.setExpanded(groupSection, expanded);
}
@@ -592,7 +598,7 @@ public class TaskEditorCommentPart extends AbstractTaskEditorPart {
List<CommentGroupViewer> viewers = getCommentGroupViewers();
for (int i = 0; i < viewers.size(); i++) {
if (viewers.get(i).isExpanded()) {
- viewers.get(i).setExpanded(false);
+ viewers.get(i).setFullyExpanded(false);
collapsed = viewers.get(i).isRenderedInSubSection();
// bug 280152: collapse all groups
//break;
@@ -714,10 +720,10 @@ public class TaskEditorCommentPart extends AbstractTaskEditorPart {
CommonFormUtil.setExpanded(section, true);
if (expandViewers) {
- List<CommentGroupViewer> viewers = getCommentGroupViewers();
- for (int i = viewers.size() - 1; i >= 0; i--) {
- if (!viewers.get(i).isFullyExpanded()) {
- viewers.get(i).setExpanded(true);
+ List<CommentGroupViewer> groupViewers = getCommentGroupViewers();
+ for (int i = groupViewers.size() - 1; i >= 0; i--) {
+ if (!groupViewers.get(i).isFullyExpanded()) {
+ groupViewers.get(i).setFullyExpanded(true);
}
}
}
@@ -845,7 +851,9 @@ public class TaskEditorCommentPart extends AbstractTaskEditorPart {
for (CommentGroupViewer groupViewer : groupViewers) {
for (CommentViewer viewer : groupViewer.getCommentViewers()) {
if (viewer.getTaskAttribute().equals(commentAttribute)) {
- //CommonFormUtil.ensureVisible(viewer.getControl());
+ // expand section
+ groupViewer.setExpanded(true);
+
// EditorUtil is consistent with behavior of outline
EditorUtil.reveal(getTaskEditorPage().getManagedForm().getForm(), commentAttribute.getId());
return viewer;

Back to the top