VisualD's Intellisense not workign with gtk
Rainer Schuetze via Digitalmars-d-ide
digitalmars-d-ide at puremagic.com
Wed Jul 12 23:30:07 PDT 2017
On 13.07.2017 01:55, FoxyBrown wrote:
> On Tuesday, 11 July 2017 at 07:16:33 UTC, Rainer Schuetze wrote:
>>
>>
>> On 07.07.2017 19:23, FoxyBrown wrote:
>>> Hi, I get no intellisense with visual d when using gtk.
>>>
>>> I use a file that imports all of gtk, like so:
>>>
>>>
>>> module gtk.All;
>>>
>>> public import gtk.AboutDialog;
>>> ...
>>> public import gtk.WindowGroup;
>>>
>>> then I use
>>>
>>> import gtk = gtk.All
>>>
>>> but when using
>>>
>>> gtk.
>>> or gtk.WindowGroup.
>>>
>>> or somegtkWidget.
>>>
>>> no intellisense ever appears or it appears with only the basic object
>>> elements.
>>>
>>>
>>> This makes it very hard to navigate through gtk as I am unfamiliar
>>> with most of the nomenclature.
>>>
>>> Is there any way to get VisualD to properly show the intellisense for
>>> these objects and modules? Even if necessarily having to specify
>>> direct inclusion.
>>>
>>> If I just do
>>>
>>> gtk.gtk.gtk.gtk.gtk.gtk.gtk....
>>>
>>> in an empty d file it goes on and on always listing the same
>>> intellisense. Changing things like gtk.gtkd.gtk.gtkd.... doesnt
>>> change the results.
>>>
>>> The intellisense listed is ByRecord, Error, Exception, File,
>>> Interface, etc. I do not think they are part of gtk.
>>
>> AFAICT the completion has problems with public imports in imported
>> modules: they don't add any symbols. This should be fixed in
>> https://github.com/dlang/visuald/releases/tag/v0.45.0-rc1
>>
>>
>>>
>>> In any case, it clearly isn't working and there doesn't seem to be
>>> any way to correct it. It would be nice if we could precompile
>>> intellisense data from a set of modules(e.g., specify that it build
>>> an intellisense database from a directory recursively... probably
>>> would be faster too). Phobos, gtk, and other libraries generally do
>>> not change often enough that it should work well.
>>
>> If you let the compiler generate JSON data for your project (see
>> language options), Visual D can add the contained symbols to the
>> completion lists. You can also add precompiled JSON files (see global
>> options). This doesn't use any scope information, though, so the list
>> can grow enormously.
>>
>> One of the biggest issues I seem to have with
>>> Visual D is intellisense not really working correctly, if it works at
>>> all, but this isn't a hard problem, is it?
>>
>> You bet it is ;-) It needs to rebuild the compiler front end, just
>> being more friendly regarding error recovery and incremental changes.
>> Visual D uses dparser from the Mono-D project, which still seems the
>> most extensive solution.
>
> No luck. gtk. does nothing intellisense wise. I have all the check boxes
> checked under language options/intellisense.
It works for me, but takes a couple of seconds to digest all the gtk
files. There is no completion before that finishes. I've tried it with a
file looking like this:
module gtkAll;
public import gtk.AboutDialog;
public import gtk.AccelGroup;
...
> In the solution.json file, There is this, which only seems to be import
> modules and enums, no functions are added, maybe that is the problem? I
> do not have the gtk files in the solution(they are only imported during
> compilation), do I need to import them in to the solution for everything
> to work? (
>
> [
> {
> "name" : "gtk.All",
> "kind" : "module",
> "file" : "..\\..\\..\\DLang\\GtkD\\generated\\gtkd\\gtk\\All.d",
> "members" : [
> {
> "name" : "gtk.AboutDialog",
> "kind" : "import",
> "line" : 3,
> "char" : 15
> },
...
> ]
> },
>
The project built JSON file only covers the files actually in the
project. You can create a full JSON file with the help of rdmd, e.g.
rdmd -X gtkd\gtkAll.d
That will likely fail due to object file generation or link errors, but
should still build the JSON file.
More information about the Digitalmars-d-ide
mailing list