Community
Participate
Working Groups
Offer 'Copy' or 'Copy Qualified Name' on selected test. Often one only needs to put the failed test into a bug report or an e-mail.
While messing with the copy commands, we should clean this up: - Edit > Copy (Ctrl+C) should also be in the context menu. Currently copies stacktrace of test. Should copy the test name. - 'Copy Trace' should also be in context menu of test (not only on Failure Trace).
I started to work on this issue a while ago. I will resume my work and propose a fix soon.
Created attachment 243306 [details] Proposed patch I attached a proposed patch. As a first step, I focused on the Copy Qualified Name command. I will come back for the additional reqs (like Copy command) after getting a better understanding.
Please add an explicit CoO sign-off comment here. http://wiki.eclipse.org/Development_Resources/Contributing_via_Git#via_Bugzilla Here are my review comments: 1. After applying the patch, i am having error in org.eclipse.jdt.junit\META-INF\MANIFEST.MF Here a package named "org.eclipse.jdt.internal.junit" that doesn't exist is being exported which is causing the error. 2. ActionMessages#CopyQualifiedNameAction_ToolTipText is currently "Copy to fully qualified name to the system Clipboard", it has to be changed to "Copy fully qualified name to the system Clipboard". 3. Update the copyright year of all modified files. 4. Enter your credentials by filling out the following template and adding it to the header comment of all modified files: Your Name <email@example.com> - Bug Title - https://bugs.eclipse.org/BUG_NUMBER Acknowledging the fact that the patch is a partial fix, i think you are in the right track. Points to be addressed: 1. Add 'Copy' in the context menu and it should just copy the test name. As mentioned in comment 1, it is currently copying the stack trace of a failed test. 2. Add 'Copy Trace' in the context menu 3. Should we add image descriptor for the JUnit context menu items?
(In reply to Manju Mathew from comment #4) > 3. Should we add image descriptor for the JUnit context menu items? Yes, "Copy" and "Copy Qualified Name" should have the same images as the same actions in the context menu in the Package Explorer. The existing "Copy Failure List" and the new "Copy Failure Trace" actions should not get an icon.
Thanks for reviewing Manju. If I undo my changes to MANIFEST.MF, error below is reported: "This plug-in does not export all of its package" and "Quick Fix" proposes to add org.eclipse.jdt.internal.junit;x-internal:=true, to MANIFEST.MF. Not sure I understand what's happening here. But I will undo changes on MANIFEST.MF anyway.
(In reply to Eric Le Ponner from comment #6) > Thanks for reviewing Manju. > > If I undo my changes to MANIFEST.MF, error below is reported: > "This plug-in does not export all of its package" > > and "Quick Fix" proposes to add > org.eclipse.jdt.internal.junit;x-internal:=true, > to MANIFEST.MF. > > Not sure I understand what's happening here. > But I will undo changes on MANIFEST.MF anyway. That is strange. There is no package in the plug-in "org.eclipse.jdt.junit" named "org.eclipse.jdt.internal.junit". More over all the existing packages (8 packages)are already exported by this plug-in.