| Summary: | ContentProposalAdapter is broken | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Benjamin Muskalla <b.muskalla> |
| Component: | JFace | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 1.3 | ||
| Target Milestone: | 1.3 M4 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | 297167 | ||
| Bug Blocks: | |||
The attached snippet now works as expected. Changes are in CVS HEAD. |
ContentProposalAdapter is currently not usable. We need to think about a way to solve this without involving too many key events. Snippet that uses AutoCompleteField which is based on the ContentProposalAdapter. -------------------------------- public class AutoDemo implements IEntryPoint { public int createUI() { Display display = new Display(); Shell shell = new Shell( display ); shell.setSize( 200, 200 ); shell.setLayout( new GridLayout() ); final Text text = new Text( shell, SWT.SINGLE | SWT.LEAD | SWT.BORDER ); text.setLayoutData( new GridData( SWT.LEFT, SWT.CENTER, true, false ) ); text.setText( "some confusing text" ); AutoCompleteField field = new AutoCompleteField( text, new TextContentAdapter(), new String[]{ "foo", "bar", "baz" } ); shell.pack(); shell.open(); while( !shell.isDisposed() ) { if( !display.readAndDispatch() ) display.sleep(); } return 0; } }