| Source -> Format context menu action [message #330204] | 
Sun, 20 July 2008 12:34   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
I had already asked this question, but probably I didn't make myself  
clear, so I'll try to explain this issue. 
 
I created a source formatter for my plugin, attached to the source  
viewer and I can execute it from a menu of my own;  However, I'd like it  
to be run from the Source -> Format context menu that it appears in the  
project explorer when you right click on a file (that is not a Java  
file), as shown in this picture 
 
 http://img111.imageshack.us/img111/5048/eclipseformatjy9.png 
 
I assume this action is defined by some ActionFactory (not the standard  
one however, since it does not define FORMAT), and that this action can  
be retarget.  The default implementation for files that are not standard  
is a message box saying that this action is not enabled. 
 
But who's defining this action? 
 
Or how could I find this out? 
 
thanks in advance 
	Lorenzo 
 
--  
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino 
ICQ# lbetto, 16080134     (GNU/Linux User # 158233) 
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com 
http://www.myspace.com/supertrouperabba 
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com 
http://www.gnu.org/software/src-highlite 
http://www.gnu.org/software/gengetopt 
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
 |  
 |  
  | 
| Re: Source -> Format context menu action [message #330680 is a reply to message #330204] | 
Fri, 08 August 2008 07:05   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Lorenzo Bettini wrote: 
> I had already asked this question, but probably I didn't make myself  
> clear, so I'll try to explain this issue. 
> 
> I created a source formatter for my plugin, attached to the source  
> viewer and I can execute it from a menu of my own;  However, I'd like  
> it to be run from the Source -> Format context menu that it appears in  
> the project explorer when you right click on a file (that is not a  
> Java file), as shown in this picture 
> 
>  http://img111.imageshack.us/img111/5048/eclipseformatjy9.png 
> 
> I assume this action is defined by some ActionFactory (not the  
> standard one however, since it does not define FORMAT), and that this  
> action can be retarget.  The default implementation for files that are  
> not standard is a message box saying that this action is not enabled. 
> 
> But who's defining this action? 
You have to do this. Currently it is Java-specific. 
 
Dani 
> 
> Or how could I find this out? 
> 
> thanks in advance 
>     Lorenzo 
>
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.37570 seconds