@Override public void completeMobaGeneratorIDFeature_GeneratorId( final EObject model, final Assignment assignment, final ContentAssistContext context, final ICompletionProposalAcceptor acceptor) { super.completeMobaGeneratorIDFeature_GeneratorId(model, assignment, context, acceptor); final String prefix = context.getPrefix(); final Map<String, ExtensionGeneratorDelegate.Metadata> allGenerators = this.generatorDelegate.readExtentionsMetadataById(this.grammarName, prefix); Collection<ExtensionGeneratorDelegate.Metadata> _values = allGenerators.values(); final Consumer<ExtensionGeneratorDelegate.Metadata> _function = (ExtensionGeneratorDelegate.Metadata it) -> { StringConcatenation _builder = new StringConcatenation(); String _id = it.getId(); String _version = it.getVersion(); String _versionedIdWithWhitespace = MobaUtil.toVersionedIdWithWhitespace(_id, _version); _builder.append(_versionedIdWithWhitespace, ""); StyledString _createStyledString = this.createStyledString(it); Image _image = this.getImage(model); ConfigurableCompletionProposal _doCreateProposal = this.doCreateProposal( _builder.toString(), _createStyledString, _image, 1000, context); acceptor.accept(_doCreateProposal); }; _values.forEach(_function); }
@Override public void completeMobaTemplate_Template( final EObject model, final Assignment assignment, final ContentAssistContext context, final ICompletionProposalAcceptor acceptor) { super.completeMobaTemplate_Template(model, assignment, context, acceptor); final ITemplateRepositoryManager manager = this.getManager(); boolean _notEquals = (!Objects.equal(manager, null)); if (_notEquals) { List<MobaIndexEntry> _availableEntries = manager.getAvailableEntries(); final Consumer<MobaIndexEntry> _function = (MobaIndexEntry it) -> { EObject _eContainer = it.eContainer(); final MobaIndex index = ((MobaIndex) _eContainer); String _createProposalValue = this.createProposalValue(index, it); StyledString _createStyledString = this.createStyledString(index, it); Image _image = this.getImage(it); ConfigurableCompletionProposal _doCreateProposal = this.doCreateProposal( _createProposalValue, _createStyledString, _image, 1000, context); acceptor.accept(_doCreateProposal); }; _availableEntries.forEach(_function); } }
@Override public void completeMobaDtoEmbeddable_Alias( final EObject model, final Assignment assignment, final ContentAssistContext context, final ICompletionProposalAcceptor acceptor) { super.completeMobaDtoEmbeddable_Alias(model, assignment, context, acceptor); Image _image = this.getImage(model); ConfigurableCompletionProposal _doCreateProposal = this.doCreateProposal("aliasName", null, _image, 1000, context); acceptor.accept(_doCreateProposal); }
@Override public void complete_MobaMuliplicity( final EObject model, final RuleCall ruleCall, final ContentAssistContext context, final ICompletionProposalAcceptor acceptor) { super.complete_MobaMuliplicity(model, ruleCall, context, acceptor); StyledString _displayString_Multiplicity = this.getDisplayString_Multiplicity("attName", "the attName for optional"); Image _image = this.getImage(model); ConfigurableCompletionProposal _doCreateProposal = this.doCreateProposal("attName", _displayString_Multiplicity, _image, 1001, context); acceptor.accept(_doCreateProposal); StyledString _displayString_Multiplicity_1 = this.getDisplayString_Multiplicity("[*]", "to many"); Image _image_1 = this.getImage(model); ConfigurableCompletionProposal _doCreateProposal_1 = this.doCreateProposal("[*]", _displayString_Multiplicity_1, _image_1, 1000, context); acceptor.accept(_doCreateProposal_1); StyledString _displayString_Multiplicity_2 = this.getDisplayString_Multiplicity("[+]", "to many, but at least one"); Image _image_2 = this.getImage(model); ConfigurableCompletionProposal _doCreateProposal_2 = this.doCreateProposal("[+]", _displayString_Multiplicity_2, _image_2, 1000, context); acceptor.accept(_doCreateProposal_2); StyledString _displayString_Multiplicity_3 = this.getDisplayString_Multiplicity("[?]", "optional"); Image _image_3 = this.getImage(model); ConfigurableCompletionProposal _doCreateProposal_3 = this.doCreateProposal("[?]", _displayString_Multiplicity_3, _image_3, 1000, context); acceptor.accept(_doCreateProposal_3); StyledString _displayString_Multiplicity_4 = this.getDisplayString_Multiplicity("[0..*]", "to many"); Image _image_4 = this.getImage(model); ConfigurableCompletionProposal _doCreateProposal_4 = this.doCreateProposal("[0 ..*]", _displayString_Multiplicity_4, _image_4, 1000, context); acceptor.accept(_doCreateProposal_4); }
@Override public void completeMobaGeneratorIDFeature_GeneratorVersion( final EObject model, final Assignment assignment, final ContentAssistContext context, final ICompletionProposalAcceptor acceptor) { super.completeMobaGeneratorIDFeature_GeneratorId(model, assignment, context, acceptor); final String prefix = context.getPrefix(); final MobaGeneratorIDFeature feature = ((MobaGeneratorIDFeature) model); String _id = feature.getId(); final Map<String, ExtensionGeneratorDelegate.Metadata> allGenerators = this.generatorDelegate.readExtentionsMetadataByVersion(this.grammarName, _id, prefix); Collection<ExtensionGeneratorDelegate.Metadata> _values = allGenerators.values(); final Consumer<ExtensionGeneratorDelegate.Metadata> _function = (ExtensionGeneratorDelegate.Metadata it) -> { String _version = it.getVersion(); StyledString _createStyledStringForVersion = this.createStyledStringForVersion(it); Image _image = this.getImage(model); ConfigurableCompletionProposal _doCreateProposal = this.doCreateProposal(_version, _createStyledStringForVersion, _image, 1000, context); acceptor.accept(_doCreateProposal); }; _values.forEach(_function); }