Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] autocomplete in swt

I already solve the problem. You can see that at
http://www.swtplus.com are a lot of widgets and is
also an api. These widgets are free, but are not open
source. Take a look at the site mentioned above and
you will find AutoComplete widget, who does all the
necessary operation. The bad thing about these widget
is: suppose you have more than itemsVisible who match
the characters enter in a Text, if you are using keys
everything is ok, but if you are using scrollbars text
field is loosing focus. In the same way autocomplete
in eclipse happend. Any solution about not loosing
focus?

Regards,
Andrei

--- Robert Enyedi <renyedi@xxxxxxxxx> wrote:

> Hi,
> 
> I didn't know that this autocomplete API was public.
> According to the
> JavaDocs it has been made public in Eclipse 3.0.
> 
> Actually the class you were referring to seems to be
> in the
> org.eclipse.ui.contentassist package of the
> org.eclipse.ui.workbench.texteditor. The good news
> that it's NOT in the
> org.eclipse.ui.ide plugin so you can use it in RCP
> applications. But on the
> other hand I don't think that you can use it in
> plain SWT applications. And
> the
>
org.eclipse.jface.contentassist.SubjectControlContentAssistant
> class is
> in the JFace plugin.
> 
> Regards,
> Robert
> 
> On 1/17/06, marimuthu <marimuthup@xxxxxxxxxxxxxx>
> wrote:
> >
> > Hi Andrei Medan,
> >
> > Use the subject control content assistant
> >
> > org.eclipse.swt.widgets.Text.ContentAssistHandler
> class has the following
> > method
> >
> > createHandlerForText(Text text,
> ISubjectControlContentAssistant
> > contentAssistant).
> >
> > Where U have to pass the text field U have created
> and ur content
> > assistant
> > processor has to implement the
> ISubjectControlContentAssistProcessor
> > interface for the providing the auto completion.
> >
> >
> > Here is how to add the completion processor to the
> text.
> >
> >         ISubjectControlContentAssistProcessor
> completionProcessor = new
> > YourAutoCompletionProcessor();
> >
> >         SubjectControlContentAssistant
> subjectControlContentAssistant =
> > new
> > SubjectControlContentAssistant();
> >
> >
> >
>
subjectControlContentAssistant.setContentAssistProcessor
> > (completionProcessor
> > , IDocument.DEFAULT_CONTENT_TYPE);
> >
> >         //enable auto activation
> >        
>
subjectControlContentAssistant.enableAutoActivation(true);
> >        
>
subjectControlContentAssistant.setAutoActivationDelay(500);
> >
> >        
>
subjectControlContentAssistant.enableAutoInsert(true);
> >        
>
subjectControlContentAssistant.enablePrefixCompletion(false);
> >
> >
> >
>
subjectControlContentAssistant.setProposalPopupOrientation
> > (IContentAssistant
> > .CONTEXT_INFO_ABOVE);
> >
> >
> > ContentAssistantHandler.createHandlerForText
> > (fConditionText,subjectControlCo
> > ntentAssistant);
> >
> >
> > Hope this help U out for start off.
> >
> > With regards
> > P.Marimuthu
> >
> >
> >
> > -----Original Message-----
> > From: platform-swt-dev-bounces@xxxxxxxxxxx
> > [mailto:platform-swt-dev-bounces@xxxxxxxxxxx] On
> Behalf Of
> > andrei_medanro@xxxxxxxxx
> > Sent: Friday, January 13, 2006 1:57 PM
> > To: platform-swt-dev@xxxxxxxxxxx
> > Subject: [platform-swt-dev] autocomplete in swt
> >
> >
> > Hello everybody, I have to implement an
> autocomplete
> > in a swt text field. Have anyone of you any kind
> of
> > sugestion?
> >
> > Thanks,
> > Andrei Medan
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> > _______________________________________________
> > platform-swt-dev mailing list
> > platform-swt-dev@xxxxxxxxxxx
> >
>
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> >
> > _______________________________________________
> > platform-swt-dev mailing list
> > platform-swt-dev@xxxxxxxxxxx
> >
>
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> >
> > _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
>
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Back to the top