Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 373928 - Add "Save as..." to Image View
Summary: Add "Save as..." to Image View
Status: CLOSED FIXED
Alias: None
Product: Jubula
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Oliver Goetz CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-12 05:16 EDT by Zeb Ford-Reitz CLA
Modified: 2013-11-06 04:40 EST (History)
5 users (show)

See Also:


Attachments
Patch for Bug 373928 - Add "Save as..." to Image View (19.07 KB, patch)
2013-09-18 05:48 EDT, Sebastian Struckmann CLA
no flags Details | Diff
Patch for Bug 373928 - Add "Save as..." to Image View - Version2 (20.13 KB, patch)
2013-09-20 06:09 EDT, Sebastian Struckmann CLA
raimar.buehmann: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zeb Ford-Reitz CLA 2012-03-12 05:16:10 EDT
Jubula's Image View is useful for analyzing Test Results within the ITE. I think it would be even more useful if we could save the contents of the Image View to the file system ("Save as...", or "Export..."). This would allow the screenshot in question to be attached to a bug report.
Comment 1 Zeb Ford-Reitz CLA 2013-05-13 11:04:42 EDT
Meanwhile, Jubula also has the ability to generate a Mylyn Task from a failed Test Step. I think it would also be useful to (optionally) attach the screenshot to the Task.
Comment 2 Achim Loerke CLA 2013-05-27 04:28:07 EDT
@Triaged:+
Comment 3 Sebastian Struckmann CLA 2013-09-18 05:48:18 EDT
Created attachment 235593 [details]
Patch for Bug 373928 - Add "Save as..." to Image View

I added the command and the handler with enablement and property tester to save an image shown in the image view to a chosen directory.
Comment 4 Raimar Bühmann CLA 2013-09-19 10:52:46 EDT
Nice work, your contribution looks great.

Only minor changes should be done:
* Create the same commit with your email address from Bredex.
* Change the visibility of the attribute ImageViewPropertyTester.HAS_IMAGE from public to private, because it is used only locally.
* Use "SaveImageAs=Save Image &As" instead of "SaveImageAs=Save Image As" to support ALT+A as shortcut in context menu.
* Discuss, which rules should be relevant to generate the default file name, so that it can be saved, e.g. length of string, used char set, and OS (in)dependend conversion.
Comment 5 Sebastian Struckmann CLA 2013-09-20 06:09:25 EDT
Created attachment 235653 [details]
Patch for Bug 373928 - Add "Save as..." to Image View - Version2

including raimar's feedback
Comment 6 Raimar Bühmann CLA 2013-09-20 07:19:05 EDT
Comment on attachment 235653 [details]
Patch for Bug 373928 - Add "Save as..." to Image View - Version2

Added IPLog flag for the final patch from Sebastian.
Comment 8 Raimar Bühmann CLA 2013-09-20 09:24:48 EDT
Now substr is used from StrinUtil to avoid exceptions while cutting the filename.

http://git.eclipse.org/c/jubula/org.eclipse.jubula.core.git/commit/?id=ae6a8ecc7d1b629ca113dfe1f268149a795f5eed
Comment 9 Marvin Mueller CLA 2013-09-23 07:52:24 EDT
Verified and tested.

A context menu and a toolbar icon is now visible and usable for saving the image from the image view.