Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Custom Text Editor Formatting(Issue getting ctrl + shift + f to trigger FormattingStrategy of a custom editor)
Custom Text Editor Formatting [message #808570] Mon, 27 February 2012 23:03 Go to next message
Chris Wunderly is currently offline Chris WunderlyFriend
Messages: 1
Registered: February 2012
Junior Member
I have created a custom editor for a language that my work uses (which currently has no IDE). I have the auto format working and i have a context menu item that lets you trigger it by using the doOperation(ISourceViewer.FORMAT); command. This works fine. The issue i'm having is that i can't determine how to cause the ctrl + shift + f to cause this action to occur on my editor. I have tried adding a Format option under Window->Preferences->General->Keys and making the shortcut be applied when in windows which is what i have found from searching on google, but it won't trigger my formatter. I am having trouble finding information for how to do this on google or mabye i'm just doing something wrong. Has anyone done this before?
Re: Custom Text Editor Formatting [message #869534 is a reply to message #808570] Thu, 03 May 2012 14:41 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 28.02.2012 00:03, Chris Wunderly wrote:
> I have created a custom editor for a language that my work uses (which
> currently has no IDE). I have the auto format working and i have a
> context menu item that lets you trigger it by using the
> doOperation(ISourceViewer.FORMAT); command. This works fine. The
> issue i'm having is that i can't determine how to cause the ctrl +
> shift + f to cause this action to occur on my editor. I have tried
> adding a Format option under Window->Preferences->General->Keys and
> making the shortcut be applied when in windows which is what i have
> found from searching on google, but it won't trigger my formatter. I
> am having trouble finding information for how to do this on google or
> mabye i'm just doing something wrong. Has anyone done this before?
Take a look at how it's done in the Java editor. You have to define a
command and a key binding in your plugin.xml.

Dani
Previous Topic:Eclipse (Indigo) will not build on project launch
Next Topic:Eclipse + Tomcat + SQL server 2008 express
Goto Forum:
  


Current Time: Sat May 11 21:09:36 GMT 2024

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

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

Back to the top