Do not use executor name with mnemonic it run configuration dialog (UX-540)

+ change mnemonic of `Allow parallel run` to U
+ replace removing mnemonics from getStartActionText to just calling getActionText

The motivation is described in the ticket.
Removing mnemonic seems to be safe here as:

1) the mnemonic was assigned to a default button;
2) the mnemonic might be different in the same dialog depending on executor, so habit cannot be strong here.
This commit is contained in:
Alexander Zolotov
2019-03-11 13:16:41 +03:00
parent 29b8151e7a
commit 748587d3ca
5 changed files with 5 additions and 6 deletions
@@ -265,7 +265,7 @@ public abstract class JavaTestFrameworkRunnableState<T extends
if (Comparing.strEqual(forkMode, "none")) {
if (forkPerModule()) {
if (isExecutorDisabledInForkedMode()) {
final String actionName = UIUtil.removeMnemonic(executor.getStartActionText());
final String actionName = executor.getActionName();
throw new CantRunException("'" + actionName + "' is disabled when per-module working directory is configured.<br/>" +
"Please specify single working directory, or change test scope to single module.");
}
@@ -1123,7 +1123,7 @@ public class ChooseRunConfigurationPopup implements ExecutorProvider {
if (new EditConfigurationsDialog(project) {
@Override
protected void init() {
setOKButtonText(executor.getStartActionText());
setOKButtonText(executor.getActionName());
setOKButtonIcon(executor.getIcon());
myExecutor = executor;
super.init();
@@ -37,7 +37,7 @@ public class RunDialog extends DialogWrapper implements RunDialogBase {
setTitle(executor.getId());
setOKButtonText(executor.getStartActionText());
setOKButtonText(executor.getActionName());
setOKButtonIcon(executor.getIcon());
myConfigurable = new ProjectRunConfigurationConfigurable(project, this);
@@ -318,7 +318,7 @@ show.swing.inspector=&Enable capturing form snapshots
show.swing.inspector.disabled=&Enable capturing form snapshots (requires JRE 5.0 or higher)
before.run.property.make=Make
run.configuration.store.place.option=&Share
run.configuration.allow.running.parallel=Allow &parallel run
run.configuration.allow.running.parallel=Allow parallel r&un
run.configuration.default.type.description=configuration
#GeneralCommandLine
@@ -30,7 +30,6 @@ import com.intellij.openapi.util.InvalidDataException;
import com.intellij.openapi.util.WriteExternalException;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.ui.UIUtil;
import org.jdom.Element;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -185,7 +184,7 @@ public class AbstractRerunFailedTestsAction extends AnAction implements AnAction
boolean cellHasFocus) {
final Component component = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (value instanceof Executor) {
setText(UIUtil.removeMnemonic(((Executor)value).getStartActionText()));
setText(((Executor)value).getActionName());
setIcon(((Executor)value).getIcon());
}
return component;