public bool CanAttachTo(IViewContent viewContent)
 {
     if (viewContent is ITextEditorControlProvider)
     {
         ITextEditorControlProvider textAreaControlProvider = (ITextEditorControlProvider)viewContent;
         string fileExtension = String.Empty;
         string fileName      = viewContent.PrimaryFileName;
         if (fileName == null)
         {
             return(false);
         }
         if (Path.GetExtension(fileName).Equals(".boo", StringComparison.OrdinalIgnoreCase))
         {
             ParseInformation info = ParserService.ParseFile(fileName, textAreaControlProvider.TextEditorControl.Document.TextContent, false);
             if (FormsDesignerSecondaryDisplayBinding.IsDesignable(info))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
 /// <summary>
 /// Determines whether the specified parse information contains
 /// a class which is designable.
 /// </summary>
 protected virtual bool IsDesignable(ParseInformation parseInfo)
 {
     return(FormsDesignerSecondaryDisplayBinding.IsDesignable(parseInfo));
 }
Example #3
0
 public void IsDesignable()
 {
     Assert.IsTrue(FormsDesignerSecondaryDisplayBinding.IsDesignable(parseInfo));
 }