An open API service indexing awesome lists of open source software.

https://github.com/lppedd/idea-js-quickdoc-nowrap


https://github.com/lppedd/idea-js-quickdoc-nowrap

Last synced: 6 months ago
JSON representation

Awesome Lists containing this project

README

          

# idea-js-quickdoc-nowrap

## English
Example of generated documentation from `JSDocumentationProvider`
```html


TagNormalizer.denormalizeTags(
tags: NormalizedTags): Vector<ApiTag>



De-normalizza una lista di tag.


Questo step e' necessario per l'invio delle informazioni al back-end,


oppure per i componenti Angular che hanno necessita' di una


struttura dati innestata.



Params:


tags – I tag da de-normalizzare


```

* class `JSDocBuildMethodInfo extends JSDocBuilderSymbolInfo`

the HTML string is built here
* method `JSDocBuilderSymbolInfo#addContent`

the body of the quickdoc (the main content) is created here
* method `JSDocBuilderSimpleInfo#convertMarkdownToHtml`

every `\n` is suffixed with a `

` tag here. The paragraph represents the wrap

The route to take seems to be:
* extend `JSDocumentationProvider`, overriding method `generateDoc` to use the cloned class mentioned below
* clone `JSDocumentationBuilder`, editing the constructor to use the new classes mentioned below
* extend `JSDocBuilderMethodInfo` and `JSDocBuilderSymbolInfo`, overriding method `convertMarkdownToHtml`
* use the new classes in place of the old (standard) ones in `JSDocumentationBuilder`

## Italiano
Esempio di stringa generata da `JSDocumentationProvider`
```html


TagNormalizer.denormalizeTags(
tags: NormalizedTags): Vector<ApiTag>



De-normalizza una lista di tag.


Questo step e' necessario per l'invio delle informazioni al back-end,


oppure per i componenti Angular che hanno necessita' di una


struttura dati innestata.



Params:


tags – I tag da de-normalizzare


```

* classe `JSDocBuildMethodInfo extends JSDocBuilderSymbolInfo`

qui viene creata la stringa HTML
* metodo `JSDocBuilderSymbolInfo#addContent`

qui viene creato il body del quickdoc
* metodo `JSDocBuilderSimpleInfo#convertMarkdownToHtml`

qui vengono inseriti i tag `

` per ogni `\n`, che sono il wrap

La strada da prendere sembra quella di:
* estendere `JSDocumentationProvider`, sovrascrivendo il metodo `generateDoc` per utilizzare la nuova classe clonata menzionata sotto
* clonare `JSDocumentationBuilder`, modificando il costruttore per utilizzare le nuove classi menzionate sotto
* estendere `JSDocBuilderMethodInfo` e `JSDocBuilderSymbolInfo`, sovrascrivendo il metodo `convertMarkdownToHtml`
* utilizzare le nuove classi al posto delle "vecchie" (standard) in `JSDocumentationBuilder`