Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 117359 Details for
Bug 248057
consider removing Current subsection
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch to change the + behaviour
patch.txt (text/plain), 3.98 KB, created by
David Shepherd
on 2008-11-07 14:43:17 EST
(
hide
)
Description:
Patch to change the + behaviour
Filename:
MIME Type:
Creator:
David Shepherd
Created:
2008-11-07 14:43:17 EST
Size:
3.98 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java,v >retrieving revision 1.43 >diff -u -r1.43 TaskEditorCommentPart.java >--- src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java 7 Nov 2008 06:23:26 -0000 1.43 >+++ src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java 7 Nov 2008 19:42:42 -0000 >@@ -13,7 +13,9 @@ > package org.eclipse.mylyn.internal.tasks.ui.editors; > > import java.util.ArrayList; >+import java.util.HashMap; > import java.util.List; >+import java.util.Map; > > import org.eclipse.jface.action.Action; > import org.eclipse.jface.action.ToolBarManager; >@@ -73,6 +75,8 @@ > > private boolean expandAllInProgress; > >+ private final Map<Section, CommentGroup> subToCommentGroup = new HashMap<Section, CommentGroup>(); >+ > public TaskEditorCommentPart() { > setPartName("Comments"); > } >@@ -153,6 +157,7 @@ > }); > } > } >+ > setSection(toolkit, section); > } > >@@ -179,6 +184,7 @@ > // last group is not rendered as subsection > CommentGroup lastGroup = commentGroups.get(commentGroups.size() - 1); > addComments(toolkit, composite, lastGroup.getCommentAttributes()); >+ > } > } > >@@ -376,24 +382,36 @@ > expandAllInProgress = true; > getTaskEditorPage().setReflow(false); > >+ boolean sectionExpanded = false; >+ if (section != null && section.isExpanded()) { >+ sectionExpanded = true; >+ } >+ >+ // first toggle on whole section > if (section != null) { > EditorUtil.toggleExpandableComposite(true, section); > } > > if (subSections != null) { >- // first toggle on all subSections >- if (section != null) { >- EditorUtil.toggleExpandableComposite(true, section); >- } >+ int numberOfSectionsExpanded = getNumberOfExpandedSections(sectionExpanded); > >+ //add to the number of expanded sections by 1, from the bottom up >+ int count = subSections.size(); > for (Section subSection : subSections) { > if (subSection.isDisposed()) { >+ count--; > continue; > } >- EditorUtil.toggleExpandableComposite(true, subSection); >+ if (count - numberOfSectionsExpanded < 1) { >+ EditorUtil.toggleExpandableComposite(true, subSection); >+ } else { >+ EditorUtil.toggleExpandableComposite(false, subSection); >+ } >+ count--; > } > } > >+ //expand all of the individual comments > for (ExpandableComposite composite : commentComposites) { > if (composite.isDisposed()) { > continue; >@@ -402,6 +420,7 @@ > EditorUtil.toggleExpandableComposite(true, composite); > } > } >+ > } finally { > expandAllInProgress = false; > getTaskEditorPage().setReflow(true); >@@ -420,6 +439,28 @@ > // } > // } > >+ private int getNumberOfExpandedSections(boolean parentSectionExpanded) { >+ if (!parentSectionExpanded) { >+ return 0; >+ } >+ int count = 0; >+ if (subSections != null) { >+ for (Section subSection : subSections) { >+ if (subSection.isExpanded()) { >+ count++; >+ } >+ } >+ } >+ if (commentComposites != null) { >+ if (commentComposites.size() > 0) { >+ if (commentComposites.get(commentComposites.size() - 1).isExpanded()) { >+ count++; >+ } >+ } >+ } >+ return count; >+ } >+ > private TaskComment convertToTaskComment(TaskDataModel taskDataModel, TaskAttribute commentAttribute) { > TaskComment taskComment = new TaskComment(taskDataModel.getTaskRepository(), taskDataModel.getTask(), > commentAttribute); >@@ -517,6 +558,8 @@ > } > > subSections.add(groupSection); >+ //necessary for expansion >+ subToCommentGroup.put(groupSection, commentGroup); > } > > private void expandSubSection(final FormToolkit toolkit, CommentGroup commentGroup, Section subSection) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 248057
:
115766
|
117227
|
117228
|
117345
|
117346
| 117359 |
117360
|
117503
|
117504
|
117956
|
118208