Example #1
0
 public override CommentInfo GetCommentFormat()
 {
     // Provide information on how comments are specified in CMake code.
     CommentInfo info = new CommentInfo();
     info.LineStart = "#";
     info.UseLineComments = true;
     return info;
 }
Example #2
0
 public override CommentInfo GetCommentFormat()
 {
     CommentInfo ci = new CommentInfo();
     ci.UseLineComments = true;
     ci.LineStart = "#";
     ci.BlockStart = "/*";
     ci.BlockEnd = "*/";
     return ci;
 }
 public override CommentInfo GetCommentFormat()
 {
     CommentInfo info = new CommentInfo();
     info.LineStart = ";";
     info.BlockStart = "";
     info.BlockEnd = "";
     info.UseLineComments = true;
     return info;
 }
Example #4
0
    public Source(LanguageService service, IVsTextLines textLines, Colorizer colorizer){
      this.service = service;
      this.textLines = textLines;
      this.colorizer = colorizer;
      this.taskProvider = new TaskProvider(service.site); // task list
      this.completionSet = this.GetCompletionSet();      
      this.methodData = this.GetMethodData();
      this.colorState = (IVsTextColorState)textLines;

      Guid statusBarGuid = typeof(VsShellInterop.IVsStatusbar).GUID;
      this.statusBar = (VsShellInterop.IVsStatusbar)service.site.QueryService(statusBarGuid, typeof(VsShellInterop.IVsStatusbar));
      
      this.commentInfo = new CommentInfo();
      service.GetCommentFormat(this.commentInfo);

      // track source changes
      if (service.Preferences.EnableCodeSenseFastOnLineChange){
        textChangeCommitEventsCookie = VsShell.Connect(textLines, (IVsFinalTextChangeCommitEvents)this, ref VsConstants.IID_IVsFinalTextChangeCommitEvents);
      }
      this.textLinesEventsCookie = VsShell.Connect(textLines, (IVsTextLinesEvents)this, ref VsConstants.IID_IVsTextLinesEvents);
      this.SetDirty();

#if WHIDBEY
      // create a task manager
      if (taskManager == null) {
        ITaskManagerFactory taskManagerFactory = (ITaskManagerFactory)(service.site).GetService(typeof(ITaskManagerFactory));
        if (taskManagerFactory != null) {
          taskManager = taskManagerFactory.QuerySharedTaskManager("SpecSharp", true);
        }
      }
#endif
    }
Example #5
0
 public virtual void GetCommentFormat(CommentInfo info){      
   info.supported = true;
   info.lineStart = "//";
   info.blockStart = "/*";
   info.blockEnd = "*/";
   info.useLineComments = true;
 }
Example #6
0
 /// <include file='doc\LanguageService.uex' path='docs/doc[@for="Source.GetCommentFormat"]/*' />
 /// <summary>Override this method if you want to provide different comment dilimiters.
 /// You can turn off commenting by setting Preferences.EnableCommenting to false.</summary>
 public virtual CommentInfo GetCommentFormat()
 {
     CommentInfo info = new CommentInfo();
     info.LineStart = "//";
     info.BlockStart = "/*";
     info.BlockEnd = "*/";
     info.UseLineComments = true;
     return info;
 }
Example #7
0
 public override void GetCommentFormat(ref CommentInfo info) {
   System.Compiler.CommentInfo scCommentInfo = new System.Compiler.CommentInfo();
   this.scLanguageService.GetCommentFormat(scCommentInfo);
   info.BlockEnd = scCommentInfo.blockEnd;
   info.BlockStart = scCommentInfo.blockStart;
   info.LineStart = scCommentInfo.lineStart;
   info.Supported = scCommentInfo.supported;
   info.UseLineComments = scCommentInfo.useLineComments;
 }