Bug 318837 - [FieldAssist] The mouse wheel didn't work in proposals dialog when using content assist
Summary: [FieldAssist] The mouse wheel didn't work in proposals dialog when using cont...
Status: CLOSED DUPLICATE of bug 75766
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3.2   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-05 02:13 EDT by simon Zhou CLA
Modified: 2010-07-07 01:46 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description simon Zhou CLA 2010-07-05 02:13:41 EDT
Build Identifier: 200802251018

I use the content assist(org.eclipse.ui.fieldassist package) in JFace dialog, but in popup proposals dialog, I can not scroll the vertical scroll bar by mouse wheel. I tried different ways to implement the content assist and got the same result (The mouse wheel didn't work). BTW, I added the MouseWheel listener into popup proposal dialog and proposal table, they didn't receive the MouseWheel event either.

The following is the snippet.

import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.ui.fieldassist.*;

public MyDialog extends Dialog{
   .
   .
   .
   @Override
   protected Control createDialogArea(Composite parent) {
      GridLayout layout = new GridLayout();
      parent.setLayout(layout);
      
      // First way: ContentAssistCommandAdapter
      Text text1 = new Text(parent, SWT.NONE);
      ContentAssistCommandAdapter commandAdapter = new ContentAssistCommandAdapter(text1, new TextContentAdapter(), getProposalProvider(), ContentAssistCommandAdapter.CONTENT_PROPOSAL_COMMAND, null, true);
      commandAdapter2.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);

      // Second way: ContentProposalAdapter
      Text text2 = new Text(parent, SWT.NONE);
      try {
          char[] autoActivationChars = new char[] { SWT.BS };
          ContentProposalAdapter contentProposalAdapter = new ContentProposalAdapter(text2, new TextContentAdapter(), getProposalProvider(), KeyStroke.getInstance("Ctrl+Space"), autoActivationChars);
          contentProposalAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
          contentProposalAdapter.setPropagateKeys(true);
        } catch (ParseException e) {
            e.printStackTrace();
            // do nothing
        } catch (Exception e) {
            e.printStackTrace();
        }

        // Third way: ContentAssistField
        ContentAssistField text3= new ContentAssistField(parent,
                SWT.SINGLE | SWT.BORDER,
                new TextControlCreator(),
                new TextContentAdapter(),
                getProposalProvider(),
                null,
                null);

        ContentAssistCommandAdapter commandAdapter = field.getContentAssistCommandAdapter();
        commandAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
        commandAdapter.setFilterStyle(ContentProposalAdapter.FILTER_NONE);
        commandAdapter.setPropagateKeys(true);
   }
   
   private IContentProposal getProposalProvider(){
      .
      .
      .
   }

}



Reproducible: Always

Steps to Reproduce:
1.Create JFace Dialog
2.Build a content assist field in dialog.
3.Give content assist field enough proposals to show the vertical scrall bar.
4.Scroll the mouse wheel.
5.Observe the proposal window scroll or not.
Comment 1 Markus Keller CLA 2010-07-05 06:25:01 EDT
> Build Identifier: 200802251018
That build is very old, please try a recent one.

If the mouse wheel works when the popup has focus (e.g. after pressing the Tab key), then this is a bug in your OS or mouse driver (bug 75766).

*** This bug has been marked as a duplicate of bug 75766 ***
Comment 2 simon Zhou CLA 2010-07-07 01:46:31 EDT
(In reply to comment #1)
> > Build Identifier: 200802251018
> That build is very old, please try a recent one.
> If the mouse wheel works when the popup has focus (e.g. after pressing the Tab
> key), then this is a bug in your OS or mouse driver (bug 75766).
> *** This bug has been marked as a duplicate of bug 75766 ***

Hi Markus,
   You are right. I try it in newer build version (Build id:M20090917-0800), this issue can not be reproduced any more.
   Thanks!

Best Regards,
Simon Zhou