Why some widgets do not get included in WindowBuilder? - eclipse

Im using WindowBuilder tool to build a GUI for my application and I see that some widgets or tools don't get included in the Design view. In my case, I have created a new SWT Application window and I try to add DropDown Menu in the Application window and I always get a red icon when I take the DropDown menu from the palette to the design area. Can anyone tell me what is the problem in this case?

I found the mistake I was doing...It is not possible to directly add a DropDown Menu in the design editor. You first have to add a Menu and then add a DropDown Menu. And the widgets do work in all forms of applications you want to develop.

Related

How do I a menu like the open menu from Gedit?

I am creating an application and would like to have a drop-down menu to search for files like the open menu in Gedit. What widgets do I need yo do this?
I have tried the menu widget and cannot find a way to get searching to work.
Note: I cannot find where in the Gedit source code the open menu is.
There is no widget provided by GTK out of the box to implement the gedit "Open" menu button:
Gedit implements it inside its own code base, using a GtkMenuButton that opens a GtkPopover widget containing a GtkSearchEntry, for the input field used for search, and a GtkTreeView for showing the search results. Plus, a GtkButton at the bottom to launch a GtkFileChooserDialog in order to select more files.
The tree view's model is populated using the recently used files list gathered from the default GtkRecentManager; you can get a list of all recently used files and filter them by application name; after that, you can filter them with the contents of the search entry.
If you want to know more about how a GTK application is built you should use the GTK inspector, which is provided by GTK itself as a debugging and development tool.

changing UI and text of Updates available popup

I working on eclipse rcp project where I need to add updates available popup
to my eclipse rcp application. I could show the popup, but now my question is
can I change UI and text of that popup. I want the look of UI in my own desired.
Is it possible to customize the UI and text?
Please find the attached image.

Adding menu listener for Paste option in SWT Browser

I have a org.eclipse.swt.browser.Browser instance created in a composite. I would like to know when some content is pasted in the browser using the (platform specific) right click context menu and selecting the paste option.
In the menuDetected() of MenuDetectListener, I get a notification when the context menu is detected in the browser.
How can I know if the Paste option is selected from the context menu?
Regards,
Noopur
No you can't access the selected context menu item. There is no direct provision for that. At least not in eclipse 3.7. Although, you could try different combinations of events for determining the menu item. For example, in windows the internet explorer populates the status bar with 'inserts the clipboard...' when your mouse pointer hovers over the Paste menu item, you can capture this using StatusTextListener event.
Note: The hack is not an elegant solution, even if you get it working, there is still some possibility that it may break with new or older releases of SWT or in fact its behavior may vary with operating systems !!

How to access to menu items?

I created a menu of RCP application only in plugin.xml. How to access to items of this menu programicaly to change their texts and images at runtime?
If you are using command framework to contribute those menu items, you can use org.eclipse.ui.commands.IElementUpdater to change the text and image.

Eclipse Plugin Development : Open popup on an action

I have created a right click menu item. On its click I want to show a small popup filled with certain values. Any idea?
Take a look under SWT snippets for instructions on opening new windows of various kinds.
http://www.eclipse.org/swt/snippets/
Look under the Shell section.