public void generateJavaDoc(final EObject it, final ITreeAppendable appendable, final GeneratorConfig config) { final DocumentationAdapter adapter = IterableExtensions.<DocumentationAdapter>head(Iterables.<DocumentationAdapter>filter(it.eAdapters(), DocumentationAdapter.class)); String _documentation = null; if (adapter!=null) { _documentation=adapter.getDocumentation(); } boolean _isNullOrEmpty = StringExtensions.isNullOrEmpty(_documentation); boolean _not = (!_isNullOrEmpty); if (_not) { final Set<EObject> sourceElements = this.getSourceElements(it); if (((sourceElements.size() == 1) && (this.documentationProvider instanceof IEObjectDocumentationProviderExtension))) { final List<INode> documentationNodes = ((IEObjectDocumentationProviderExtension) this.documentationProvider).getDocumentationNodes(IterableExtensions.<EObject>head(sourceElements)); this.addJavaDocImports(it, appendable, documentationNodes); this.generateDocumentation(adapter.getDocumentation(), documentationNodes, appendable, config); } else { this.generateDocumentation(adapter.getDocumentation(), CollectionLiterals.<INode>emptyList(), appendable, config); } } }
/** * Bind custom IEObjectDocumentationProviderExtension. */ public Class<? extends IEObjectDocumentationProviderExtension> bindIEObjectDocumentationProviderExtension() { return N4JSDocumentationProvider.class; }
@Inject private void setDocumentationProvider(IEObjectDocumentationProvider documentationProvider) { if(documentationProvider instanceof IEObjectDocumentationProviderExtension) this.documentationProvider = (IEObjectDocumentationProviderExtension) documentationProvider; }