www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - Visual D and 'Find all references' broke

reply Pie? <AmericanPie gmail.com> writes:
Find all references doesn't work in visual D. It just returns the 
selected text. Would be nice if it worked, even if it just did a 
match on the current file. Is this possible?
Jun 04 2016
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 04.06.2016 17:17, Pie? wrote:
 Find all references doesn't work in visual D. It just returns the
 selected text. Would be nice if it worked, even if it just did a match
 on the current file. Is this possible?
Unfortunately, the implementation of "Find all references" is rather incomplete (In my short experiments it worked for local variables, but that's not a really its purpose). It uses the same semantic engine as Mono-D which seems to perform much better. So it could just be a matter of fixing some bugs, but I didn't have time to get back to it recently... Pull requests welcome :D
Jun 05 2016
parent reply Pie? <AmericanPie gmail.com> writes:
On Sunday, 5 June 2016 at 15:36:15 UTC, Rainer Schuetze wrote:
 On 04.06.2016 17:17, Pie? wrote:
 Find all references doesn't work in visual D. It just returns 
 the
 selected text. Would be nice if it worked, even if it just did 
 a match
 on the current file. Is this possible?
Unfortunately, the implementation of "Find all references" is rather incomplete (In my short experiments it worked for local variables, but that's not a really its purpose). It uses the same semantic engine as Mono-D which seems to perform much better. So it could just be a matter of fixing some bugs, but I didn't have time to get back to it recently... Pull requests welcome :D
How difficult is it to setup an maintain? Can I open the project in Visual Studio, make a change, compile and restart a VS test project and check the changes? Or have you already setup everything to play nice?
Jun 05 2016
parent reply Pie? <AmericanPie gmail.com> writes:
On Sunday, 5 June 2016 at 22:19:17 UTC, Pie? wrote:
 On Sunday, 5 June 2016 at 15:36:15 UTC, Rainer Schuetze wrote:
 On 04.06.2016 17:17, Pie? wrote:
 [...]
Unfortunately, the implementation of "Find all references" is rather incomplete (In my short experiments it worked for local variables, but that's not a really its purpose). It uses the same semantic engine as Mono-D which seems to perform much better. So it could just be a matter of fixing some bugs, but I didn't have time to get back to it recently... Pull requests welcome :D
How difficult is it to setup an maintain? Can I open the project in Visual Studio, make a change, compile and restart a VS test project and check the changes? Or have you already setup everything to play nice?
What I mean is, am I going to have to do a lot of work to make it work on my system or can I just dive in and make changes and it work ;) (I'm lazy/don't have a lot of time)
Jun 05 2016
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 06.06.2016 00:25, Pie? wrote:
 On Sunday, 5 June 2016 at 22:19:17 UTC, Pie? wrote:
 On Sunday, 5 June 2016 at 15:36:15 UTC, Rainer Schuetze wrote:
 On 04.06.2016 17:17, Pie? wrote:
 [...]
Unfortunately, the implementation of "Find all references" is rather incomplete (In my short experiments it worked for local variables, but that's not a really its purpose). It uses the same semantic engine as Mono-D which seems to perform much better. So it could just be a matter of fixing some bugs, but I didn't have time to get back to it recently... Pull requests welcome :D
How difficult is it to setup an maintain? Can I open the project in Visual Studio, make a change, compile and restart a VS test project and check the changes? Or have you already setup everything to play nice?
What I mean is, am I going to have to do a lot of work to make it work on my system or can I just dive in and make changes and it work ;) (I'm lazy/don't have a lot of time)
Unfortunately it's not super-easy, but if you only want to work on the semantic engine, it might be not too complicated as you don't have to build Visual D itself: - make a clone of the Visual D repository - make sure you also update D_Parser as a submodule in vdc/abothe/Parser - load solution vdc/abothe/VDserver.sln - make sure there is no other process DParserCOMServer.exe running, e.g. by closing all Visual Studio processes that have D files loaded - build and run DParserCOMServer - set a breakpoint in GetReferences() in vdc\abothe\comserver\VDServer.cs - start another instance of VS, it should attach to your DParserCOMServer process and call GetReferences() if you issue "Find all References" - you should be able to step through the code and fix all bugs ;-) Good luck!
Jun 06 2016
parent reply Pie? <AmericanPie gmail.com> writes:
On Monday, 6 June 2016 at 22:21:04 UTC, Rainer Schuetze wrote:
 On 06.06.2016 00:25, Pie? wrote:
 On Sunday, 5 June 2016 at 22:19:17 UTC, Pie? wrote:
 On Sunday, 5 June 2016 at 15:36:15 UTC, Rainer Schuetze wrote:
 [...]
How difficult is it to setup an maintain? Can I open the project in Visual Studio, make a change, compile and restart a VS test project and check the changes? Or have you already setup everything to play nice?
What I mean is, am I going to have to do a lot of work to make it work on my system or can I just dive in and make changes and it work ;) (I'm lazy/don't have a lot of time)
Unfortunately it's not super-easy, but if you only want to work on the semantic engine, it might be not too complicated as you don't have to build Visual D itself: - make a clone of the Visual D repository - make sure you also update D_Parser as a submodule in vdc/abothe/Parser - load solution vdc/abothe/VDserver.sln - make sure there is no other process DParserCOMServer.exe running, e.g. by closing all Visual Studio processes that have D files loaded - build and run DParserCOMServer - set a breakpoint in GetReferences() in vdc\abothe\comserver\VDServer.cs - start another instance of VS, it should attach to your DParserCOMServer process and call GetReferences() if you issue "Find all References" - you should be able to step through the code and fix all bugs ;-) Good luck!
Thanks, I'll give work on getting it setup in the near future. can I accomplish the following in the semantic engine? 1. search and replace 2. Debug helpers: e.g., .net's ToString() and debugger qualifiers like ,ac(re-evaluates expression each time), etc... 3. mixin debugging helpers. (e.g., show the mixin expression to the user and possibly the line that is failing).
Jun 07 2016
parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 07.06.2016 23:41, Pie? wrote:
 Thanks, I'll give work on getting it setup in the near future. can I
 accomplish the following in the semantic engine?

 1. search and replace
I guess you mean renaming some symbol and replace all references? This is "Find References" (this is in the semantic engine) plus changing the source (this needs to be done by Visual D itself).
 2. Debug helpers: e.g., .net's ToString() and debugger qualifiers like
 ,ac(re-evaluates expression each time), etc...
No, the debug engine is a different component (see mago).
 3. mixin debugging helpers. (e.g., show the mixin expression to the user
 and possibly the line that is failing).
This could be possible, e.g. by presenting the mixin string in the tooltip.
Jun 08 2016