Bug 109005 - [Contributions] DCR: display action description in the status bar
Summary: [Contributions] DCR: display action description in the status bar
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2005-09-07 18:07 EDT by Randy Hudson CLA
Modified: 2019-09-06 16:15 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Randy Hudson CLA 2005-09-07 18:07:39 EDT
In the platform (File Explorer, Internet Explorer, Outlook Express, etc.) the
status bar gives details for the highlighted menuitem. In Eclipse, nothing
happens, despite IAction defining getDescription().

This also works generally for those applications' popup menus, but it's slightly
less expected IMHO.
Comment 1 Randy Hudson CLA 2005-09-08 10:59:21 EDT
The following snippet shows a technique for tracking the highlighed menuitem:

public static void main(String[] args) {
	Display display = new Display();
	final Shell shell = new Shell(display);
	
	final Text status = new Text(shell, SWT.READ_ONLY | SWT.BORDER);
	status.setText("status");
	shell.addControlListener(new ControlAdapter() {
		public void controlResized(ControlEvent e) {
			Rectangle client = shell.getClientArea();
			client.y += client.height;
			client.height = status.computeSize(-1,-1).y;
			client.y -= client.height;
			status.setBounds(client);
		}
	});
	
	Listener StatusListener = new Listener() {
		public void handleEvent(Event event) {
			if (event.type == SWT.Arm){
				MenuItem item = (MenuItem)event.widget;
				status.setText("Long Descriptiong For: " + item.getText());
			} else if (event.type == SWT.Hide)
				status.setText("");
		}
	};
	
	Menu bar = new Menu(shell, SWT.BAR);
	shell.setMenuBar(bar);
	MenuItem fileItem = new MenuItem(bar, SWT.CASCADE);
	fileItem.setText("File");
	Menu submenu = new Menu(shell, SWT.DROP_DOWN);
	submenu.addListener(SWT.Hide, StatusListener);
	fileItem.setMenu(submenu);

	MenuItem item;
	
	item= new MenuItem(submenu, SWT.PUSH);
	item.setText("Open");
	item.addListener(SWT.Arm, StatusListener);
	
	item= new MenuItem(submenu, SWT.PUSH);
	item.setText("Exit");
	item.addListener(SWT.Arm, StatusListener);
	
	shell.setSize(200, 200);
	shell.open();

	while (!shell.isDisposed()) {
		if (!display.readAndDispatch())
			display.sleep();
	}
}
Comment 2 Michael Van Meekeren CLA 2006-04-21 13:56:17 EDT
Moving Dougs bugs
Comment 3 Paul Webster CLA 2007-04-05 19:04:36 EDT
Assigning to component owner
PW
Comment 4 Eclipse Webmaster CLA 2019-09-06 16:15:54 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.