Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 237224 Details for
Bug 421128
Exception occurs when setting an accelerator on menus
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Demo class to reproduce the bug
accelerator.txt (text/plain), 1.46 KB, created by
Matthias Nick
on 2013-11-06 02:33:18 EST
(
hide
)
Description:
Demo class to reproduce the bug
Filename:
MIME Type:
Creator:
Matthias Nick
Created:
2013-11-06 02:33:18 EST
Size:
1.46 KB
patch
obsolete
>package org.rap.helloworld; > >import org.eclipse.rap.rwt.application.IEntryPoint; >import org.eclipse.swt.SWT; >import org.eclipse.swt.events.SelectionEvent; >import org.eclipse.swt.events.SelectionListener; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Menu; >import org.eclipse.swt.widgets.MenuItem; >import org.eclipse.swt.widgets.Shell; > >public class EntryPoint implements IEntryPoint { > > private Menu menuBar; > private MenuItem fileMenuHeader; > private Menu fileMenu; > private MenuItem fileSaveItem; > > public int createUI() { > Display display = new Display(); > Shell shell = new Shell( display ); > shell.setLayout( new GridLayout( 1, false ) ); > > menuBar = new Menu(shell, SWT.BAR); > fileMenuHeader = new MenuItem(menuBar, SWT.CASCADE); > fileMenuHeader.setText("F&ile"); > fileMenu = new Menu(shell, SWT.DROP_DOWN); > fileMenuHeader.setMenu(fileMenu); > > fileSaveItem = new MenuItem(fileMenu, SWT.PUSH); > fileSaveItem.setText("&Save\tAlt+T"); > fileSaveItem.setAccelerator(SWT.ALT + 'T'); > fileSaveItem.addSelectionListener(new SelectionListener() { > @Override > public void widgetSelected(SelectionEvent e) { > System.err.println("selected"); > } > > @Override > public void widgetDefaultSelected(SelectionEvent e) { > > } > }); > > shell.setMenuBar(menuBar); > shell.pack(); > shell.open(); > return 0; > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 421128
: 237224 |
237225