public MainViewContent(string fileName, SharpSnippetCompilerControl snippetControl, IWorkbenchWindow workbenchWindow)
 {
     file = new SnippetFile(fileName);
     this.snippetControl  = snippetControl;
     this.textEditor      = snippetControl.TextEditor;
     this.workbenchWindow = workbenchWindow;
 }
		public MainViewContent(string fileName, SharpSnippetCompilerControl snippetControl, IWorkbenchWindow workbenchWindow)
		{
			file = new SnippetFile(fileName);
			this.snippetControl = snippetControl;
			this.textEditor = snippetControl.TextEditor;
			this.workbenchWindow = workbenchWindow;
		}
 public SnippetTabPage(SharpSnippetCompilerControl snippetControl)
 {
     this.snippetControl = snippetControl;
     Controls.Add(snippetControl);
 }
        public IViewContent LoadFile(string fileName)
        {
            // Create a new tab page.
            SharpSnippetCompilerControl snippetControl = new SharpSnippetCompilerControl();
            snippetControl.Dock = DockStyle.Fill;
            SnippetTabPage tabPage = new SnippetTabPage(snippetControl);
            tabPage.Text = Path.GetFileName(fileName);

            fileTabControl.TabPages.Add(tabPage);

            // Load file
            snippetControl.LoadFile(fileName);
            snippetControl.Focus();

            WorkbenchWindow window = new WorkbenchWindow(fileTabControl, tabPage);
            MainViewContent view = new MainViewContent(fileName, snippetControl, window);
            WorkbenchSingleton.Workbench.ShowView(view);

            UpdateActiveView(view);

            return view;
        }