How to add a JComponent to pre-existing Run configuration editor


I am not entirely sure this is possible, but I am trying to add a custom component (JButton, JLabel, etc...) to an existing Run Configuration Editor, so far this is what I have tried.

RunManager instance = RunManager.getInstance(project);
RunnerAndConfigurationSettings nodejsTemplate = instance.createConfiguration("my-config-name", NodeJsRunConfigurationType.getInstance());
(NodeJsRunConfiguration) nodejsTemplate.getConfiguration();

However this produce an error:

java.lang.UnsupportedOperationException: This method should never be called!

So I guess that is the wrong direction.

I was thinking to create my own class and extends to the


However the class is private and I will have to make a lot of plumbing work.

Is there an easy way to achieve this? Thanks


Please see, EP: NodeJS.runConfigurationExtension.

It extends generic com.intellij.execution.configuration.RunConfigurationExtensionBase (samples:, see its javadoc


Yann Cebron thanks for answer, could you please expand a little bit on this?
I guess the first thing would be to create a class that extends the


Like this

public class NodejsExtendedConfigurationEditor extends NodeJSRunConfigurationExtension {
protected @Nullable NodeJSRuntimeSession createLocalRuntimeSession(@NotNull NodeJsRunConfiguration nodeJsRunConfiguration, @NotNull ExecutionEnvironment executionEnvironment) throws ExecutionException {
return null;

protected @Nullable NodeJSRuntimeSession createRemoteRuntimeSession(@NotNull NodeJsRunConfiguration nodeJsRunConfiguration, @NotNull ExecutionEnvironment executionEnvironment, @NotNull NodeFileTransfer nodeFileTransfer) throws ExecutionException {
return null;

protected @Nullable SettingsEditor<NodeJsRunConfiguration> createEditor(@NotNull NodeJsRunConfiguration configuration, Consumer<NodeJsInterpreterChangeListener> listenerRegistrar) {
return super.createEditor(configuration, listenerRegistrar);

public boolean isApplicableFor(@NotNull NodeJsRunConfiguration configuration) {
return true;

public boolean isEnabledFor(@NotNull NodeJsRunConfiguration applicableConfiguration, @Nullable RunnerSettings runnerSettings) {
return true;

Maybe modify the create editor function and add my custom component?

protected @Nullable <P extends NodeJsRunConfiguration> SettingsEditor<P> createEditor(@NotNull P configuration) {
SettingsEditor<P> editor = super.createEditor(configuration);
editor.getComponent().add(new JLabel("Hello"));
return editor;

And maybe add it to my plugin.xml as dependency?

<depends config-file="myPluginId-nodejsExtension.xml">NodeJS</depends>
<extensions defaultExtensionNs="NodeJS">

However like this nothing happens, the createEditor won't get called.


1) com.intellij.execution.configuration.RunConfigurationExtensionBase#createEditor returns null by default, you need to return your custom instance see com.intellij.execution.coverage.CoverageJavaRunConfigurationExtension from Java plugin as sample

2) Override com.intellij.execution.configuration.RunConfigurationExtensionBase#getEditorTitle

3) return false from

4) your plugin.xml "implementation" doesn't match the class name (

NodejsExtendedConfigurationEditor vs

Was `` (that is mentioned a lot in this thread) removed or something? I get `Unresolved reference: NodeJSRunConfigurationExtension` when I try to import it (but not for ``, so I think I do have the JavaScript plugin).

And where is all of this documented actually, or where is the source code if there's no documentation?

How do people know about those classes and their members?


@t4lz The thread above refers to the status of 2021. NodeJS plugin is closed-source and thus cannot be inspected, there is no “official” documentation for it either. The newer variant is com.intellij.javascript.nodejs.execution.runConfiguration.AbstractNodeRunConfigurationExtension in JavaScript.nodeRunConfigurationExtension extension point.


Thank you for the clarification, Yann Cebron. Unlike in e.g. `PythonRunConfigurationExtension`, in `AbstractNodeRunConfigurationExtension`, `patchCommandLine` is final. So how can we offer a similar functionality for node?


…which throws Do not call AbstractNodeRunConfigurationExtension.patchCommandLine. Node.js uses Targets API, not GeneralCommandLine

See /platform/execution/src/com/intellij/execution/target in IJ Community sources for Target API + some README


Please sign in to leave a comment.