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 163972 Details for
Bug 305739
[viewers] #expandToLevel(Object, level) retrieves all children when virtual
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]
proposed patch
patch-305739.txt (text/plain), 2.77 KB, created by
Boris Bokowski
on 2010-04-06 17:55:45 EDT
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Boris Bokowski
Created:
2010-04-06 17:55:45 EDT
Size:
2.77 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jface >Index: src/org/eclipse/jface/viewers/AbstractTreeViewer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java,v >retrieving revision 1.146 >diff -u -r1.146 AbstractTreeViewer.java >--- src/org/eclipse/jface/viewers/AbstractTreeViewer.java 13 Nov 2009 19:37:02 -0000 1.146 >+++ src/org/eclipse/jface/viewers/AbstractTreeViewer.java 6 Apr 2010 21:52:42 -0000 >@@ -761,6 +761,24 @@ > * the widget > */ > protected void createChildren(final Widget widget) { >+ createChildren(widget, true); >+ } >+ >+ /** >+ * Creates all children for the given widget. >+ * <p> >+ * The default implementation of this framework method assumes that >+ * <code>widget.getData()</code> returns the element corresponding to the >+ * node. Note: the node is not visually expanded! You may have to call >+ * <code>parent.setExpanded(true)</code>. >+ * </p> >+ * >+ * @param widget >+ * the widget >+ * @param materialize >+ * true if children are expected to be fully materialized >+ */ >+ void createChildren(final Widget widget, boolean materialize) { > boolean oldBusy = isBusy(); > setBusy(true); > try { >@@ -1708,7 +1726,7 @@ > && !isExpandable((Item) widget, null, widget.getData())) { > return; > } >- createChildren(widget); >+ createChildren(widget, false); > if (widget instanceof Item) { > setExpanded((Item) widget, true); > } >Index: src/org/eclipse/jface/viewers/TreeViewer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeViewer.java,v >retrieving revision 1.108 >diff -u -r1.108 TreeViewer.java >--- src/org/eclipse/jface/viewers/TreeViewer.java 7 Dec 2009 18:58:40 -0000 1.108 >+++ src/org/eclipse/jface/viewers/TreeViewer.java 6 Apr 2010 21:52:42 -0000 >@@ -610,7 +610,7 @@ > } > } > >- protected void createChildren(Widget widget) { >+ void createChildren(Widget widget, boolean materialize) { > if (contentProviderIsLazy) { > Object element = widget.getData(); > if (element == null && widget instanceof TreeItem) { >@@ -632,12 +632,16 @@ > // touch all children to make sure they are materialized > for (int i = 0; i < children.length; i++) { > if (children[i].getData() == null) { >- virtualLazyUpdateWidget(widget, i); >+ if (materialize) { >+ virtualLazyUpdateWidget(widget, i); >+ } else { >+ ((TreeItem)children[i]).clearAll(true); >+ } > } > } > return; > } >- super.createChildren(widget); >+ super.createChildren(widget, materialize); > } > > protected void internalAdd(Widget widget, Object parentElement,
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 305739
:
161940
| 163972 |
164200
|
164264