Re: FileCodeModel
From: Carlos J. Quintero [MVP] (carlosq_at_NOSPAMsogecable.com)
Date: 06/25/04
- Next message: Alexander Zeitler: "backup toolbox"
- Previous message: Gary Chang: "RE: Build events for setup project?"
- In reply to: Richard Ward: "FileCodeModel"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 25 Jun 2004 12:15:33 +0200
If the file does not belong to a project, that is, it's a Solution File or
Miscellaneous File, then you can't use the code model, because which engine
(C#, VB.NET, etc.) should do the job? So, the file is considered a text
file: notice that you can not outline it and you don´t have comboboxes for
code elements in the VB.NET code window, for example.
I suppose that the only workaround is to parse the source code yourself.
There must be parsers out there. Here you have a good start for VB.NET, the
VBParser of GotDotNet, with source code included:
http://www.gotdotnet.com/Community/Workspaces/workspace.aspx?id=d8da92aa-354c-4bb0-8e9b-e4763b49a0e3
-- Carlos J. Quintero (Visual Developer - .NET MVP) FAQs, Knowledge Base, Files, Docs, Articles, Utilities, etc. for .NET addins: http://groups.yahoo.com/group/vsnetaddin/ (free join) "Richard Ward" <newsgroup@happysphinx.co.uk> escribió en el mensaje news:ba59b77e.0406250111.2497fed0@posting.google.com... > Hi > > I'm writing an Add-in that interacts with the VS.NET editor. The > Add-in parses the editors ActiveDocument to extract various > CodeElements from the > ActiveDocument.ProjectItem.FileCodeModel.CodeElements collection. > However, I've noticed that if the source file I want to parse isn't > part of the project then the FileCodeModel is unassigned. It kind of > makes sense looking at the property hierarchy but I need to be able to > parse non project source files. > > So the question is does anybody know a way round this? > > TIA > > Richard
- Next message: Alexander Zeitler: "backup toolbox"
- Previous message: Gary Chang: "RE: Build events for setup project?"
- In reply to: Richard Ward: "FileCodeModel"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|