Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » top-level menus and toolbars listener from the workbench(how to catch the these actions?)
top-level menus and toolbars listener from the workbench [message #558360] Sat, 11 September 2010 17:33
amir  is currently offline amir Friend
Messages: 16
Registered: September 2010
Junior Member
hey there
i got some simple plug-in listener for the selections of the views in eclipse,
i would like capture top-level menus actions and toolbar, the problem is i realy donot know how to create and attach the listener. here is the ISelectionListener of the plugin. my purpose is to listene to the workbench top-level menu selections and toolbar.
thanx for help

// the listener we register with the selection service
private ISelectionListener listener = new ISelectionListener() {
public void selectionChanged(IWorkbenchPart sourcepart, ISelection selection) {
// we ignore our own selections
if (sourcepart != SelectionView.this) {
showSelection(sourcepart, selection);
}
}
};
.....
....
public void createPartControl(Composite parent) {
.......
getSite().getWorkbenchWindow().getSelectionService().addSele ctionListener(listener);
Previous Topic:Hide context menuitem in navigator/package explorer
Next Topic:Unable to install addon in Helios
Goto Forum:
  


Current Time: Sat Apr 20 05:47:33 GMT 2024

Powered by FUDForum. Page generated in 0.03186 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top