Home » Eclipse Projects » Eclipse Platform » Source -> Format menu
| |
Re: Source -> Format menu [message #329385 is a reply to message #329054] |
Sun, 22 June 2008 13:40 |
|
Daniel Megert wrote:
> Lorenzo Bettini wrote:
>> Hi
>>
>> 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 menu that it appears in the
>> project explorer... how can this be done?
> You need to define the command, the key binding and the action in your
> plugin.xml. Take a look at "org.eclipse.jdt.ui.edit.text.java.format" in
> /org.eclipse.jdt.ui/plugin.xml.
>
thanks, I'll take a look!
I was only surprised that "Source" is not one of the standard menus (I
mean, I didn't find an id for that, while there's one for edit, etc.),
or am I wrong?
cheers
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
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
|
Re: Source -> Format menu [message #329855 is a reply to message #329054] |
Tue, 08 July 2008 15:50 |
|
Daniel Megert wrote:
> Lorenzo Bettini wrote:
>> Hi
>>
>> 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 menu that it appears in the
>> project explorer... how can this be done?
> You need to define the command, the key binding and the action in your
> plugin.xml. Take a look at "org.eclipse.jdt.ui.edit.text.java.format" in
> /org.eclipse.jdt.ui/plugin.xml.
Hi
I actually haven't found any example of this; however, I'd need to be
able to associate an action to the "Source -> Format" menu that is in
the context menu in the package explorer; this shows for every file, but
it says that the action is not enabled for my files...
any doc or example on-line, please?
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
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
|
Goto Forum:
Current Time: Sat Nov 02 17:01:22 GMT 2024
Powered by FUDForum. Page generated in 0.03682 seconds
|