Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Open an file when clicking a TableTreeViewer
Open an file when clicking a TableTreeViewer [message #435098] Fri, 23 April 2004 07:09 Go to next message
Eclipse UserFriend
Originally posted by: lshan.imail.eecs.berkeley.edu

Greeting to the eclipse masters,

I am writing a TableTreeViewer, i have my own model, content provider and
label provider. The functionality i want to achieve is when the user
double-clicks an item in the TableTreeViewer, since each item essentially
represents a file, i want to open a default editor to that file.

My problem is i don't know how to perceive the event a user double-clicks an
item in that TableTreeViewer. Even if i know what TableTreeItem he
double-clicks, i actually want an object in my model that's associated with
the clicked TableTreeItem. How can i go from knowing what TableTreeItem he
clicks to knowing what object that TableTreeItem is associated with.

Thank you.

Lexin
Re: Open an file when clicking a TableTreeViewer [message #447645 is a reply to message #435098] Wed, 15 December 2004 21:15 Go to previous message
Eclipse UserFriend
Originally posted by: alejandro.vera.gmail.com

Lexin Shan wrote:
> Greeting to the eclipse masters,
>
> I am writing a TableTreeViewer, i have my own model, content provider and
> label provider. The functionality i want to achieve is when the user
> double-clicks an item in the TableTreeViewer, since each item essentially
> represents a file, i want to open a default editor to that file.
I've the same problem...

i thougth that using TableTreeViewer.getElementAt(int i) could do the
trick.. but getElementAt doesn't filter the input...

Can anyone help me to know what Item is asociated with wich Item???

sorry, inglish is not my mother languaje....

>
> My problem is i don't know how to perceive the event a user double-clicks an
> item in that TableTreeViewer. Even if i know what TableTreeItem he
> double-clicks, i actually want an object in my model that's associated with
> the clicked TableTreeItem. How can i go from knowing what TableTreeItem he
> clicks to knowing what object that TableTreeItem is associated with.
>
> Thank you.
>
> Lexin
>
>
Previous Topic:how to embed openoffice
Next Topic:UnsatisfiedLinkError
Goto Forum:
  


Current Time: Tue Oct 20 18:29:26 GMT 2020

Powered by FUDForum. Page generated in 0.01757 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top