Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Sam Harwell
@sharwell
Not really IntelliSense out of the box, at least not in the sense of Xtext, because performance tends to fall far behind if you don't implement it specifically with IDEs in mind. But a set of building blocks covering major features would be good. For exmalpe, I have a generalized smart indent algorithm that can support arbitrary new languages with ANTLR parsers (that's unfortunately not able to be open source yet).
bilsaboob
@bilsaboob
hmm, yeh - I will actually check out the Antlr site ... it was some time ago I last tried it out, v3 I believe - seems like there is some pretty cool new stuff there in v4
but first "walking dead" on tv and some food... :P
Sam Harwell
@sharwell
GoWorks was implemented entirely with ANTLR 4. The demo video shows some of the functionality I'm trying to enable in VS now: https://www.youtube.com/watch?v=l5QW0EDAa1o (start at the 5 minute mark to see code completion, which shows more features as you go to the end of the video)
Sorry didn't realize it would turn that link into a giant image
bilsaboob
@bilsaboob
haha :)
Sam Harwell
@sharwell
The dual mode selection shown in that video is what I'm trying to use completion builders for in VS.
bilsaboob
@bilsaboob
yeh, that is looking pretty good :)
Josh Varty
@JoshVarty
Does anyone know off hand a good way to check if Visual Studio is in Debug Mode or Edit Mode?
(Or any other modes I'm not aware of)
Josh Varty
@JoshVarty
Looks like DTE2.Debugger has a CurrentMode property
Sam Harwell
@sharwell
IVsDebugger.GetMode and IVsDebugger2.GetInternalDebugMode
You also have VsShellUtilities.GetDebugMode which uses IVsDebugger.GetMode for the implementation
@JoshVarty :arrow_up:
Josh Varty
@JoshVarty
:+1: thanks
Patrick Nelson
@plnelson
@uriNV - To answer your earlier question.... You can only have one AD7 debug engine at a time debugging a process. When you set guidNativeOnlyEng as the first engine, this will launch the Native Concord debug engine. Concord has the ability to do mixed mode debugging with other runtimes like CLR and Python using "runtime monitors". This is what PTVS is doing. If you take a look at the PTVS source, you'll see that there are actually two debug engines. The AD7 engine is here. The Concord engine that allows mixed mode is completely different and located here. This is the only open source Concord runtime monitor I'm aware of. There is also some Concord documentation and samples. These are geared more toward expression evaluators, but you may find the info useful.
Yann Duran
@yannduran
@bilsaboob @sharwell Sorry guys, you're right, I don't know what I was thinking :worried:
Uri
@uriNV
@plnelson Thanks! That's very helpful!
I'm still not sure I understand why both the native engine GUID and the AD7 Python engine GUID are supplied to LaunchDebugTargets in that case.
Christopher Harold Butler
@ChristopherHaroldButler
Hey! I'm working on an extension and had to delete a custom command then re add it. Now when I try to run the extension I get an error saying There is already a command handler for the menu command. Has anyone come across this before? Any ideas how to fix? I've tried creating a new GUID but no luck :(
Mikhail
@dosvidos
@sharwell BTW, what do you think of more lightweighter approach to parsing, using the monadic parser combinators, like it's done in https://github.com/sprache/Sprache ? Roslyn and ANTLR is very heavyweight in my opinion
Chris Hall
@situssoft
Does anyone have experience using SolutionEvents or a viable alternative. I'm struggling to use the SolutionEvents.Opened event as it does not fire reliably when I open my solution (which is a CPS project type). Checking the docs here https://msdn.microsoft.com/en-us/library/envdte.solutioneventsclass.aspx would suggest that these events are not for public consumptions anyway. Does anyone have any idea how I might hook open and close for solutions?
bilsaboob
@bilsaboob
@yannduran hey, no worries :) ... didn't hurt for me to browse around the Python source :)
Sam Harwell
@sharwell
This message was deleted
Sam Harwell
@sharwell
@dosvidos I found those do not meet my needs:
  1. ANTLR provides me with tools for managing things like ambiguities. During development there are tools that can show me ambiguous parse results so I can eliminate those ambiguities in the grammar. At runtime I can leverage ambiguity resulting from incomplete input in the IDE to produce more accurate results in features like code completion.
  2. In practice I've found that parser combinators were not suitable for meeting my performance goals. Part of this goes back
  3. When parse results are used for features like outlining, code completion, and smart indent, it's easy for subtle changes to the grammar to impact the accuracy of those results. ANTLR provides tools that can turn these mismatches into compile errors, even in cases where the types would otherwise compile. I can with confidence prototype a new language feature that affects the grammar knowing that all the additional code that forms the IDE will provide a complete experience for the new feature from the start. My fork of ANTLR 4 (which the C# target is based on) is the only tool I know of that even attempts to provide this feature.
Yann Duran
@yannduran
@situssoft This repo looks more geared toward build events, but it may give you an insight into what you might need to do
Yann Duran
@yannduran
@situssoft Actually I think this SolutionEvents class is the one meant for public consumption. It has a OnAfterOpenSolution event that looks like it's designed to do what you're trying to accomplish
MikhailTymchukDX
@MikhailTymchukDX
Hi,
I can get VS2017 installation path using ISetupInstance.GetInstallationPath().
How can I get VSIXInstaller.exe path other than hardcoding + @"Common7\IDE"?
Mikhail
@dosvidos
@sharwell Thank you for the detailed reply - as I can see, you're in expert in parsers and an active maintainer of ANTLR fork - that'amazing! My 2 cents is that for me it's simpler to grasp and start working with the parser combinators than with an enterprise-level parser generator like ANTLR with all it's inherent complexities
Chris Hall
@situssoft
@yannduran thanks for the pointer, I'll give it a try.
Sergey-Vlasov
@Sergey-Vlasov
Wish I could specify a particular dll in manifest prerequisites. Because extensibility.dll is not included in Microsoft.VisualStudio.Component.CoreEditor (but a part of 65 other components).
Alex Eyler
@AlexEyler
@MikhailTymchukDX if you can get an ISetupInstance2 object, that will have a GetProductPath() method that I believe will return the full path to devenv.exe. Otherwise I think you'll have to hardcode the Common7\IDE part
Mikhail
@dosvidos
Out of curiosity - could I use using Microsoft.Internal.VisualStudio.PlatformUI.WindowHelper.ShowModal method call to present the modal WPF dialog or the creation of System.Windows.Interop.WindowInteropHelper will be enough for that WPF window to play nice with VS UI?
Also I call IVsUIShell.EnableModeless before and after the call to ShowDialog
Yann Duran
@yannduran
Now that urls that point to the deprecated VS Gallery get redirected to the marketplace, just how does one upload new versions of extensions?
It explains how to "edit" an extension on the new Marketplace
Yann Duran
@yannduran
@agc93 Thank you! I haven't read it yet, but I also just discovered that if you add /edit to the original url it takes you to the edit page for the extension
Yann Duran
@yannduran
Uggh, I'd been to that page, expecting it to be where I'd upl;oad a new version, but I didn't know about the "invisible" dropdown that you have to hover the mouse over empty space to make it appear. Not particularly intuitive!
blob
My updated vsix is currently being 'rejected' as invalid. I'll have to investigate what it think is invalid. It'd be nice if the page gave up an actual clue as to what's wrong, instead of this generic error message:
Alistair Chapman
@agc93
@yannduran I know what you mean, they use the invisible dropdown in a few other products (TFS/VSTS particularly) so it's always a challenge finding it
Yann Duran
@yannduran
@agc93 Yeah, I clicked on the line and saw no obvious way of editing it, I tried right-clicking the line, nothing. How on earth are we 'supposed' to know to hover over a particular empty space??? LOL
Mikhail
@dosvidos
Here is an example of the code that creates and presents the WPF modal dialog window, that is based on Microsoft.Internal.VisualStudio.PlatformUI.WindowHelper.ShowModal method call
https://github.com/qt-labs/vstools/blob/afbe7ad6cdeedbe54c9be1b943918333e918bc3f/src/qtwizard/AddClassWizard.cs#L52-L99
I suggest that the creation of System.Windows.Interop.WindowInteropHelper could be enough for that WPF window to play nice with VS UI?
MikhailTymchukDX
@MikhailTymchukDX
@AlexEyler yes, that's it, thanks!
Yann Duran
@yannduran
@agc93 I think someone must have seen our comments about the elusive invisible dropdown in the marketplace management screen. Now when I select the row with the extension I want to edit, the dropdown is now automatically visible, and stays visible. Now that's what I call quick action based on customer feedback lol
Alistair Chapman
@agc93
I think mine was previously visible, just tricky to click, so it's possible it was there, just a little glitchy perhaps
Yann Duran
@yannduran
@agc93 They definitely weren't there for me, of that I'm absolutely sure :smile:
masonwheeler
@masonwheeler
@dosvidos Yeah, @sharwell is basically a parser demigod. His advice is well worth listening to.
Patrick Nelson
@plnelson
@uriNV Concord can filter interfaces based on the engines in the list passed to LaunchDebugTargets. PTVS has one instance of this filter in RemoteComponent.vsdconfigxml, but it's commented out. I don't have PTVS installed to verify, but the way this is written it appears that the mixed mode Python debugger is always enabled. I sent a mail to the author asking about it, but he hasn't replied yet.
Uri
@uriNV
@plnelson Cheers, that makes sense now =)