| Examples of supporting clipboard? [message #46574] | 
Fri, 23 May 2003 14:36   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: purplehayz.earthlink.net 
 
Now that I have a working Table with system properties culled from the 
runtime, not eclipse, JVM, I now want to be able to select a cell and copy 
the value so I can paste it into an editor (or elsewhere).  Can someone 
point me to an example and/or supporting material for how to make a view 
support the Copy menu item (I've discovered the TableCursor class so I can 
select a particular cell fine)? 
 
Thanks and have fun! - Bob 
 
--  
Bob Hays, Computer Geek 
 
"In this world you must be oh so  smart or oh so pleasant. Well, for years I 
was smart. I recommend pleasant." 
-- Elwood P. Dowd as played by James Stewart in Harvey
 |  
 |  
  | 
 | 
 | 
| Re: Examples of supporting clipboard? [message #46947 is a reply to message #46749] | 
Fri, 23 May 2003 16:18   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: purplehayz.earthlink.net 
 
THIS is probably what I needed!   Thanks, I'd already perused the SWT pages 
and samples quite a bit (that's how I learned about the TableCursor class, 
for example). 
 
Thanks and have fun! - Bob 
 
On 5/23/03 1:58 PM, in article balqvs$5c8$1@rogue.oti.com, "David J. Orme" 
<daveo@asc-iseries.com> wrote: 
 
> Bob Hays, Computer Geek wrote: 
>> Now that I have a working Table with system properties culled from the 
>> runtime, not eclipse, JVM, I now want to be able to select a cell and copy 
>> the value so I can paste it into an editor (or elsewhere).  Can someone 
>> point me to an example and/or supporting material for how to make a view 
>> support the Copy menu item (I've discovered the TableCursor class so I can 
>> select a particular cell fine)? 
>  
> The previous post only has the information on how to actually use the 
> clipboard.  In order to hook the copy action, you need to have your view 
> do something like the following inside your createPartControl() method: 
>  
> IActionBars bars = getViewSite().getActionBars(); 
> bars.setGlobalActionHandler( 
>  IWorkbenchActionConstants.COPY, 
>  new Action() { 
>    public void run() { 
>      // Put your code here 
>  }); 
>  
>  
> Best, 
>  
> Dave 
 
--  
Bob Hays, Computer Geek 
 
"In this world you must be oh so  smart or oh so pleasant. Well, for years I 
was smart. I recommend pleasant." 
-- Elwood P. Dowd as played by James Stewart in Harvey
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.05560 seconds