Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / January 2006

Tip: Looking for answers? Try searching our database.

Detect Code Language- Code Window

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mythran - 24 Jan 2006 16:15 GMT
Before anyone replies, I don't need someone to go off and dig deep to find
the answer.  I'm doing that myself.  Just want to know if someone knows off
of the top of their head how to detect the current language of the file in
the current or specified code window (TextDocument) either based on a
property somewhere or maybe just by extension (which can be more difficult
if the file type is HTML or ASP/ASPX + scripting.

Mythran
Dustin Campbell - 24 Jan 2006 16:22 GMT
> Before anyone replies, I don't need someone to go off and dig deep to
> find the answer.  I'm doing that myself.  Just want to know if someone
[quoted text clipped - 3 lines]
> can be more difficult if the file type is HTML or ASP/ASPX +
> scripting.

TextDocument.Language returns a string that indicates the language service.

-----
Best Regards,
Dustin Campbell
Developer Express Inc
Mythran - 24 Jan 2006 16:24 GMT
>> Before anyone replies, I don't need someone to go off and dig deep to
>> find the answer.  I'm doing that myself.  Just want to know if someone
[quoted text clipped - 11 lines]
> Dustin Campbell
> Developer Express Inc

Sheesh, can you at least wait until my newsreader receives the original
message before you reply?  I saw your post before I saw mine lol :P  Just
kidding btw, thanks for the tip :)

Mythran
Carlos J. Quintero [VB MVP] - 25 Jan 2006 10:34 GMT
Hi Mythran,

See my article:

HOWTO: Get the language of a project or file from a Visual Studio .NET macro
or add-in
http://www.mztools.com/articles/2006/MZ003.htm

Signature

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com

> Before anyone replies, I don't need someone to go off and dig deep to find
> the answer.  I'm doing that myself.  Just want to know if someone knows
[quoted text clipped - 4 lines]
>
> Mythran

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.