top-level menus and toolbars listener from the workbench [message #558360] |
Sat, 11 September 2010 17:33 |
amir 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);
|
|
|
Powered by
FUDForum. Page generated in 0.03186 seconds