@Override protected boolean isValidForFile(@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { GoLiveTemplateContextType.File fileContextType = TemplateContextType.EP_NAME.findExtension(GoLiveTemplateContextType.File.class); return fileContextType != null && fileContextType.isInContext(file, editor.getCaretModel().getOffset()); }
public static DlangLibraryType getInstance() { return LibraryType.EP_NAME.findExtension(DlangLibraryType.class); }
static AppEngineFlexibleFrameworkType getFrameworkType() { return EP_NAME.findExtension(AppEngineFlexibleFrameworkType.class); }
static AppEngineStandardFrameworkType getFrameworkType() { return EP_NAME.findExtension(AppEngineStandardFrameworkType.class); }
public static CloudLineBreakpointType getInstance() { return XBreakpointType.EXTENSION_POINT_NAME.findExtension(CloudLineBreakpointType.class); }
@NotNull public static PerlRemoteDebuggingConfigurationType getInstance() { return CONFIGURATION_TYPE_EP.findExtension(PerlRemoteDebuggingConfigurationType.class); } }
@NotNull @Override public DeploymentSourceType<?> getType() { return DeploymentSourceType.EP_NAME.findExtension(GradlePluginDeploymentSourceType.class); } }
@NotNull public static PerlConfigurationType getInstance() { return CONFIGURATION_TYPE_EP.findExtension(PerlConfigurationType.class); } }
@NotNull @Override public DeploymentSourceType<?> getType() { return DeploymentSourceType.EP_NAME.findExtension(UserSpecifiedPathDeploymentSourceType.class); }
@NotNull @Override public DeploymentSourceType<?> getType() { return DeploymentSourceType.EP_NAME.findExtension(MavenBuildDeploymentSourceType.class); }
@NotNull @Override public AppEngineArtifactDeploymentSourceType getType() { return DeploymentSourceType.EP_NAME.findExtension(AppEngineArtifactDeploymentSourceType.class); } }
private void openRunConfiguration(@NotNull Project project) { AppEngineCloudType serverType = ServerType.EP_NAME.findExtension(AppEngineCloudType.class); List<RemoteServer<AppEngineServerConfiguration>> servers = RemoteServersManager.getInstance().getServers(serverType); try { DeploymentConfigurationManager.getInstance(project) .createAndRunConfiguration(serverType, ContainerUtil.getFirstItem(servers)); } catch (NullPointerException npe) { /** * Handles the case where the configuration is executed with a null deployment source. See * {@link DeployToServerSettingsEditor#applyEditorTo(DeployToServerRunConfiguration)} The * deployment configuration is set to null causing the following execution to fail: {@link * DeployToServerRunConfiguration#checkConfiguration()} */ logger.warn("Error encountered executing App Engine deployment run configuration.", npe); } }
private void setupDeployRunConfiguration(@NotNull Module module) { RunManager runManager = RunManager.getInstance(module.getProject()); boolean hasExistingDeployConfiguration = runManager .getAllConfigurationsList() .stream() .filter(config -> config instanceof DeployToServerRunConfiguration) .map(config -> ((DeployToServerRunConfiguration) config).getServerType()) .anyMatch(serverType -> serverType instanceof AppEngineCloudType); if (!hasExistingDeployConfiguration) { AppEngineCloudType serverType = ServerType.EP_NAME.findExtension(AppEngineCloudType.class); RemoteServer<AppEngineServerConfiguration> server = ContainerUtil.getFirstItem(RemoteServersManager.getInstance().getServers(serverType)); DeployToServerConfigurationType configurationType = DeployToServerConfigurationTypesRegistrar.getDeployConfigurationType(serverType); ConfigurationFactoryEx factory = configurationType.getFactory(); RunnerAndConfigurationSettings settings = runManager.createRunConfiguration(configurationType.getDisplayName(), factory); DeployToServerRunConfiguration<?, ?> runConfiguration = (DeployToServerRunConfiguration<?, ?>) settings.getConfiguration(); if (server != null) { runConfiguration.setServerName(server.getName()); } runManager.addConfiguration(settings, false /*isShared*/); } }
private static void setupDeploymentRunConfiguration(Module module) { RunManager runManager = RunManager.getInstance(module.getProject()); if (!hasFlexibleDeploymentConfiguration(runManager.getAllConfigurationsList())) { AppEngineCloudType serverType = ServerType.EP_NAME.findExtension(AppEngineCloudType.class); DeployToServerConfigurationType configurationType = DeployToServerConfigurationTypesRegistrar.getDeployConfigurationType(serverType); RunnerAndConfigurationSettings settings = runManager.createRunConfiguration( configurationType.getDisplayName(), configurationType.getFactory()); // Sets the GAE Flex server, if any exists, in the run config. DeployToServerRunConfiguration<?, AppEngineDeploymentConfiguration> runConfiguration = (DeployToServerRunConfiguration<?, AppEngineDeploymentConfiguration>) settings.getConfiguration(); RemoteServer<AppEngineServerConfiguration> server = ContainerUtil.getFirstItem(RemoteServersManager.getInstance().getServers(serverType)); if (server != null) { runConfiguration.setServerName(server.getName()); } runManager.addConfiguration(settings, false /* shared */); } }