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 / June 2004

Tip: Looking for answers? Try searching our database.

Problems opening files with automation in the text editor

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Xavier Ramirez - 18 Jun 2004 17:07 GMT
We are trying to open an XML file called "documentation.udcdoc" using the
DTE model. In Visual Studio we have also associated the ".udcdoc" file
extension to a custom tool (.exe).

When we try to open the text editor using the following code, it opens our
custom tools instead of the text editor.

EnvDTE.Window CurrentFile =
DTE.OpenFile(EnvDTE.Constants.vsViewKindTextView,
System.IO.Path.Combine(currentTemplatePath, source) );

Is there any way to force Visual Studio to open the ".udcdoc" extension
files with the text editor?

Thanks in advance

Xavier
Jack Peters - 18 Jun 2004 21:17 GMT
Why don't you attach your extension to the built in XML Language service?

Registry Keys for File Extensions are under
LocalMachine/Software/Microsoft/VisualStudio/7.1/languages/File extensions/

use 7.1 for VS2003 and 7.0 for VS 2002
Look at .xml extension which is linked to the HTML/XML language service

> We are trying to open an XML file called "documentation.udcdoc" using the
> DTE model. In Visual Studio we have also associated the ".udcdoc" file
[quoted text clipped - 13 lines]
>
> Xavier
Xavier Ramirez - 22 Jun 2004 15:46 GMT
Thanks, now it is working without calling our exe application.

Does this mean the guid passed in EnvDTE.Constants.vsViewKindTextView is
ignored or not working?

> Why don't you attach your extension to the built in XML Language service?
>
[quoted text clipped - 21 lines]
> >
> > Xavier
Jack Peters - 22 Jun 2004 18:25 GMT
Hello Xavier,

is it working the way I suggested?

The TextEditor is different from the language service. Any language service
can use the default TextEditor and give it support for syntax coloring ...
What I suggested is to link your file extension to a Language service rather
than to an given editor and let XML language service pick the right editor
and bring its own complements.

Jack

> Thanks, now it is working without calling our exe application.
>
[quoted text clipped - 29 lines]
> > >
> > > Xavier

Rate this thread:







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.