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 206929 Details for
Bug 363682
TreeViewer does not clear its items if the viewer is not visible
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 for demo project
DemoTreeViewPartPatch.txt (text/plain), 2.13 KB, created by
Yury
on 2011-11-14 04:30:14 EST
(
hide
)
Description:
patch for demo project
Filename:
MIME Type:
Creator:
Yury
Created:
2011-11-14 04:30:14 EST
Size:
2.13 KB
patch
obsolete
>Index: DemoTreeViewPart.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.ui/org.eclipse.rap.demo/src/org/eclipse/rap/demo/DemoTreeViewPart.java,v >retrieving revision 1.17 >diff -u -r1.17 DemoTreeViewPart.java >--- DemoTreeViewPart.java 25 May 2010 07:00:51 -0000 1.17 >+++ DemoTreeViewPart.java 14 Nov 2011 09:21:10 -0000 >@@ -10,15 +10,15 @@ > ******************************************************************************/ > package org.eclipse.rap.demo; > >-import java.util.ArrayList; >+import java.util.*; > import java.util.List; > >+import org.eclipse.jface.action.Action; > import org.eclipse.jface.dialogs.MessageDialog; > import org.eclipse.jface.viewers.*; > import org.eclipse.swt.SWT; > import org.eclipse.swt.graphics.Image; >-import org.eclipse.swt.widgets.Composite; >-import org.eclipse.swt.widgets.Shell; >+import org.eclipse.swt.widgets.*; > import org.eclipse.ui.*; > import org.eclipse.ui.part.ViewPart; > import org.eclipse.ui.views.properties.*; >@@ -27,6 +27,7 @@ > > private TreeViewer viewer; > private IPropertySheetPage propertyPage; >+ private Action refreshAction; > > // TODO [rst] Add via extension > // private final class LeafStarLabelDecorator extends LabelProvider >@@ -260,6 +261,31 @@ > viewer.setLabelProvider( labelProvider ); > viewer.setInput( this ); > viewer.addDoubleClickListener( this ); >+ >+ final Display display = parent.getDisplay(); >+ >+ refreshAction = new Action() { >+ >+ public void run() { >+ TimerTask task = new TimerTask() { >+ >+ public void run() { >+ display.asyncExec( new Runnable() { >+ >+ public void run() { >+ viewer.setInput( null ); >+ } >+ } ); >+ } >+ }; >+ Timer timer = new Timer(); >+ timer.schedule( task, 2000 ); >+ } >+ }; >+ refreshAction.setText("Refresh"); >+ IActionBars bars = getViewSite().getActionBars(); >+ bars.getToolBarManager().add( refreshAction ); >+ > getSite().setSelectionProvider( viewer ); > } >
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 363682
: 206929 |
206930