Community
Participate
Working Groups
I was originally to file this under PDE/UI, but in fact, the underlying processing of the launcher arguments still doesn't allow anybody to use arguments in launcher configurations that have spaces. See the ticket where I originally entered a discussion on, ticket #88766: - Alex, the eclipse.ini file cannot possibly come out ok if your usage is the following: "My product is called 'My Application' and I want to use the -name feature of the eclipse launcher to set that" In the product editor, since no documentation says otherwise, naively you would enter in the launcher argument multi-line text: -name My Application This however causes the ini to have three lines. Next step, you think "I guess I should have quoted the app name so they dont cut it up": -name "My Application" which, since the quotes aren't processed, just gets you: -name "My Application" in the ini file (which then gives a command line of "-name" ""My" "Application"") Finally, if you try Alex's last example, say: > <launcherArgs> > <programArgs>-name >hello there world</programArgs> > </launcherArgs> > >where "-name" and "hello there world" were put on 2 separate lines in the >product editor. As alex points out, that still doesn't work: >However, when exporting, the eclipse.ini looks like: >-name >hello >there >world instead of -name hello there world At least, that's my understanding of Eddie's situation. In Summary: The *BUG* is very simple: there is NO WAY to use a space in ANY ARGUMENT in ANY LAUNCHER built via PDE. I see the culprit: the use of StringTokenizer to process the launcher arguments, without offering any space-escape syntax.
A part of the problem is in PDE Build but another part may be in PDE UI, cc'ing Wassim to get his opinion.
I am not sure how the *.ini file gets processed, but we were giving the instructions to put each word on a separate line. Perhaps there was ambiguity in the request, and the intent was to put each argument on a separate line. If that is the case, we should stop using StringTokenizer and use ExecutionArguments from Debug to do the parsing of tokens.
(In reply to comment #2) > I am not sure how the *.ini file gets processed, but we were giving the > instructions to put each word on a separate line. > > Perhaps there was ambiguity in the request, and the intent was to put each > argument on a separate line. I'm quite sure... > If that is the case, we should stop using StringTokenizer and use > ExecutionArguments from Debug to do the parsing of tokens. I can't see that class at this moment, but if that supports some space-syntax escaping or otherwise allows spaces in quoted strings to remain untouched, that's the fix we need! Thank you!
Marking this bug to be fixed in 3.3. I have opened bug #168247.
Created attachment 59662 [details] proposed patch Proposed patch uses StreamTokenizer with quoting based on " and ', characters 0-32 are whitespace, everything else is part of a word.
patch released to head