mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-174209 - Support custom dockerfile names
- Docker deployment sources now singletons, - both source and config now needed to specify deployment
This commit is contained in:
+25
-2
@@ -40,7 +40,19 @@ public abstract class DeploymentConfigurator<D extends DeploymentConfiguration,
|
||||
/**
|
||||
* @see LocatableConfiguration#isGeneratedName()
|
||||
*/
|
||||
public boolean isGeneratedConfigurationName(@NotNull String name, @NotNull DeploymentSource deploymentSource) {
|
||||
public boolean isGeneratedConfigurationName(@NotNull String name,
|
||||
@NotNull DeploymentSource deploymentSource,
|
||||
@NotNull D deploymentConfiguration) {
|
||||
return isGeneratedConfigurationName(name, deploymentSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see LocatableConfiguration#isGeneratedName()
|
||||
* @deprecated Since 2017.3, subclasses should directly override {@link
|
||||
* #isGeneratedConfigurationName(String, DeploymentSource, DeploymentConfiguration)}
|
||||
*/
|
||||
@Deprecated
|
||||
protected boolean isGeneratedConfigurationName(@NotNull String name, @NotNull DeploymentSource deploymentSource) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -48,7 +60,18 @@ public abstract class DeploymentConfigurator<D extends DeploymentConfiguration,
|
||||
* @see LocatableConfiguration#suggestedName()
|
||||
*/
|
||||
@Nullable
|
||||
public String suggestConfigurationName(@NotNull DeploymentSource deploymentSource) {
|
||||
public String suggestConfigurationName(@NotNull DeploymentSource deploymentSource, @NotNull D deploymentConfiguration) {
|
||||
return suggestConfigurationName(deploymentSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see LocatableConfiguration#suggestedName()
|
||||
* @deprecated Since 2017.3, subclasses should directly override {@link
|
||||
* {@link #suggestConfigurationName(DeploymentSource, DeploymentConfiguration)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Nullable
|
||||
protected String suggestConfigurationName(@NotNull DeploymentSource deploymentSource) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+6
-2
@@ -162,13 +162,17 @@ public class DeployToServerRunConfiguration<S extends ServerConfiguration, D ext
|
||||
|
||||
@Override
|
||||
public boolean isGeneratedName() {
|
||||
return getDeploymentSource() != null && getDeploymentConfigurator().isGeneratedConfigurationName(getName(), getDeploymentSource());
|
||||
return getDeploymentSource() != null && getDeploymentConfiguration() != null &&
|
||||
getDeploymentConfigurator().isGeneratedConfigurationName(getName(), getDeploymentSource(), getDeploymentConfiguration());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String suggestedName() {
|
||||
return getDeploymentSource() == null ? null : getDeploymentConfigurator().suggestConfigurationName(getDeploymentSource());
|
||||
if (getDeploymentSource() == null || getDeploymentConfiguration() == null) {
|
||||
return null;
|
||||
}
|
||||
return getDeploymentConfigurator().suggestConfigurationName(getDeploymentSource(), getDeploymentConfiguration());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user