Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Source -> Format context menu action
Source -> Format context menu action [message #330204] Sun, 20 July 2008 16:34 Go to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
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 11:05 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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
>
Previous Topic:CVS commit / add
Next Topic:Does Eclipse 3.3 TextEditor Support DnD ?
Goto Forum:
  


Current Time: Sun Jun 30 00:06:44 GMT 2024

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

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

Back to the top