|
Link Here
|
| 312 |
getTaskData().getAttributeMapper().updateTaskComment(taskComment, commentAttribute); |
312 |
getTaskData().getAttributeMapper().updateTaskComment(taskComment, commentAttribute); |
| 313 |
int style = ExpandableComposite.TREE_NODE | ExpandableComposite.LEFT_TEXT_CLIENT_ALIGNMENT |
313 |
int style = ExpandableComposite.TREE_NODE | ExpandableComposite.LEFT_TEXT_CLIENT_ALIGNMENT |
| 314 |
| ExpandableComposite.COMPACT; |
314 |
| ExpandableComposite.COMPACT; |
| 315 |
if (hasIncomingChanges || expandAllInProgress) { |
315 |
if (hasIncomingChanges || (expandAllInProgress && !suppressExpandViewers)) { |
| 316 |
style |= ExpandableComposite.EXPANDED; |
316 |
style |= ExpandableComposite.EXPANDED; |
| 317 |
} |
317 |
} |
| 318 |
commentComposite = toolkit.createExpandableComposite(composite, style); |
318 |
commentComposite = toolkit.createExpandableComposite(composite, style); |
|
Link Here
|
| 571 |
|
571 |
|
| 572 |
private Font privateFont; |
572 |
private Font privateFont; |
| 573 |
|
573 |
|
|
|
574 |
private boolean suppressExpandViewers; |
| 575 |
|
| 574 |
public TaskEditorCommentPart() { |
576 |
public TaskEditorCommentPart() { |
| 575 |
this.commentGroupStrategy = new CommentGroupStrategy() { |
577 |
this.commentGroupStrategy = new CommentGroupStrategy() { |
| 576 |
@Override |
578 |
@Override |
|
Link Here
|
| 698 |
} |
700 |
} |
| 699 |
} |
701 |
} |
| 700 |
|
702 |
|
| 701 |
private void expandAllComments() { |
703 |
private void expandAllComments(boolean expandViewers) { |
| 702 |
try { |
704 |
try { |
| 703 |
expandAllInProgress = true; |
705 |
expandAllInProgress = true; |
|
|
706 |
suppressExpandViewers = !expandViewers; |
| 704 |
getTaskEditorPage().setReflow(false); |
707 |
getTaskEditorPage().setReflow(false); |
| 705 |
|
708 |
|
| 706 |
if (section != null) { |
709 |
if (section != null) { |
|
Link Here
|
| 710 |
|
713 |
|
| 711 |
CommonFormUtil.setExpanded(section, true); |
714 |
CommonFormUtil.setExpanded(section, true); |
| 712 |
|
715 |
|
| 713 |
//if (expandGroups) { |
716 |
if (expandViewers) { |
| 714 |
List<CommentGroupViewer> viewers = getCommentGroupViewers(); |
717 |
List<CommentGroupViewer> viewers = getCommentGroupViewers(); |
| 715 |
for (int i = viewers.size() - 1; i >= 0; i--) { |
718 |
for (int i = viewers.size() - 1; i >= 0; i--) { |
| 716 |
if (!viewers.get(i).isFullyExpanded()) { |
719 |
if (!viewers.get(i).isFullyExpanded()) { |
| 717 |
viewers.get(i).setExpanded(true); |
720 |
viewers.get(i).setExpanded(true); |
| 718 |
// bug 280152: expand all groups |
721 |
} |
| 719 |
//break; |
|
|
| 720 |
} |
722 |
} |
| 721 |
} |
723 |
} |
| 722 |
//} |
|
|
| 723 |
} |
724 |
} |
| 724 |
} finally { |
725 |
} finally { |
| 725 |
expandAllInProgress = false; |
726 |
expandAllInProgress = false; |
|
|
727 |
suppressExpandViewers = false; |
| 726 |
getTaskEditorPage().setReflow(true); |
728 |
getTaskEditorPage().setReflow(true); |
| 727 |
} |
729 |
} |
| 728 |
getTaskEditorPage().reflow(); |
730 |
getTaskEditorPage().reflow(); |
|
Link Here
|
| 760 |
Action expandAllAction = new Action("") { //$NON-NLS-1$ |
762 |
Action expandAllAction = new Action("") { //$NON-NLS-1$ |
| 761 |
@Override |
763 |
@Override |
| 762 |
public void run() { |
764 |
public void run() { |
| 763 |
expandAllComments(); |
765 |
expandAllComments(true); |
| 764 |
} |
766 |
} |
| 765 |
}; |
767 |
}; |
| 766 |
expandAllAction.setImageDescriptor(CommonImages.EXPAND_ALL_SMALL); |
768 |
expandAllAction.setImageDescriptor(CommonImages.EXPAND_ALL_SMALL); |
|
Link Here
|
| 838 |
if (commentAttribute == null) { |
840 |
if (commentAttribute == null) { |
| 839 |
return null; |
841 |
return null; |
| 840 |
} |
842 |
} |
| 841 |
expandAllComments(); |
843 |
expandAllComments(false); |
| 842 |
List<CommentGroupViewer> groupViewers = getCommentGroupViewers(); |
844 |
List<CommentGroupViewer> groupViewers = getCommentGroupViewers(); |
| 843 |
for (CommentGroupViewer groupViewer : groupViewers) { |
845 |
for (CommentGroupViewer groupViewer : groupViewers) { |
| 844 |
for (CommentViewer viewer : groupViewer.getCommentViewers()) { |
846 |
for (CommentViewer viewer : groupViewer.getCommentViewers()) { |