How to bind Tab in plugin.xml for an editor. [message #328353] |
Thu, 22 May 2008 17:08  |
Eclipse User |
|
|
|
How do I do what the Java editor does for the Tab key?
The Java editor binds Control-I to "Correct Indentation" and it binds Tab to a
function that works almost the same if the cursor is in the whitespace at the
start of a line. But I can't find the Tab binding anywhere. I can find the
Control-I binding,
<extension point="org.eclipse.ui.bindings">
<key sequence="M1+I"
commandId="org.eclipse.jdt.ui.edit.text.java.indent"
......
But what is it binding to Tab and more importantly how is it doing it?
There's nothing bound to Tab according to the Preferences>Keys page but it
obviously is bound to something. I would like to provide the same general
functionality in my editor, but what goes into the plugin.xml file?
Gary
|
|
|
Re: How to bind Tab in plugin.xml for an editor. [message #328407 is a reply to message #328353] |
Sat, 24 May 2008 02:46  |
Eclipse User |
|
|
|
Gary E. Barnes wrote:
> How do I do what the Java editor does for the Tab key?
See
org.eclipse.ui.texteditor.AbstractTextEditor.setActionActiva tionCode(String,
char, int, int).
The Java editor does this: setActionActivationCode("IndentOnTab", '\t',
-1, SWT.NONE); //$NON-NLS-1$
Dani
>
> The Java editor binds Control-I to "Correct Indentation" and it binds
> Tab to a function that works almost the same if the cursor is in the
> whitespace at the start of a line. But I can't find the Tab binding
> anywhere. I can find the Control-I binding,
>
> <extension point="org.eclipse.ui.bindings">
> <key sequence="M1+I"
> commandId="org.eclipse.jdt.ui.edit.text.java.indent"
> ......
>
> But what is it binding to Tab and more importantly how is it doing it?
> There's nothing bound to Tab according to the Preferences>Keys page
> but it obviously is bound to something. I would like to provide the
> same general functionality in my editor, but what goes into the
> plugin.xml file?
>
> Gary
|
|
|
Powered by
FUDForum. Page generated in 0.03475 seconds