mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WI-35278 Make easier to distinguish PHP and JS debugger in Debug/Run menu
This commit is contained in:
+2
-1
@@ -56,6 +56,7 @@ public abstract class LocatableConfigurationBase extends RunConfigurationBase im
|
||||
@Nullable
|
||||
public String getActionName() {
|
||||
String name = getName();
|
||||
return name.length() < 20 ? name : name.substring(0, 20) + "...";
|
||||
final String shortName = name.length() < 20 ? name : name.substring(0, 20) + "...";
|
||||
return shortName + getPresentableType();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,9 @@ import com.intellij.execution.runners.ProgramRunner;
|
||||
import com.intellij.openapi.actionSystem.DataKey;
|
||||
import com.intellij.openapi.options.SettingsEditor;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.util.PlatformUtils;
|
||||
import com.intellij.util.xmlb.annotations.Transient;
|
||||
import org.jdom.Element;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -111,6 +114,15 @@ public interface RunConfiguration extends RunProfile, Cloneable {
|
||||
return System.identityHashCode(this);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Transient
|
||||
default String getPresentableType() {
|
||||
if (PlatformUtils.isPhpStorm()) {
|
||||
return " (" + StringUtil.first(getType().getDisplayName(), 10, true) + ")";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the run configuration settings are valid.
|
||||
* Note that this check may be invoked on every change (i.e. after each character typed in an input field).
|
||||
|
||||
+2
-2
@@ -353,7 +353,7 @@ public class ChooseRunConfigurationPopup implements ExecutorProvider {
|
||||
|
||||
@Override
|
||||
public String getText() {
|
||||
return Executor.shortenNameIfNeed(getValue().getName());
|
||||
return Executor.shortenNameIfNeed(getValue().getName()) + getValue().getConfiguration().getPresentableType();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1076,7 +1076,7 @@ public class ChooseRunConfigurationPopup implements ExecutorProvider {
|
||||
|
||||
@Override
|
||||
public String getText() {
|
||||
return Executor.shortenNameIfNeed(configuration.getName());
|
||||
return Executor.shortenNameIfNeed(configuration.getName()) + configuration.getConfiguration().getPresentableType();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user