[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-dev] scdoc in scide
- To: Jakob Leben <jakob.leben@xxxxxxxxx>
- Subject: Re: [sc-dev] scdoc in scide
- From: Jonatan Liljedahl <lijon@xxxxxxxxxxxx>
- Date: Fri, 12 Dec 2014 10:49:28 +0100
- Cc: "sc-dev@xxxxxxxxxxxxxxxx" <sc-dev@xxxxxxxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=gV29MC3o2v3xFaoUZHjb8OtvPcEttsnpTgDiGUg40Eg=; b=CgWJty+9ScrywyRC17DiTOlCzisnnzQ8zXVJPMmTauJPlOJjr++TkjciOPo6umw0bR sjMbThqAA78aLi/+CdwI0CjQ96QvTJo4SHtVa8094a/t6jiYWu14IiYMz6zrt9Ryzc2g OgBsBhgL96c3l0OngD9jttJhODIUJwrS5Ys4i0t6RhjqeXr1wAMoltSQFRknlBJ7SlyW eo8majf/2lI1feYAr3/rPDUTT9/e5bUKJQTYEQfM4M8KNSUS3SiIqjfxH7H8vYPUwtyO FlC1kQ0OTxoR0beKQ+fyjbN0at7NIfvqFqcYfST+ARsU5EXC6LRwxtEm4mlAx9XEdWzX nogw==
- In-reply-to: <CAAuBga1iFioTf=r5oHY0b=ONBVrpYtqYMOStbXm9ggZ9PTWrLA@mail.gmail.com>
- List-id: SuperCollider developers mailing list <sc-devel.create.ucsb.edu>
- References: <5488C8EB.7010500@gmail.com> <CAAuBga1iFioTf=r5oHY0b=ONBVrpYtqYMOStbXm9ggZ9PTWrLA@mail.gmail.com>
- Reply-to: sc-dev@xxxxxxxxxxxxxxxx
- Sender: owner-sc-dev@xxxxxxxxxxxxxxxx
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 =
helpSourceDirs.add(f.fullPath.withoutTrailingSlash);
} {
find.(f);
};
}
};
[thisProcess.platform.userExtensionDir,
thisProcess.platform.systemExtensionDir].do {|dir|
find.(PathName(dir));
};
};
^helpSourceDirs
}
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.
--
/Jonatan
http://kymatica.com
_______________________________________________
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/