• Post Reply Bookmark Topic Watch Topic
  • New Topic

SWT viewer.getSelection  RSS feed

 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to SWT. In Swing I could find the count of things in a list or tree.
Now, I have a TreeViewer that can be empty. I need a way to make sure there is something to select before I call viewer.getSelection()

Thanks for any hints....
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK. never mind. I can get the number of items selected with viewer.getSelection(). If there are no items, the length of the array this returns will be zero.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!