Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 454965 - [TERMINALS] please make preference for default startup directory of new local terminal
Summary: [TERMINALS] please make preference for default startup directory of new local...
Status: RESOLVED FIXED
Alias: None
Product: TCF
Classification: Tools
Component: Target (show other bugs)
Version: 1.3   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 1.3   Edit
Assignee: Uwe Stieber CLA
QA Contact: Uwe Stieber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-11 22:06 EST by Paul Verest CLA
Modified: 2015-02-18 10:49 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Verest CLA 2014-12-11 22:06:32 EST
please make preference for default location of new local terminal

Before it was Eclipse home, now it is user home,
I would prefer Workspace home


E.g. 

Default location [                    ] \/ [_B_rowse ...]

where \/ is drop down menu with
- User home
- Eclipse home
- Eclipse workspace


see also Bug 454963 - [TERMINALS] please add ECLIPSE_HOME and ECLIPSE_WORKSPACE environment variables to launched local termina
Comment 2 Ganapathi Kamath CLA 2015-02-08 02:22:04 EST
a) I hope that eclipse dynamic variable can be used in the location settings
by using variables such as this, it is possible to automatically set default location dependent on the state maintained by eclipse. 
${selected_resource_loc}
b) another default location could be the location open file in the editor
c) An open terminal menu item  right from a folder/file location in the file browser, should preset the starting location to that.
Comment 3 Ganapathi Kamath CLA 2015-02-08 15:14:18 EST
Having three separate text boxes
1) text box for command invocation
2) text box for command working directory
3) text box for command line arguments
seems essential

Perhaps when right clicking 
* on project/file-explorer, 
* custom shortcuts/favorites/launchers/links
maybe they need their own custom configurations with their own defaults.
Comment 4 Uwe Stieber CLA 2015-02-09 03:31:50 EST
Hi Ganapathi,

Did you tried to add additional custom "Show In..." entries to the table in the preferences that match your needs? 

Why do you need to customize the local shell command and command line arguments? Is it that you want to use some other shell than /bin/sh? On Windows customizing the command and the command line arguments seems not necessary.

>Perhaps when right clicking 
>* on project/file-explorer, 
>* custom shortcuts/favorites/launchers/links
>maybe they need their own custom configurations with their own defaults.

But you have this or do I miss something here? Isn't the "Show In..." context menu what you are looking for? You can add additional entries to that context menu from within the preferences.

>a) I hope that eclipse dynamic variable can be used in the location settings
>by using variables such as this, it is possible to automatically set default >location dependent on the state maintained by eclipse. 
>${selected_resource_loc}

Not yet. Feel free to open a specific bugzilla to allow the use of Eclipse variables within the working directory field. Also, contributions are always welcome.

>b) another default location could be the location open file in the editor

OK. That should be fairly easy to do. Again, contributions are always welcome.

>c) An open terminal menu item  right from a folder/file location in the file >browser, should preset the starting location to that.

Can you please more specific what you expect here? I'm not sure I understand your request.
Comment 5 Ganapathi Kamath CLA 2015-02-11 23:51:16 EST
so far, i use eclipse sometimes, and other times use gnome-terminal/vim. 
and am just thinking about if having plenty of terminals within eclipse, it might open a new mode of working. 
My first attempt was to use the external-tools/run/xyz which allows you to configure a tool, a working directory and its arguments. I used that to get some functionality of a bash shell, but was limited to input/output via the console-log buffer. 
tcf-terminal, caught my attention, in that it allowed multiple terminals.
that also changed on screen even when changing ide views.
As of now I am on version 1.2 as got from the luna update site. Thought it could do more. So found this bug report, just thought to include some more suggestions.

I am normally a bash user, but yes I thought one may want to run another shell.  I thought of doing that because bash is coughing, since the shell-shock patches.
https://bugzilla.redhat.com/show_bug.cgi?id=1172381

When using the file/project explorer, there are times when one wants to get to command prompt in that location directly by right clicking on it.  now to do that one has to right click, goto properties, copy paste the path and cd to it in the terminal, But maybe being able to open a terminal corresponding a file opern from that project folder should also suffice.
Comment 6 Uwe Stieber CLA 2015-02-12 01:55:18 EST
Hi Ganapathi,
Please give our latest (development) version a try. You can install the newest bits from our nightly P2 repository (http://download.eclipse.org/tools/tcf/builds/development/nightly). You will get a much better integration of the terminal with the Eclipse project explorer. If there is something missing, like the Eclipse variable support or the take path from the open editor, we can look into adding it.
Comment 7 Uwe Stieber CLA 2015-02-17 10:04:09 EST
>... or the take path from the open editor

This got implemented. See bug 460064.
Comment 8 Uwe Stieber CLA 2015-02-18 08:10:21 EST
>a) I hope that eclipse dynamic variable can be used in the location settings
>by using variables such as this, it is possible to automatically set default >location dependent on the state maintained by eclipse. 
>${selected_resource_loc}

This got implemented too.

http://git.eclipse.org/c/tcf/org.eclipse.tcf.git/commit/?id=1f5377c773b8f6d7e214667ae2d41b597d216b03
Comment 9 Uwe Stieber CLA 2015-02-18 10:28:35 EST
>1) text box for command invocation
>3) text box for command line arguments

Done for non Windows hosts.

http://git.eclipse.org/c/tcf/org.eclipse.tcf.git/commit/?id=3ef07c60eb1a596b19caf24b3e85f876c6d54a8c
Comment 10 Martin Oberhuber CLA 2015-02-18 10:49:27 EST
(In reply to Uwe Stieber from comment #8)
> >a) I hope that eclipse dynamic variable can be used in the location settings

Note that when the active editor's folder is used as the startup directory for the new shell, there will be very few cases where no selection is active (and thus the Preference would kick in).

Paul, I would recommend that you try out the new behavior and give your comments.