Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » MenuItem accelerator text
MenuItem accelerator text [message #1062654] Mon, 10 June 2013 09:25 Go to next message
Yury Mising name is currently offline Yury Mising name
Messages: 95
Registered: May 2010
Location: Russia
Member
Predefined eclipse menu items are displayed without full accelerator text. For example, action File->Save is displayed with text "Save S" instead of "Save Ctrl+S".
The cause of this is in org.eclipse.jface.bindings.keys.formatting.NativeKeyFormatter.sortModifierKeys(int)

protected int[] sortModifierKeys(final int modifierKeys) {
...

		if (Util.isWindows()) {
...

		} else if (Util.isGtk() || Util.isMotif()) {
...

		} else if (Util.isMac()) {
...
		}

		return sortedKeys;
	}


All "if" blocks return false.

How to solve this problem?

Best regards,
Yury.
Re: MenuItem accelerator text [message #1062662 is a reply to message #1062654] Mon, 10 June 2013 09:52 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan Furnadjiev
Messages: 1839
Registered: July 2009
Senior Member
Hi Yury,
interesting finding :-). In RAP SWT.getPlatform() returns "rap".
Probably the correct fix will be to add a RAP specific "else if"... or
simply default "else" that behaves as Windows for example. Or...
if (Util.isWindows() || "rap".equals( SWT.getPlatform() )) {
What do you think? Please open an enhancement request and we could
discuss the possibilities there.
Best,
Ivan

On 6/10/2013 12:25 PM, Yury Mising name wrote:
> Predefined eclipse menu items are displayed without full accelerator
> text. For example, action File->Save is displayed with text "Save S"
> instead of "Save Ctrl+S".
> The cause of this is in
> org.eclipse.jface.bindings.keys.formatting.NativeKeyFormatter.sortModifierKeys(int)
>
>
> protected int[] sortModifierKeys(final int modifierKeys) {
> ..
>
> if (Util.isWindows()) {
> ..
>
> } else if (Util.isGtk() || Util.isMotif()) {
> ..
>
> } else if (Util.isMac()) {
> ..
> }
>
> return sortedKeys;
> }
>
>
> All "if" blocks return false.
>
> How to solve this problem?
>
> Best regards,
> Yury.

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: MenuItem accelerator text [message #1062666 is a reply to message #1062662] Mon, 10 June 2013 10:07 Go to previous message
Yury Mising name is currently offline Yury Mising name
Messages: 95
Registered: May 2010
Location: Russia
Member
Hi, Ivan.

I've reported https://bugs.eclipse.org/bugs/show_bug.cgi?id=410319

Best regards,
Yury.
Previous Topic:E4/RAP Integration
Next Topic:datetime can not display fully when it is located at the edge
Goto Forum:
  


Current Time: Thu Oct 23 17:23:01 GMT 2014

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

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