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 117227 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 progressively expand the comments when the expand all button is pressed.
patch.txt (text/plain), 3.35 KB, created by
David Shepherd
on 2008-11-06 12:17:12 EST
(
hide
)
Description:
Patch to progressively expand the comments when the expand all button is pressed.
Filename:
MIME Type:
Creator:
David Shepherd
Created:
2008-11-06 12:17:12 EST
Size:
3.35 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.41 >diff -u -r1.41 TaskEditorCommentPart.java >--- src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java 28 Oct 2008 03:25:43 -0000 1.41 >+++ src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java 6 Nov 2008 17:09:39 -0000 >@@ -344,6 +344,9 @@ > try { > getTaskEditorPage().setReflow(false); > >+ changeExpansionStateOfSection("older", false); >+ changeExpansionStateOfSection("recent", false); >+ > for (ExpandableComposite composite : commentComposites) { > if (composite.isDisposed()) { > continue; >@@ -368,34 +371,74 @@ > EditorUtil.toggleExpandableComposite(true, section); > } > >- if (subSections != null) { >- // first toggle on all subSections >- if (section != null) { >- EditorUtil.toggleExpandableComposite(true, section); >- } >- >- for (Section subSection : subSections) { >- if (subSection.isDisposed()) { >- continue; >- } >- EditorUtil.toggleExpandableComposite(true, subSection); >- } >+ int state = getExpansionState(); >+ if (state >= 2) { >+ changeExpansionStateOfSection("older", true); > } >- >- for (ExpandableComposite composite : commentComposites) { >- if (composite.isDisposed()) { >- continue; >- } >- if (!composite.isExpanded()) { >- EditorUtil.toggleExpandableComposite(true, composite); >- } >+ if (state >= 1) { >+ changeExpansionStateOfSection("recent", true); > } >+ expandCurrent(); > } finally { > getTaskEditorPage().setReflow(true); > } > getTaskEditorPage().reflow(); > } > >+ private void changeExpansionStateOfSection(String string, boolean state) { >+ if (getSection(string) != null) { >+ EditorUtil.toggleExpandableComposite(state, getSection(string)); >+ } >+ >+ } >+ >+ private int getExpansionState() { >+ Section recent = getSection("recent"); >+ if (recent != null && recent.isExpanded()) { >+ return 2; >+ } >+ if (currentExpanded()) { >+ return 1; >+ } >+ return 0; >+ } >+ >+ private boolean currentExpanded() { >+ for (ExpandableComposite composite : commentComposites) { >+ if (composite.isDisposed()) { >+ return false; >+ } >+ if (!composite.isExpanded()) { >+ return false; >+ } >+ } >+ return true; >+ } >+ >+ private Section getSection(String string) { >+ for (Section subSection : subSections) { >+ if (subSection.isDisposed()) { >+ continue; >+ } else { >+ if (subSection.getText().toLowerCase().contains(string)) { >+ return subSection; >+ } >+ } >+ } >+ return null; >+ } >+ >+ private void expandCurrent() { >+ for (ExpandableComposite composite : commentComposites) { >+ if (composite.isDisposed()) { >+ continue; >+ } >+ if (!composite.isExpanded()) { >+ EditorUtil.toggleExpandableComposite(true, composite); >+ } >+ } >+ } >+ > // private static void toggleChildren(Composite composite, boolean expended) { > // for (Control child : composite.getChildren()) { > // if (child instanceof ExpandableComposite && !child.isDisposed()) {
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