c# - VS SDK ContentType does not work -


I am trying to include custom language support for Visual Studio.

To start with, I need to support GoToDefinition and I am struggling to get the context menu to include this order.

I have defined a ContentTypeDefinition and has included FileExtensionToContentTypeDefinition like this:

  Internal sealed square gaugefile Content type {[Export] [name ("gauge")] [basidifier ("code")] internal fixed content type Definition gauge content type definition = zero; [Export] [File Extension (". Spec")] [Content Type ("Gauge")] Internal Fixed File ExtensionTontent Disposition GaugeFile ExtensionsDefinition = Faucet; }  

Now, despite this, on debugging, I think that DTE.ActiveDocument.Type is text , my [BaseDefinition ('code')] attribute

I'm using Visual Studio 2013 end.

I was using an experimental example for debugging, and it did not clear and restored the extension, and in this way Visual Studio, ContentType forms of 'plain text' Since continued to cure in that is what I basically did.

When I install a VSX and open it in a new instance of Visual Studio, it brings the right context menu.

However, this brought more than what I wanted (i.e. the Run Unit Test from Rushper). So I had to dig some more out.

To ensure that Visual Studio can handle a command, it checks this method by calling the method.

All I was determined to do was to command flag as (UIT) OLECMDF.OLECMDF_ENABLED | (Uint) OLECMDF.OLECMDF_SUPPORTED and return VSConstants.S_OK when cmdId is VSConstants.VSStd97CmdID.GotoDefn .

The last method looks like this:

  public integer QueryStatus (Reference Guid pguidCmdGroup, uint cCmds, OLECMD [prgCmds, IntPtr pCmdText] {if ((VSConstants.VSStd97CmdID ) PrgCmds [0]. CMDID == VSConstants.VSStd97CmdID.GotoDefn) {prgCmds [0]. CMDF = (UIT) OLECMDF.OLECMDF_ENABLED | (UINT) OLECMDF.OLECMDF_SUPPORTED; Return VSConstants.S_OK; } Back Next Zonstat (pguidCmdGroup, cCmds, prgCmds, pCmdText); }  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -