Bug 307139 - [launch] Editing multi-line environment variables
Summary: [launch] Editing multi-line environment variables
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.8 M5   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, helpwanted
Depends on:
Blocks:
 
Reported: 2010-03-25 17:00 EDT by Darin Wright CLA
Modified: 2012-01-27 09:25 EST (History)
5 users (show)

See Also:


Attachments
Proposed patch for the bug. (5.23 KB, patch)
2012-01-15 17:27 EST, Jan Opacki CLA
no flags Details | Diff
update (6.13 KB, patch)
2012-01-18 11:40 EST, Michael Rennie CLA
Michael_Rennie: iplog+
Details | Diff
UI update (6.99 KB, patch)
2012-01-18 14:50 EST, Michael Rennie CLA
Michael_Rennie: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2010-03-25 17:00:24 EDT
Now that bug  259281 is fixed, editing multi-line environment variables does not play well (in a single line text widget).
Comment 1 Darin Wright CLA 2010-03-25 17:01:57 EDT
Perhaps the edit dialog could adjust to a multi-line text widget when there are newlines in the text.
Comment 2 Jan Opacki CLA 2012-01-12 03:04:36 EST
Hi Darin, currently I'm working on this bug and would like to discuss 2 scenarios:

- User editing a single line environment variable.
Should he/she be able to enter a new line? (create a new multi-line environment variable)

- User adding a new environment variable.
As above - should he/she be able to enter a new line and thus create a new multi-lined environment variable?

In my opinion not, since it's rather a rare scenario, plus doing so, would break the current user experience: pressing enter would cause a new line, enter + shift - approving the changes. Right now by pressing enter we approve the changes. On the other hand, if decided to swap those combinations (enter approve, enter + shift a new line) to maintain the current behaviour, we would break the general eclipse behaviour for multi-lined text widgets.

I would like to see what others think about it.
Comment 3 Jan Opacki CLA 2012-01-15 17:27:36 EST
Created attachment 209509 [details]
Proposed patch for the bug.

Attached patch contains a proposed solution: if the variable that is being edited contains new lines, it creates a multiline Text widget with a scrollbar.
Comment 4 Michael Rennie CLA 2012-01-16 16:53:51 EST
(In reply to comment #2) 
> I would like to see what others think about it.

I agree with you that we should not allow users to create new multi-line variables, but we should support allowing them to edit them.
Comment 5 Michael Rennie CLA 2012-01-18 11:40:53 EST
Created attachment 209692 [details]
update

This is an updated patch that fixes the compile error (using 1.5 code in a 1.4 bundle).

I will have to test the fix on my Linux machine as Windows seem to strip out newline chars from env entries.
Comment 6 Michael Rennie CLA 2012-01-18 14:50:25 EST
Created attachment 209701 [details]
UI update

Tested on Linux, fix works as expected. This patch just polish's the UI a bit.
Comment 8 Pawel Piech CLA 2012-01-24 17:19:20 EST
Verified with I20120123-2200