How to refresh CheckboxTableViewer after adding an element? - eclipse

Can somebody help me how do I refresh CheckboxTableViewer after added one element?
Please provide some code snippets.

Use Viewer.refresh() or AbstractTableViewer.add() or any of the overloads.
Please read this tutorial that explains the usage of Eclipse JFace TableViewer including label and content provider.

Related

What would be the best approach to implement a multi-select combo in SWT/JFace?

I need to implement a multi-select combobox using SWT/JFace, What would be the best approach?should i go for changing the source code or i should try to extend the combo?
It is not possible to extend a Combo It is possible to extend Combo by overriding checkSubclass(), however it is highly disapproved of. The alternative is to create a wrapper for it. But that would be too much work.
Extending a CCombo is an option, but not a very good idea. Again, too much work for the functionality you need.
BUT
As sambi reddy mentioned, you could use a TableComboViewer from Nebula (scroll down to "TableCombo").
Another convenient solution (my favorite) is to have a CheckboxTreeViewer since you need to implement multi selection and such.
screenshot
https://github.com/lawhcd/SWTMultiCheckSelectionCombo
For anyone who is looking for a widget that allows user to select multiple options from a list of check box style options.
It is based on user1438038's idea and extended to provide nearly all of the api required of a widget similar to Combo.

GWT SuggestBox: add multiple ClickHandlers to each suggestion

Add multiple ClickHandlers to each suggestion. For example, for each suggestion I want to have 2 links 'exclude' and 'include' and add a handlers to each link.
SuggestBox let's you provide your own SuggestionDisplay if you don't like the default one.
It might be helpful to include more details in the question (I would comment but cant until i get more rep).
What type of widget/widgets are you using?
If its a suggestbox then the answer Thomas Broyer supplied should work.
To do this create a new class and extend
SuggestBox.DefaultSuggestionDisplay
We have a similar implementation at my workplace. We have a custom suggestion display class which extends SuggestBox.SuggestionDisplay. It is a PopupPanel at heart, with a VerticalPanel that holds our custom Suggestions. Those items have click handlers.
The project advanced suggest box handles this kind of needs: you can use the Table layout for example to have your buttons (see the demo)

How to get exactly Eclipse Editor kind of Tool Tip in RCP/SWT Table cell

I want to get Exactly eclipse editor kind highly customized tooltip like below-
I used eclipse provided snippets of customized Tooltips but none of them were so highly improvised performance and easy to use.
How to reuse these Tooltips , any example would help.
you just need to extend org.eclipse.jface.window.ToolTip
and override
protected abstract Composite createToolTipContentArea(Event event,
Composite parent);
you can add org.eclipse.swt.browser.Browser and set formatted content and add required controls.

How to enable Next/back button in wizard page in eclipse?

In my wizard page, the Next and Back buttons are not visible. is there any method to be called to make that enable?
Thanks a lot in advance!
Did you add multiple Wizard pages to the wizard? If there is only a single page, it makes sense to remove the mentioned buttons.
Update:
If there are multiple pages, then look at the Wizard implementation, and check the needsNextAndPreviousButton method what it describes. If you have implemented the IWizard interface directly (and not using some convenience abstract class, such as Wizard), it is possible that you generated that method returning constant false.
If that did not help, I suggest looking at the tutorial http://www.eclipse.org/articles/article.php?file=Article-JFaceWizards/index.html
Check the needsNextAndPreviousButton method in the wizard constructor. If you've added pages in your wizard then check canFlipToNextPage, isPageComplete, and validate your page completion in these methods and enable/disable as well.

my code for modalpopup is not working

actually the code for modalpopup in vwd is not working.
will anyone pls tell me the actual code format for the ajax control modal popup?
You can refer the below two links which shows how to use the modalpopup.
http://programming.top54u.com/post/AJAX-ModalPopup-Control-Extender.aspx
http://www.asp.net/ajax/ajaxcontroltoolkit/samples/modalpopup/modalpopup.aspx
The above link lists out the list of properties and its descriptions .