View previous topic :: View next topic |
Author |
Message |
ABothe
Joined: 07 Mar 2010 Posts: 12
|
Posted: Mon May 28, 2012 5:17 am Post subject: VisualD + Mono-D crossover |
|
|
Hi Rainer(?),
I haven't found any other way of feedback - anyway:
What do you think about importing the code completion features from D-IDE/Mono-D into VisualD? I mean - strong debugging capabilities for Windows + Decent completion in one IDE!
-- Or, what do you think of it if I helped you to import everything into VisualD? - Probably a way better question
I'm currently working on very advanced completion features like analyzing and resolving mixin expressions, pre-compile time CTFE and template parameter type deduction etc. - so I think it'd be the absolutely ultimate thing to create one extremely decent IDE support for D for Windows.
Since I don't really want to spend further time on improving IDE-related things (like project building, project management and debugging) in D-IDE I think it'd be the best way if we could manage to work together
Although my plugin code is written entirely in C#, it actually should be possible to link C# and D code together somehow - so this shall not be a primary problem!
Anyway I'd really appreciate it to share features in order to have "The" D IDE for Windows!
[Edit] I've externalized all parser/resolver/completion engine sources so it's neither bound to D-IDE nor Mono-D anymore - you can view the sources @ https://github.com/aBothe/D_Parser |
|
Back to top |
|
|
sagitario
Joined: 03 Mar 2007 Posts: 292
|
Posted: Wed May 30, 2012 2:48 pm Post subject: |
|
|
Hi Alexander (?) ,
sorry for the late reply, I was rather busy with non-D stuff lately.
Your proposal sounds quite interesting.
My first approach at creating a plug-in for Visual Studio was also in C# and some C++ and D, but I was not very happy with it (although it even had a compile time view). I very much prefer that we eat our own dog food and do it in D as much as possible. How hard would it be to port your code to D? Would it improve performance or make it worse?
I have recently refactored my parser and semantic analysis code to run in its own process (mainly to avoid the GC causing stalls too long for an interactive application) and it now implements a local COM server. The semantic analysis itself is very unfinished, though. A number of operations still use the compiler generated browse info because of this (like "Goto Definition").
Maybe you can build on and extend the (currently undocumented and still in flux) interface in http://www.dsource.org/projects/visuald/browser/trunk/vdc/ivdserver.d to replace the server used by Visual D.
I only took a short look at your code so far, but I guess it might not be too hard to implement the interface. I'm not a C# expert, but I think creating a COM server in C# should also be painless.
Rainer |
|
Back to top |
|
|
ABothe
Joined: 07 Mar 2010 Posts: 12
|
Posted: Wed May 30, 2012 3:39 pm Post subject: |
|
|
Wow, it seems that the entire VS plugin architecture is totally different to the MonoDevelop one :/
- I originally thought that there was some kind of central plugin definition manifest that allows the developer to define separate modules and class paths, at least for C# dlls, so integrating some kind of event handlers (that catch typing events etc. and redirect it to the parser module where the events had been processed and returned a list of completion entries to show) wouldn't be that hard.
But yeah, managed vs. native - hmm.
I've never worked with COM or COM infrastructure at all, so I don't really know how realizing a com server that provides parser/resolver/completion interfaces could happen.
Furthermore I'm wondering how the NSIS can execute CIL code via that one plugin which is publicly available - everything probably without COM server.
So if it's possible to connect native code somehow with managed code, it'd be very nice and helpful |
|
Back to top |
|
|
sagitario
Joined: 03 Mar 2007 Posts: 292
|
Posted: Wed May 30, 2012 10:43 pm Post subject: |
|
|
ABothe wrote: | Wow, it seems that the entire VS plugin architecture is totally different to the MonoDevelop one :/
- I originally thought that there was some kind of central plugin definition manifest that allows the developer to define separate modules and class paths, at least for C# dlls, so integrating some kind of event handlers (that catch typing events etc. and redirect it to the parser module where the events had been processed and returned a list of completion entries to show) wouldn't be that hard.
|
I'm not sure you are referring to the interface in ivdserver.d or to the whole Visual D plugin. IVDServer is my own construction and is as simple as possible for my current design. The actual plugin is rather complicated, in part because it does not use the C# wrapper classes from the VS SDK, but my own implementation building on the actual interfaces that are not always well documented.
Quote: |
But yeah, managed vs. native - hmm.
I've never worked with COM or COM infrastructure at all, so I don't really know how realizing a com server that provides parser/resolver/completion interfaces could happen.
|
I guess I could setup a small C# project that could provide the server infrastructure.
Quote: |
Furthermore I'm wondering how the NSIS can execute CIL code via that one plugin which is publicly available - everything probably without COM server.
So if it's possible to connect native code somehow with managed code, it'd be very nice and helpful |
It is possible to interface native and managed code in different DLLs, but another advantage of the server process: it can expand the 32-bit address space of Visual Studio to a 64-bit process. |
|
Back to top |
|
|
sagitario
Joined: 03 Mar 2007 Posts: 292
|
Posted: Sun Jul 08, 2012 11:02 am Post subject: |
|
|
Hi Alexander,
I have just committed a wrapper that uses your DParser library as a "semantic server" for Visual D: https://github.com/rainers/visuald/tree/master/vdc/abothe
It works ok for the tooltips, but not yet for the completion. Maybe you can have a look what might be wrong with it (it mostly shows nothing, sometimes all the keywords).
I haven't yet checked how DParser deals with import paths and other settings, so there is a bit more to do to make it work.
The wrapper currently will only run with a new version of Visual D and an additional registry entry. I can build and upload a new rc if you are interested.
Rainer |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|