[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: How to bind Tab in plugin.xml for an editor.

Gary E. Barnes wrote:
How do I do what the Java editor does for the Tab key?
See org.eclipse.ui.texteditor.AbstractTextEditor.setActionActivationCode(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