Skip to content

Commit

Permalink
Migrate off of Extensions.findExtension(..) usages
Browse files Browse the repository at this point in the history
This is progress on #7718
  • Loading branch information
jwren committed Dec 4, 2024
1 parent dc1a47f commit dd3ab4d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.intellij.execution.configurations.ConfigurationTypeBase;
import com.intellij.execution.configurations.RunConfiguration;
import com.intellij.execution.configurations.RunConfigurationSingletonPolicy;
import com.intellij.openapi.extensions.Extensions;
import com.intellij.openapi.project.Project;
import com.intellij.psi.search.FileTypeIndex;
import com.intellij.psi.search.GlobalSearchScope;
Expand Down Expand Up @@ -44,7 +43,7 @@ public Factory getFactory() {
}

public static FlutterRunConfigurationType getInstance() {
return Extensions.findExtension(CONFIGURATION_TYPE_EP, FlutterRunConfigurationType.class);
return CONFIGURATION_TYPE_EP.findExtensionOrFail(FlutterRunConfigurationType.class);
}

public static class Factory extends ConfigurationFactory {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.intellij.execution.configurations.ConfigurationFactory;
import com.intellij.execution.configurations.ConfigurationTypeBase;
import com.intellij.execution.configurations.RunConfiguration;
import com.intellij.openapi.extensions.Extensions;
import com.intellij.openapi.project.Project;
import icons.FlutterIcons;
import io.flutter.FlutterBundle;
Expand All @@ -35,7 +34,7 @@ protected FlutterBazelTestConfigurationType() {
}

public static FlutterBazelTestConfigurationType getInstance() {
return Extensions.findExtension(CONFIGURATION_TYPE_EP, FlutterBazelTestConfigurationType.class);
return CONFIGURATION_TYPE_EP.findExtensionOrFail(FlutterBazelTestConfigurationType.class);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.intellij.execution.configurations.ConfigurationFactory;
import com.intellij.execution.configurations.ConfigurationTypeBase;
import com.intellij.execution.configurations.RunConfiguration;
import com.intellij.openapi.extensions.Extensions;
import com.intellij.openapi.project.Project;
import icons.FlutterIcons;
import io.flutter.run.FlutterRunConfigurationType;
Expand All @@ -26,7 +25,7 @@ protected FlutterTestConfigType() {
}

public static FlutterTestConfigType getInstance() {
return Extensions.findExtension(CONFIGURATION_TYPE_EP, FlutterTestConfigType.class);
return CONFIGURATION_TYPE_EP.findExtensionOrFail(FlutterTestConfigType.class);
}

private static class Factory extends ConfigurationFactory {
Expand Down

0 comments on commit dd3ab4d

Please sign in to comment.