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 / July 2005

Tip: Looking for answers? Try searching our database.

Integrating / Linking Editor with Language Service (Vs.Net 2005 be

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mo - 19 Jul 2005 05:15 GMT
Hi,

I have an Editor package created thru Visual Studio Integration Package
wizard (C#). Also created another project in
the same solution for language service containing different classes for
implementing a language service (c#).

My question is: How to integrate/  link the editor with Language service. I
am proferring the language service
in the MyLanguagePackage. Have added various attributes for language service
as shown below.
the language service is not invoked from editor package so What is missing
here ?

I think it is in the IvsEditorFactory -> CreateEditorInstance( ) ->
two pointers i.e. ppunkDocView and ppunkDocData which should be
assigned a IVsCodeWindow and IvsTextLines instantiated from languageservice
package to link them.
Is that assumption correct?
if not, please let me know how to integrate Editor and Language service.
Will appreciate your help on this.

-----------------------------------
Editor's  Package class
-------------------------------
namespace Vsip.VsPackage4
{
   
/////////////////////////////////////////////////////////////////////////////
   // VsPackage4

   [MSVSIP.DefaultRegistryRoot("Software\\Microsoft\\VisualStudio\\8.0")]
   [MSVSIP.InstalledProductRegistration(false, "#100", "#102", "1.0")]
   [MSVSIP.ProvideLoadKey("Standard", "1.0", "Package Name", "Company", 1)]
   [MSVSIP.ProvideMenuResource(1000, 1)]
   [MSVSIP.ProvideEditorExtension(typeof(EditorFactory), ".abc", 32,
             ProjectGuid = ""{... guid here ...}"",
             TemplateDir = "..\\Templates",
             NameResourceID = 106,
             DefaultName = "Package Name")]
   [MSVSIP.ProvideEditorLogicalView(typeof(EditorFactory), "{... guid here
...}")]
   [Guid("... guid here ...")]
   
   public sealed class VsPackage4 : MSVSIP.Package
{

...
}
------------------------------------------------------
Language Service Package
-----------------------------------------------
[MSVSIP.DefaultRegistryRoot("Software\\Microsoft\\VisualStudio\\8.0")]
   [MSVSIP.InstalledProductRegistration(false, "#100", "#102", "1.1")]
   [MSVSIP.ProvideLoadKey("standard", "8.0", "Test",  "Test", 1)]
   [Guid("{... guid here ...}")]
   [MSVSIP.ProvideLanguageService(typeof(MyLangService), "MyLangService",
222, CodeSense = true, ShowCompletion = true)]
   [ProvideLanguageExtension(typeof(MyLangService), ".abc")]
     
   public sealed class MyLanguagePackage  : Package
{
  MyLangService _MyLangService = null;
   protected override void Initialize()
        {
           _MyLangService = new MyLangService();
           _MyLangService.SetSite(this);
           IServiceContainer serviceContainer = (IServiceContainer)this;
           serviceContainer.AddService(typeof(MyLangService),
_MyLangService, true);

        }

... other method for languageservice package here...
...

}

[Guid("... guid here ...")]
   public class MyLangService : LanguageService
   {
       private LanguagePreferences mLanguagePreferences;
       private MyScanner _MyScanner = null;
     
.... overrides for LanguageService class here...

    }
Mo - 28 Jul 2005 05:07 GMT
Could someone please respond to my question below?

Thanks in Advance
Mo

> Hi,
>
[quoted text clipped - 83 lines]
>
>      }

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.