Skip to content
This repository was archived by the owner on Dec 8, 2020. It is now read-only.

Added a configuration parameter "actionOnStartingCommandIfThereIsRunningCommand" #78

Merged
merged 3 commits into from
Feb 14, 2017

Conversation

KalitaAlexey
Copy link
Member

@KalitaAlexey KalitaAlexey commented Feb 13, 2017

It is preliminary pull request. It is not finished.

I am going to add handling the configuration parameter.

If it is set to "stop", the extension will stop the running command and start a new one.

If it is set to "dialog", the extension will show a message dialog with the "There is a running cargo command" text and the two buttons "Terminate" and "Cancel".
If a user chooses "Terminate", the extension will stop the running command and start the new one.
Otherwise, the extension will ignore a request to start a new command.

If it is set to null, the extension will ignore a request to start a new command.

Another name for the configuration parameter is welcome.

Fixes #75

Verified

This commit was signed with the committer’s verified signature.
Michael-F-Bryan Michael Bryan
It is "actionOnStartingCommandIfThereIsRunningCommand".
@redactedscribe
Copy link
Contributor

redactedscribe commented Feb 13, 2017

@KalitaAlexey: A suggestion for the setting's name: actionOnExecuteCargoCommand. This is shorter and also shows its relation to the executeCargoCommandInTerminal setting.

// If a previous terminal is running, this setting decides which action to take.
// This affects Cargo commands only when `executeCargoCommandInTerminal` is set
// to `true`.
"rust.actionOnExecuteCargoCommand": null,

@KalitaAlexey
Copy link
Member Author

@redactedscribe,
It is not related to executeCargoCommandInTerminal.
The new parameter is going to be check in either TerminalTaskManager or OutputChannelTaskManager.

@redactedscribe
Copy link
Contributor

Ah, my mistake.

Verified

This commit was signed with the committer’s verified signature.
Michael-F-Bryan Michael Bryan
@KalitaAlexey
Copy link
Member Author

Hello @redactedscribe,
I have finished the implementation.
Could you check it for mistakes in English?

@@ -75,6 +75,17 @@ The possible values:
* Some object (`{ "RUST_BACKTRACE": 1 }`)
* `null`

### Setting An Action To Handle Starting A New Command If There Is Another Running Command
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

### Setting An Action To Handle Starting A New Command If There Is Another Command Running

@@ -75,6 +75,17 @@ The possible values:
* Some object (`{ "RUST_BACKTRACE": 1 }`)
* `null`

### Setting An Action To Handle Starting A New Command If There Is Another Running Command

The `"rust.actionOnStartingCommandIfThereIsRunningCommand"` configuration parameter specifies what the extension should do in case of starting a new command if there is another running command.
Copy link
Contributor

@redactedscribe redactedscribe Feb 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "rust.actionOnStartingCommandIfThereIsRunningCommand" configuration parameter specifies what the extension should do in case of starting a new command when there is another command running.


* `"Stop running command"` - the extension will stop another running command and start a new one
* `"Ignore new command"` - the extension will ignore a request to start a new command
* `"Show dialog to let me decide"` - the extension will show an information box to let a user decide whether another running command should be stopped
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* "Show dialog to let me decide" - the extension will show an information box to let the user decide whether or not to stop a running command

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the user?
Which rule regulates ...whether or not to stop...?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"a user" isn't technically wrong, it just happens to sound more natural to say "the user", likely because we are talking about a hypothetical scenario: the extension will do X and the user will choose to react. It's just more specific. With regard to your second question, I don't know if there is a specific rule, I can only confirm it sounds more natural. Your English is understandable, I would not worry so much.

Verified

This commit was signed with the committer’s verified signature.
Michael-F-Bryan Michael Bryan
@KalitaAlexey KalitaAlexey merged commit 3057889 into master Feb 14, 2017
@KalitaAlexey KalitaAlexey deleted the add-command branch February 14, 2017 17:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants