Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Execute eclipse Key binding through java code
Execute eclipse Key binding through java code [message #605896] Tue, 01 June 2010 09:06 Go to next message
archana is currently offline archanaFriend
Messages: 9
Registered: May 2010
Location: Bangalore,India
Junior Member
Hi,
Please let me know how to execute an eclipse key binding through the java code. I would want to select a file and run a key binding on it like formating automatically using the java code. i.e., select a file, then 'Alt+Shift+S' and then F. Please help me out.

Regards
Archana
Re: Execute eclipse Key binding through java code [message #605915 is a reply to message #605896] Wed, 02 June 2010 13:49 Go to previous message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
On 01/06/10 2:36 PM, archana wrote:
> Hi,
> Please let me know how to execute an eclipse key binding through the
> java code. I would want to select a file and run a key binding on it
> like formating automatically using the java code. i.e., select a file,
> then 'Alt+Shift+S' and then F. Please help me out.

That doesn't sound like a right way. You should find the underlying
command (like org.eclipse.jdt.ui.edit.text.java.format) for that binding
and then call IHandlerService.executeCommand

- Prakash
Platform UI Team, IBM

www.eclipse-tips.com
Previous Topic:Eclipse minimal with my plugin
Next Topic:Adding jars to the Common Navigator
Goto Forum:
  


Current Time: Tue Sep 24 19:45:39 GMT 2024

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

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

Back to the top