Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Hot Key Question and welcome.

Jan,

An action shortcut is only active if the action  appears in one of the
menus of the menu bar. Thus, I am sorry, I told you only half of the story
in my posting to  the news group. The format action is not part of the menu
bar. In order to get it into the menu bar it must be contributed to the
menu bar by an IEditorActionBarContributor. In order to get an idea how
this looks in detail have a look into the handling of the "Organize
Imports" action:

org.eclipse.jdt.ui.internal.javaEditor.CompilationUnitEditor - createAction
     Installs the action into the editor's action table.

org.eclipse.jdt.ui.internal.javaEditor.CompilationUnitEditorActionContributor
     Installs a retargetable action as place holder into the Edit menu of
the menu bar.
     Retargets the place holder to the editor's concrete action when the
editor is activated.
     The shortcut is actually  bound to the place holder.

Kai





                                                                                                                                    
                    "Oosthoek, Jan"                                                                                                 
                    <J.Oosthoek@xxxxxxxx>          To:     "'platform-ui-dev@xxxxxxxxxxx'" <platform-ui-dev@xxxxxxxxxxx>            
                    Sent by:                       cc:                                                                              
                    platform-ui-dev-admin@e        Subject:     [platform-ui-dev] Hot Key Question and welcome.                     
                    clipse.org                                                                                                      
                                                                                                                                    
                                                                                                                                    
                    11/22/2001 01:43 PM                                                                                             
                    Please respond to                                                                                               
                    platform-ui-dev                                                                                                 
                                                                                                                                    
                                                                                                                                    



hi!

i'm impressed at what Eclipse can do,. but i'm a really spoiled coder ( i'm
used to VAJ. ) But i'll give Eclipse a go. After some initial shocks i have
become aware of some of the nice Features in Eclipse and is far better then
the GUI of VAJ. So i joined this newsgroup to see what will come next.

Besides that passive activity i'm also willing to donate some of my time
and
skills. So if something needs to be done. Feel free to ask me.

Right,. now a question for you.

How do i get a Hot Key for 'Format' ?

i edited the file : JavaEditorMessages.properties
in the : jdt.jar
in the : C:\Architecture\eclipse\plugins\org.eclipse.jdt.ui
directory

with this :
Format.label=F&ormat@Ctrl+F
Format.tooltip=Format the Selected Text
Format.description=Format the selected text

it doesn't work.

greets,
 Jan.

ps. i'm using the stable build from 7 november.
_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-ui-dev






Back to the top