Results 1 to 5 of 5

Thread: SWT treeviewer

  1. #1
    sushistix is offline Member
    Join Date
    Oct 2008
    Posts
    5
    Rep Power
    0

    Default SWT treeviewer

    I am using a treeview to display the file system. If i create a new file and refresh the viewer the new file is there. I need to set the selection in the viewer to that file though and only have the path and filename.

    How can I set the selection?

    Thanks

  2. #2
    xcallmejudasx's Avatar
    xcallmejudasx is offline Senior Member
    Join Date
    Oct 2008
    Location
    Houston, TX & Flint, MI
    Posts
    609
    Rep Power
    7

    Default

    You might be able to create a new treeview that takes all the nodes beneath the one you just created and set that as the current perspective ID or view.

  3. #3
    sushistix is offline Member
    Join Date
    Oct 2008
    Posts
    5
    Rep Power
    0

    Default

    The node I want to select is a file and would not have any children.

    It seems like I need to be able to search the tree for a treeItem based on a string filepath. Is this possible?

  4. #4
    xcallmejudasx's Avatar
    xcallmejudasx is offline Senior Member
    Join Date
    Oct 2008
    Location
    Houston, TX & Flint, MI
    Posts
    609
    Rep Power
    7

    Default

    Are you trying to open a new view(that file) or just have that file selected and have the viewer refresh?

    If its the first one then I have no idea. I'm trying to figure something similar out for my project.
    If it's the latter I don't think it can be done but I'm really not the person to ask. Pretty new to viewers and actions.

  5. #5
    sushistix is offline Member
    Join Date
    Oct 2008
    Posts
    5
    Rep Power
    0

    Default

    I want to select the added file and refresh the view so that the file selected is expanded to.

    That will be the file that is open for the user so it needs to be shown.

Similar Threads

  1. How do I refresh a TreeViewer object?
    By xcallmejudasx in forum SWT / JFace
    Replies: 0
    Last Post: 10-27-2008, 04:51 PM
  2. TreeViewer Demonstration
    By Java Tip in forum SWT Tips
    Replies: 0
    Last Post: 07-07-2008, 05:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •