Community
Participate
Working Groups
Build Identifier: 20100218-1602 A run configuration should provide a command line, i.e. it should get the full command line argument to run the run configuration in a unix shell. There should be a button to get this line into the clipboard. Afterwards you'd open a unix shell in the project directory and paste the command line string and run the command. This would be useful to run several times the program in parallel in different shells. The information should be easy to get, as it is also needed to build a runnable jar. Reproducible: Always
This sounds like a noble cause. (In reply to comment #0) > A run configuration should provide a command line, i.e. it should get the full > command line argument to run the run configuration in a unix shell. In the meantime, you can get it from the process's properties. http://wiki.eclipse.org/Graphical_Eclipse_FAQs#How_do_I_check_for_the_command_line_invocation_that_Eclipse_used_to_launch_an_application.3F
We recently had a conversation about this (in a very nice environment :) ), but I don't recall if we came to an agreement nor what exactly it said. I remember we discussed various tabs and all had some disadvantage or other. Let me throw in a few more ideas: (1) What about a button in the left-hand column, just next to the "New", "Duplicate" and "Delete" buttons. Remaining challenge: naming & icon to clearly distinguish the two kinds of copying. (2) What about a (live) label left of [Revert] [Apply] (i.e., *below* the tab folder)? For non-trivial launches that label will of course be truncated, so an explicit 'copy-to-clipboard' button next to the label would be cool (probably using an icon rather than text to save space). I think I like (2) best, because it will give people an immediate idea of what this is all about.
Even I like the Idea(2) but I don't like showing the truncated command line. May be we can have a button left to "Revert" labelled something like "Get Command Line". Clicking on that can open a dialog to show the command line and a copy command like we have as "Copy Build Info". From Implementation perspective, we can give the framework in Platform Debug and any of the adopters like JDT,Junit,PDE etc can provide there information of commandline to support this. If they don't support, there will be no such button.
This needs API changes. I do want to do this in M1 of next release.
*** Bug 537126 has been marked as a duplicate of this bug. ***
(In reply to Sarika Sinha from comment #5) > *** Bug 537126 has been marked as a duplicate of this bug. *** ... where I suggest a copyable area at the foot of the Arguments Tab. As well as supporting those users who must have a non-EClipse command line, it could be a valuable debgging / lrarning aid for modular classpaths.
Will be putting the patch today. I am going ahead with the "Show Command Line" Button on the left of Revert Button. Button will show a dialog with command line text having Copy and Cancel buttons.
New Gerrit change created: https://git.eclipse.org/r/126713
New Gerrit change created: https://git.eclipse.org/r/126716
Very nice! Would it be hard to make the popup that shows the command line resizable?
(In reply to Till Brychcy from comment #10) > Very nice! > > Would it be hard to make the popup that shows the command line resizable? Releasing the current version for now,so that we can get in the build. Will try to make it resizable.
Gerrit change https://git.eclipse.org/r/126713 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/?id=9b9fed3a10f223c926e0140f869d12bea390cb14
Gerrit change https://git.eclipse.org/r/126716 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=7e4d78772a616693a55ef16be754fe0780259e81
New Gerrit change created: https://git.eclipse.org/r/126727
Gerrit change https://git.eclipse.org/r/126727 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=199c5f6d5ca19fb9781572c3b62c739a1055f940
(In reply to Eclipse Genie from comment #15) > Gerrit change https://git.eclipse.org/r/126727 was merged to [master]. > Commit: > http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/ > ?id=199c5f6d5ca19fb9781572c3b62c739a1055f940 Fixes 11 test errors, see http://download.eclipse.org/eclipse/downloads/drops4/I20180728-0805/testresults/html/org.eclipse.jdt.ui.tests_ep49I-unit-cen64-gtk3_linux.gtk.x86_64_8.0.html
New Gerrit change created: https://git.eclipse.org/r/126746
(In reply to Andrey Loskutov from comment #16) > (In reply to Eclipse Genie from comment #15) > > Gerrit change https://git.eclipse.org/r/126727 was merged to [master]. > > Commit: > > http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/ > > ?id=199c5f6d5ca19fb9781572c3b62c739a1055f940 > > Fixes 11 test errors, see > http://download.eclipse.org/eclipse/downloads/drops4/I20180728-0805/ > testresults/html/org.eclipse.jdt.ui.tests_ep49I-unit-cen64-gtk3_linux.gtk. > x86_64_8.0.html Thanks Andrey!!
(In reply to Eclipse Genie from comment #17) > New Gerrit change created: https://git.eclipse.org/r/126746 Making the dialog resizable.
Gerrit change https://git.eclipse.org/r/126746 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/?id=21865ed3ef58dfc479b831009f3a00fb72e25c89
(In reply to Sarika Sinha from comment #19) > (In reply to Eclipse Genie from comment #17) > > New Gerrit change created: https://git.eclipse.org/r/126746 > > Making the dialog resizable. Thanks! One thing I noted is that if you change anything, the result of "Show Command Line" corresponds to the unchanged state, so you have to click "Apply" first. The way the buttons are places somehow suggests that this always should match the current possible un-applied settings. (e.g. if you add a project to the classpath or toggle the "Exclude Test Code"-Setting.)
(In reply to Till Brychcy from comment #21) > > Thanks! > > One thing I noted is that if you change anything, the result of "Show > Command Line" corresponds to the unchanged state, so you have to click > "Apply" first. > The way the buttons are places somehow suggests that this always should > match the current possible un-applied settings. > (e.g. if you add a project to the classpath or toggle the "Exclude Test > Code"-Setting.) Possibly, we can show a warning, do you want to Apply if there are unsaved changes?
(In reply to Sarika Sinha from comment #22) > (In reply to Till Brychcy from comment #21) > > > > Thanks! > > > > One thing I noted is that if you change anything, the result of "Show > > Command Line" corresponds to the unchanged state, so you have to click > > "Apply" first. > > The way the buttons are places somehow suggests that this always should > > match the current possible un-applied settings. > > (e.g. if you add a project to the classpath or toggle the "Exclude Test > > Code"-Setting.) > > Possibly, we can show a warning, do you want to Apply if there are unsaved > changes? A warning is a possible solution. But I'd prefer to either auto-apply changes like the "Run"-Button does (in which case it would make more sense to have the button next to the "Close" and "Run" buttons, if this isn't too much work) or, even better, leave the button where it is and show the commmand line how it would look if the changes were applied (but without actually applying them) - again, if this is not too much work.
Another little issue: It looks like the command line shows is always the "Run" command line, even if I opened it as "Debug" configuration.
New Gerrit change created: https://git.eclipse.org/r/126804
Gerrit change https://git.eclipse.org/r/126804 was merged to [master]. Commit: http://git.eclipse.org/c/www.eclipse.org/eclipse/news.git/commit/?id=f61a43d858704d4ec54035bf403311024a0cde80
(In reply to Till Brychcy from comment #23) > > A warning is a possible solution. > But I'd prefer to either auto-apply changes like the "Run"-Button does (in > which case it would make more sense to have the button next to the "Close" > and "Run" buttons, if this isn't too much work) or, even better, leave the > button where it is and show the commmand line how it would look if the > changes were applied (but without actually applying them) - again, if this > is not too much work. Created Bug 537525. Added N&N. Will fix the Run mode problem :) Just added for testing and forgot to change - thanks!!
New Gerrit change created: https://git.eclipse.org/r/126812
Gerrit change https://git.eclipse.org/r/126812 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/?id=b6969eee271609c54a23356f4cd642c3c42ca68c
(In reply to Eclipse Genie from comment #29) > Gerrit change https://git.eclipse.org/r/126812 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/ > ?id=b6969eee271609c54a23356f4cd642c3c42ca68c With this I can see some debug options (like the -javaagent for advanced source lookup) but e.g. the -agentlib parameter is missing (and -Dfile.encodiing=...): Output of "Show command line": /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/java -javaagent:/Users/till/Applications/Eclipse4.9I20180729-2000.app/Contents/Eclipse/../../../../opensource/eclipse/eclipse.jdt.debug/org.eclipse.jdt.launching/lib/javaagent-shaded.jar -p /Users/till/Documents/workspaces/test-production/m1/bin -m m/p1.P1 Command Line shown in the Process properties: /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:60371 -javaagent:/Users/till/Applications/Eclipse4.9I20180729-2000.app/Contents/Eclipse/../../../../opensource/eclipse/eclipse.jdt.debug/org.eclipse.jdt.launching/lib/javaagent-shaded.jar -Dfile.encoding=UTF-8 -p /Users/till/Documents/workspaces/test-production/m1/bin -m m/p1.P1 Another minor quirk: I have some old launch configurations, where the jvm is missing, so an error is shown. "Run" is disabled in this case, but "Show Command Line" is enabled, but doesn't show anything.
Ok, the missing debugging options can be added easily. For enabling/disabling I need to check out.
New Gerrit change created: https://git.eclipse.org/r/126878
New Gerrit change created: https://git.eclipse.org/r/126879
Gerrit change https://git.eclipse.org/r/126879 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/?id=9c227fb9cc24f8f933f3bab64d64445d412c4547
Gerrit change https://git.eclipse.org/r/126878 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=def91d59df494717ba9d6329d33de28e86599921
(In reply to Sarika Sinha from comment #31) > Ok, the missing debugging options can be added easily. > > For enabling/disabling I need to check out. Released fixes for both.
(In reply to Sarika Sinha from comment #36) > Released fixes for both. Thanks, The button is disabled on errors and I can see the -agentlib now, but the -Dfile.encoding is still missing: (In reply to Till Brychcy from comment #30) > With this I can see some debug options (like the -javaagent for advanced > source lookup) but e.g. the -agentlib parameter is missing (and > -Dfile.encodiing=...): > [...] > Eclipse/../../../../opensource/eclipse/eclipse.jdt.debug/org.eclipse.jdt. > launching/lib/javaagent-shaded.jar -Dfile.encoding=UTF-8 -p ^^^^^^^^^^^^^^^^^^^^^ > /Users/till/Documents/workspaces/test-production/m1/bin -m m/p1.P1 > [...]
(In reply to Till Brychcy from comment #37) > (In reply to Till Brychcy from comment #30) > > With this I can see some debug options (like the -javaagent for advanced > > source lookup) but e.g. the -agentlib parameter is missing (and > > -Dfile.encodiing=...): > > [...] > > Eclipse/../../../../opensource/eclipse/eclipse.jdt.debug/org.eclipse.jdt. > > launching/lib/javaagent-shaded.jar -Dfile.encoding=UTF-8 -p > ^^^^^^^^^^^^^^^^^^^^^ > > /Users/till/Documents/workspaces/test-production/m1/bin -m m/p1.P1 > > [...] The launch property is not set during Show Command Line but the attribute is set during launch, Will investigate and update in the follow up bug 537525. Eclipse SDK Version: 4.9 Build id: I20180801-2000
For me this is not fixed but just a very first step. All other Java related launch configs in the SDK must also support this. Yes, I've read comment 3, but I see no follow-up activities that plan to fix it in the other components for 4.9.
Created Bug 537880 and Bug 537879 in PDE and JDT UI respectively.
Let's close this and track the remaining work in the new bugs.
Added a wiki page for adopters like PDE and JUnit. https://wiki.eclipse.org/LaunchConfigurationShowCommandLine