Thread overview
[Issue 13912] Offer to 'import missing packages' like C# and Java
Jan 01, 2015
Rainer Schuetze
Jan 02, 2015
Manu
Jan 02, 2015
Rainer Schuetze
Jun 10, 2015
Manu
Jun 10, 2015
Jacob Carlborg
May 11, 2019
Manu
Dec 17, 2022
Iain Buclaw
January 01, 2015
https://issues.dlang.org/show_bug.cgi?id=13912

Rainer Schuetze <r.sagitario@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |r.sagitario@gmx.de

--- Comment #1 from Rainer Schuetze <r.sagitario@gmx.de> ---
C# is a pretty high bar, I'd be happy to get to the level of C++ integration. You don't get #include insertions out-of-the-box, you need extensions like VisualAssist for that...

--
January 02, 2015
https://issues.dlang.org/show_bug.cgi?id=13912

--- Comment #2 from Manu <turkeyman@gmail.com> ---
Do you think it's particularly hard?

I would have thought all the cool advanced helper tools would becomes a lot easier with D since everything is namespaced properly, and there's no preprocessor...

Well it's obviously not urgent anyway, but it's nice to have these things on
the list.
I think import insertion would be a big win; D has a lot of modules. Try and do
some string processing, you'll end up with 6 imports for different modules with
string related functions.
My problem more often than not is that I can never remember which arbitrary
module different phobos functions come from. A popup helper would save me from
that :)


On a side note, if we were able to approach the C# experience, or at least exceeding the C++ experience, I think it would create a powerful attraction for C++ users towards D.

Mago really helps the debug experience! It feels a lot more natural now, but at least in my work where I'm always linking against C/C++ code, I can't lose the C debugger >_<

--
January 02, 2015
https://issues.dlang.org/show_bug.cgi?id=13912

--- Comment #3 from Rainer Schuetze <r.sagitario@gmx.de> ---
Let's see if Mono-D can do it, we might then be able to do it, too ;-)

More seriously, with the current rush to use selective local imports, a little more interaction might be necessary to select where to put that import. Also, adding to existing imports might be desirable...

--
June 09, 2015
https://issues.dlang.org/show_bug.cgi?id=13912

Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unspecified                 |D2

--
June 10, 2015
https://issues.dlang.org/show_bug.cgi?id=13912

--- Comment #4 from Manu <turkeyman@gmail.com> ---
(In reply to Rainer Schuetze from comment #3)
> Let's see if Mono-D can do it, we might then be able to do it, too ;-)
> 
> More seriously, with the current rush to use selective local imports, a little more interaction might be necessary to select where to put that import. Also, adding to existing imports might be desirable...

Yeah you're right, it's a lot more comprehensive than C# :)

I can imagine some nice solutions, but yeah, quite a few details.
There are 4 states I can imagine, global/local (ie, import placed in local
function) and whole-module/single-symbol.

There would want to be logic such that single-symbol imports would be appended to a comma separated list of other symbols that may already be import from the same module.

The 4 states that the user may select may be a little awkward for ui :)

--
June 10, 2015
https://issues.dlang.org/show_bug.cgi?id=13912

Jacob Carlborg <doob@me.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doob@me.com

--- Comment #5 from Jacob Carlborg <doob@me.com> ---
In Eclipse, the IDE will automatically add missing imports if autocomplete is used to select a symbol.

--
May 11, 2019
https://issues.dlang.org/show_bug.cgi?id=13912

Manu <turkeyman@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Scellow33@gmail.com

--- Comment #6 from Manu <turkeyman@gmail.com> ---
*** Issue 17151 has been marked as a duplicate of this issue. ***

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=13912

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--
October 18
https://issues.dlang.org/show_bug.cgi?id=13912

--- Comment #7 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/visuald/issues/203

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--
October 18
https://issues.dlang.org/show_bug.cgi?id=13912

--- Comment #8 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/visuald/issues/237

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--