run_configuration: fix warnings, cleanup

This commit is contained in:
Yann Cébron 2021-06-08 12:21:21 +02:00
parent c796fd2f50
commit fd1fc38585
2 changed files with 13 additions and 12 deletions

View File

@ -1,8 +1,10 @@
// Copyright 2000-2020 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2021 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.sdk.runConfiguration;
import com.intellij.execution.configurations.*;
import com.intellij.execution.configurations.ConfigurationFactory;
import com.intellij.execution.configurations.ConfigurationType;
import com.intellij.execution.configurations.RunConfiguration;
import com.intellij.openapi.components.BaseState;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.NotNull;
@ -10,24 +12,21 @@ import org.jetbrains.annotations.Nullable;
public class DemoConfigurationFactory extends ConfigurationFactory {
private static final String FACTORY_NAME = "Demo configuration factory";
protected DemoConfigurationFactory(ConfigurationType type) {
super(type);
}
@Override
public @NotNull String getId() {
return DemoRunConfigurationType.ID;
}
@NotNull
@Override
public RunConfiguration createTemplateConfiguration(@NotNull Project project) {
return new DemoRunConfiguration(project, this, "Demo");
}
@NotNull
@Override
public String getName() {
return FACTORY_NAME;
}
@Nullable
@Override
public Class<? extends BaseState> getOptionsClass() {

View File

@ -1,4 +1,4 @@
// Copyright 2000-2020 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2021 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.sdk.runConfiguration;
@ -11,6 +11,8 @@ import javax.swing.*;
public class DemoRunConfigurationType implements ConfigurationType {
static final String ID = "DemoRunConfiguration";
@NotNull
@Override
public String getDisplayName() {
@ -30,7 +32,7 @@ public class DemoRunConfigurationType implements ConfigurationType {
@NotNull
@Override
public String getId() {
return "DEMO_RUN_CONFIGURATION";
return ID;
}
@Override