[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-dev] scdoc in scide
- To: sc-dev@xxxxxxxxxxxxxxxx
- Subject: Re: [sc-dev] scdoc in scide
- From: Vincent Donnefort <vdonnefort@xxxxxxxxx>
- Date: Fri, 12 Dec 2014 13:16:31 +0100
- Cc: Jakob Leben <jakob.leben@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=oA/iDg/xvIhmIwxJ7y6KpddTm+5tDhRpMFIpVHCzpGE=; b=KZkHuh6xaIrZqV6Y1qXOJzXZAF8LfZCfK43TntHEveg9uM7GJST+lIAWL/iGLpOOm3 zsJ+gPw21Z8fx69Uz5uDVdJxa3q7zMzhnULepSKrPnWxbMgd814SE1FMlerTkeeuh3U3 NPoJBELsZKgUsOm6YkOLMnV+X9OXXVngRkiCD1bwZnS32yITNYzK2WThcJKUk1RdPluX 2Q7G4aLMm9hFCNtSq6kFg2mvAqJuXEOwhnlaCNGY5NB2CtCZH5CFMawDJm8DqwPy2MfL DMwZI8HQJswAp4CNbNkRsBEmMCoSJQh24b0yTOGO5xAfuQIrJG1hO13qrWGzDLqa8c32 pgDw==
- In-reply-to: <CALfiFhDvwH9a=h0DGSMm+H_03x8W9nuy-xn3X6=P4Jh92axkJQ@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> <CALfiFhDvwH9a=h0DGSMm+H_03x8W9nuy-xn3X6=P4Jh92axkJQ@mail.gmail.com>
- Reply-to: sc-dev@xxxxxxxxxxxxxxxx
- Sender: owner-sc-dev@xxxxxxxxxxxxxxxx
- User-agent: Mutt/1.5.21 (2010-09-15)
Adding a SC language command was my first thought, but I found this
solution kind of heavy for only this feature.
IIUC, what you propose is to export functions from SCDoc to expose to
others SC components documentation features. Is it possible to easily
link scide against SCDoc?
On Fri, Dec 12, 2014 at 10:49:28AM +0100, Jonatan Liljedahl wrote:
> 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/
_______________________________________________
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/