@Override public void addProposals(String dsl, CheckPointedParseException exception, int detailLevel, List<CompletionProposal> collector) { String propertyName = recoverPropertyName(exception); AppRegistration lastAppRegistration = lookupLastApp(exception); if (lastAppRegistration != null) { this.collectorSupport.addValueHintsProposals(dsl, lastAppRegistration, collector, propertyName, valueHintProviders); } }
@Override public void addProposals(String dsl, CheckPointedParseException exception, int detailLevel, List<CompletionProposal> collector) { String propertyName = recoverPropertyName(exception); AppRegistration appRegistration = lookupLastApp(exception); if (appRegistration != null) { this.collectorSupport.addValueHintsProposals(dsl, appRegistration, collector, propertyName, valueHintProviders); } }
ConfigurationPropertyValueHintRecoveryStrategy(AppRegistryService appRegistry, ApplicationConfigurationMetadataResolver metadataResolver) { super(CheckPointedParseException.class, "foo --bar=", "foo | wizz --bar="); this.collectorSupport = new ProposalsCollectorSupportUtils(appRegistry, metadataResolver); }
@Override public CompletionProposalsResource toResource(List<CompletionProposal> proposals) { CompletionProposalsResource result = new CompletionProposalsResource(); for (CompletionProposal proposal : proposals) { result.addProposal(proposal.getText(), proposal.getExplanation()); } return result; } }
@Override public void addProposals(String dsl, IllegalArgumentException exception, int detailLevel, List<CompletionProposal> proposals) { CompletionProposal.Factory completionFactory = CompletionProposal.expanding(dsl); for (AppRegistration app : this.registry.findAll()) { if (app.getType() == ApplicationType.source || app.getType() == ApplicationType.app) { proposals.add(completionFactory.withSeparateTokens(app.getName(), "Start with a source app or an unbounded streaming app")); } } }
public CompletionProposal withSuffix(String suffix) { return withSuffix(suffix, null); }
/** * Add a suffix as a new token, that is, make sure there is a space before it. * <p> * A space is not appended if this is the very first token. * * @param suffix the suffix to add * @return a new completion proposal */ public CompletionProposal withSeparateTokens(String suffix) { return withSeparateTokens(suffix, null); } }
public CompletionProposal withSuffix(String suffix, String explanation) { return new CompletionProposal(start + suffix, explanation); }
public static Factory expanding(String start) { return new Factory(start); }
@Bean public RecoveryStrategy<?> configurationPropertyValueHintRecoveryStrategy() { return new ConfigurationPropertyValueHintRecoveryStrategy(appRegistry, metadataResolver); }
@Bean public ConfigurationPropertyNameAfterDashDashTaskRecoveryStrategy configurationPropertyNameAfterDashDashTaskRecoveryStrategy() { return new ConfigurationPropertyNameAfterDashDashTaskRecoveryStrategy(appRegistry, metadataResolver); }
ConfigurationPropertyNameAfterDashDashTaskRecoveryStrategy(AppRegistryService appRegistry, ApplicationConfigurationMetadataResolver metadataResolver) { super(CheckPointedParseException.class, "file --"); this.collectorSupport = new ProposalsCollectorSupportUtils(appRegistry, metadataResolver); }
ConfigurationPropertyNameAfterDashDashRecoveryStrategy(AppRegistryService appRegistry, ApplicationConfigurationMetadataResolver metadataResolver) { super(CheckPointedParseException.class, "file --", "file | foo --"); this.collectorSupport = new ProposalsCollectorSupportUtils(appRegistry, metadataResolver); }
UnfinishedConfigurationPropertyNameRecoveryStrategy(AppRegistryService appRegistry, ApplicationConfigurationMetadataResolver metadataResolver) { super(CheckPointedParseException.class, "file --foo", "file | bar --quick", "file --foo.", "file | bar " + "--quick."); this.collectorSupport = new ProposalsCollectorSupportUtils(appRegistry, metadataResolver); }
UnfinishedConfigurationPropertyNameTaskRecoveryStrategy(AppRegistryService appRegistry, ApplicationConfigurationMetadataResolver metadataResolver) { super(CheckPointedParseException.class, "file --foo", "file --foo."); this.collectorSupport = new ProposalsCollectorSupportUtils(appRegistry, metadataResolver); }
ConfigurationPropertyValueHintTaskRecoveryStrategy(AppRegistryService appRegistry, ApplicationConfigurationMetadataResolver metadataResolver) { super(CheckPointedParseException.class, "foo --bar="); this.collectorSupport = new ProposalsCollectorSupportUtils(appRegistry, metadataResolver); }
ConfigurationPropertyValueHintExpansionStrategy(AppRegistryService appRegistry, ApplicationConfigurationMetadataResolver metadataResolver) { this.collectorSupport = new ProposalsCollectorSupportUtils(appRegistry, metadataResolver); }
ConfigurationPropertyValueHintTaskExpansionStrategy(AppRegistryService appRegistry, ApplicationConfigurationMetadataResolver metadataResolver) { this.collectorSupport = new ProposalsCollectorSupportUtils(appRegistry, metadataResolver); }
public AddAppOptionsTaskExpansionStrategy(AppRegistryService appRegistry, ApplicationConfigurationMetadataResolver metadataResolver) { this.collectorSupport = new ProposalsCollectorSupportUtils(appRegistry, metadataResolver); }
public AddAppOptionsExpansionStrategy(AppRegistryService appRegistry, ApplicationConfigurationMetadataResolver metadataResolver) { this.collectorSupport = new ProposalsCollectorSupportUtils(appRegistry, metadataResolver); }