[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] scdoc in scide

Yes, the parsing is already done on the C++ side:

DocNode * scdoc_parse_file(char *fn, int mode);

But indexing of all documents and rendering to HTML is done on the sclang side.
If the help index was moved to C++ as well, it would be easier for the
IDE to query and search it.

Finding the schelp file for a specific class isn't too hard though:
iterate through the SCDoc helpSource folders (the bundled one and all
installed extensions) and look for /Classes/TheClassName.schelp. Then
call scdoc_parse_file() with SCDOC_PARSE_METADATA and you can extract
the summary etc..

Here's how SCDoc locates all the HelpSource folders:

*helpSourceDirs {
        var find;
        if(helpSourceDirs.isNil) {
            this.postMsg("locating HelpSource folders...",2);
            helpSourceDirs = [helpSourceDir]; // Note: an array will
keep the order.
            find = {|dir|
                dir.folders.do {|f|
                    if(f.folderName=="HelpSource") {
                        helpSourceDirs =
                    } {
thisProcess.platform.systemExtensionDir].do {|dir|

helpSourceDir defaults to thisProcess.platform.classLibraryDir.dirname
+/+ "HelpSource", and then the help folders of extensions are located
and added to the array.

What's the relation between LanguageConfig include/exclude paths and
thisProcess.platform.classLibraryDir? Can there be multiple class
library dirs?

On Fri, Dec 12, 2014 at 8:26 AM, Jakob Leben <jakob.leben@xxxxxxxxx> wrote:
> At present, documentation is parsed on-the-fly just before viewing, and this
> process uses the SC language, so you would need to implement communication
> with the SC language to get that information.
> In my opinion the SC documentation system would be much more useful if there
> was plain C++ code to do all the work, with only a tiny SC language wrapper.
> This way any other clients (like the IDE) could easily parse and use the
> documentation.
> Jonatan, what do you think?
> On Wed, Dec 10, 2014 at 2:27 PM, Vincent Donnefort <vdonnefort@xxxxxxxxx>
> wrote:
>> Hi,
>> I'd like to improve the scide autocomplete by adding class description and
>> examples. (see https://github.com/supercollider/supercollider/issues/368)
>> However, what I understand, scide doesn't have a direct access to the SC
>> documentation and I have to implement it and as I don't see any trivial
>> solution, I' prefer to ask for suggestions.
>> Thanks,
>> Vincent.


sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/