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 87570 Details for
Bug 212071
GalleryTreeViewer
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.
Stopgap solution for disposed items in the Gallery selection
GalleryTreeViewerDisposedSelection.patch (text/plain), 1.53 KB, created by
Peter Centgraf
on 2008-01-22 17:00:07 EST
(
hide
)
Description:
Stopgap solution for disposed items in the Gallery selection
Filename:
MIME Type:
Creator:
Peter Centgraf
Created:
2008-01-22 17:00:07 EST
Size:
1.53 KB
patch
obsolete
>Index: src/org/eclipse/nebula/jface/galleryviewer/GalleryTreeViewer.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.swt.nebula/org.eclipse.nebula.widgets.gallery/src/org/eclipse/nebula/jface/galleryviewer/GalleryTreeViewer.java,v >retrieving revision 1.2 >diff -u -r1.2 GalleryTreeViewer.java >--- src/org/eclipse/nebula/jface/galleryviewer/GalleryTreeViewer.java 11 Jan 2008 07:58:10 -0000 1.2 >+++ src/org/eclipse/nebula/jface/galleryviewer/GalleryTreeViewer.java 22 Jan 2008 21:58:55 -0000 >@@ -10,6 +10,7 @@ > *******************************************************************************/ > package org.eclipse.nebula.jface.galleryviewer; > >+import java.util.ArrayList; > import java.util.Arrays; > import java.util.Iterator; > import java.util.LinkedList; >@@ -215,10 +216,21 @@ > * @see org.eclipse.jface.viewers.AbstractTreeViewer#getSelection(org.eclipse.swt.widgets.Control) > */ > protected Item[] getSelection(Control control) { >- Item[] selection = ((Gallery) control).getSelection(); >+ Item[] selection = ((Gallery)control).getSelection(); >+ > if (selection == null) { > return new GalleryItem[0]; >- } else { >+ } >+ else { >+ List notDisposed = new ArrayList(selection.length); >+ for (int i = 0; i < selection.length; i++) { >+ if (!selection[i].isDisposed()) { >+ notDisposed.add(selection[i]); >+ } >+ } >+ selection = (GalleryItem[]) >+ notDisposed.toArray(new GalleryItem[notDisposed.size()]); >+ > return selection; > } > }
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 Raw
Flags:
nicolas.richeton
:
iplog+
Actions:
View
Attachments on
bug 212071
:
84678
|
84766
|
87569
| 87570