Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use absolute folder path to open it as working dir in terminal #11914

Merged
merged 3 commits into from
Nov 30, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
@Singleton
public class OpenInTerminalAction extends AbstractPerspectiveAction {

private CoreLocalizationConstant locale;
private final ProcessesPanelPresenter processesPanelPresenter;

interface Command extends SafeHtmlTemplates {
Expand All @@ -59,8 +58,6 @@ public OpenInTerminalAction(
locale.openInTerminalAction(),
null,
machineResources.addTerminalIcon());
this.locale = locale;

this.processesPanelPresenter = processesPanelPresenter;
}

Expand All @@ -76,7 +73,7 @@ public void actionPerformed(ActionEvent event) {
final Container parent = resource.getParent();
resource = parent;
}
Path path = resource.getLocation().makeRelative();
Path path = appContext.get().getProjectsRoot().append(resource.getLocation());
Command cmdTmpl = GWT.create(Command.class);
String command = cmdTmpl.openInTerminalCommand(path.toString()).asString();
processesPanelPresenter.newTerminal(TerminalOptionsJso.create().withCommand(command), true);
Expand Down