Bug 129309 - [Workbench] allow 'Copy' on the status line
Summary: [Workbench] allow 'Copy' on the status line
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Paul Webster CLA
QA Contact: Paul Webster CLA
URL:
Whiteboard:
Keywords: helpwanted, polish
Depends on:
Blocks: 119259
  Show dependency tree
 
Reported: 2006-02-24 04:55 EST by Martin Aeschlimann CLA
Modified: 2011-03-08 12:56 EST (History)
3 users (show)

See Also:


Attachments
Copy context menu v01 (3.97 KB, patch)
2011-02-02 15:56 EST, Paul Webster CLA
no flags Details | Diff
copy context menu v01 (3.87 KB, patch)
2011-02-03 10:13 EST, Paul Webster CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Aeschlimann CLA 2006-02-24 04:55:38 EST
3.2 M5.

As described in bug 119259, something that costs a lot of time is constructing a fully qualified name (e.g. of a type) to paste into e.g. bugzilla. 

We might offer an action 'Copy qualified name to clipboard' but are hesitating as this doesn't seem to fit in the existing actions.

An alternative is to allow 'copy' on the Eclipse status bar: Either make it selectable or just offer a context menu on it that has 'Copy'.
Comment 1 Eric Moffatt CLA 2006-02-27 11:00:24 EST
Changing to an enhancement request and, tentatively, assigning to the workbench.
Comment 2 Michael Van Meekeren CLA 2006-02-27 11:03:47 EST
patches are welcome, I think making it copyable might also be an accessiblity improvement, TC?
Comment 3 Tod Creasey CLA 2006-02-27 11:06:59 EST
Selectable would also solve the focus problems it has
Comment 4 Tod Creasey CLA 2007-06-18 15:52:27 EDT
We are not currently planning to address this but please feel free to supply a patch
Comment 5 Oleg Besedin CLA 2011-01-21 11:59:18 EST
This is not related to accessibility, removing that keyword.

As for the bug itself, how do you display a qualified name in the status line? Is there a preference somewhere?

There is a "Copy Qualified Name" command available by default in the Edit menu for source files. It is not bound to any hot-keys by default but that obviously can be changed.
Comment 6 Markus Keller CLA 2011-01-21 13:43:43 EST
The qualified name is just an example (which is less interesting nowadays with the special command for that). The qualified name is e.g. shown when an element is selected in the Outline or the Package Explorer.

But the status line can show a lot of different messages that can also be interesting to copy, e.g. a warning or error at the caret location in a Java editor, or a path to a file in the Synchronize view, etc.

> Either make it selectable or just offer a context menu on it that has 'Copy'.

I would prefer the context menu, since the message can be truncated if it exceeds the available space (and I guess you're not eager to write and maintain special code that flips to the full message when the user starts to select text).
Comment 7 Paul Webster CLA 2011-01-21 13:47:28 EST
I should investigate if this can be done early in M6.

PW
Comment 8 Paul Webster CLA 2011-02-02 15:56:08 EST
Created attachment 188191 [details]
Copy context menu v01

This works on the main status label, so that changes from the Package Explorer or Outline View can be copied.

I wasn't going to track down the editor statuses like "Write | Smart Insert | 102:3" ... they respond to events determined by their contributor, and I'm not sure I want to interfere.  Please let me know if you'd like me to look into this as well.

PW
Comment 9 Markus Keller CLA 2011-02-03 08:26:43 EST
(In reply to comment #8)
Nice. I would not try to put this into other status line items.

Things that should be fixed before releasing:

- "&Copy" needs to be NLS'd (using JFaceResources.getString(..))

- create a new SelectionAdapter() {..} (not a SelectionListener and an empty method)

- pass 'LegacyActionTools.removeMnemonics(text)' to the clipboard (not just 'text'). Example to test (set caret into compile error):

public class C {
	<T extends Number & Runnable> void foo(T t) {}
	void bar() {
		foo("");
	}
}
Comment 10 Paul Webster CLA 2011-02-03 10:13:50 EST
Created attachment 188243 [details]
copy context menu v01

Incorporate feedback and released.

PW
Comment 11 Paul Webster CLA 2011-02-03 10:14:37 EST
Released to HEAD
PW
Comment 12 Paul Webster CLA 2011-03-08 12:56:55 EST
In I20110307-2110
PW