/// <summary>
        /// Called by the shell to ask the editor to create a new document object.
        /// </summary>
        /// <param name="fileName"></param>
        /// <param name="hierarchy"></param>
        /// <param name="itemId"></param>
		public override DslShell::ModelingDocData CreateDocData(string fileName, VSShellInterop::IVsHierarchy hierarchy, uint itemId)
		{
			// Create the document type supported by this editor.
			
			// Create model data
			global::Tum.PDE.VSPluginDSL.VSPluginDSLDocumentData modelData = new global::Tum.PDE.VSPluginDSL.VSPluginDSLDocumentData();
			
			// Create shell model data
			VSPluginDSLDocData shellModelData = new VSPluginDSLDocData(modelData, this.ServiceProvider, typeof(VSPluginDSLEditorFactory).GUID);
			this.ModelData = shellModelData;
			
			// Set file name properties
			System.IO.FileInfo info = new System.IO.FileInfo(fileName);
			shellModelData.FullFileName = fileName;
			shellModelData.FileName = info.Name;
			
			return shellModelData;
		}
		/// <summary>
		/// Called by the shell to ask the editor to create a new document object.
		/// </summary>
		public override DslShell::ModelingDocData CreateDocData(string fileName, VSShellInterop::IVsHierarchy hierarchy, uint itemId)
		{
			// Create the document type supported by this editor.
			return new nHydrate2DocData(this.ServiceProvider, typeof(nHydrate2EditorFactory).GUID);
		}
示例#3
0
		/// <summary>
		/// OnBeforeDocumentWindowShow
		/// </summary>
		/// <param name="docCookie"></param>
		/// <param name="fFirstShow"></param>
		/// <param name="pFrame"></param>
		/// <returns></returns>
		public int OnBeforeDocumentWindowShow(uint docCookie, int fFirstShow, VSShellInterop::IVsWindowFrame pFrame)
		{
			// Do Nothing
			return global::Microsoft.VisualStudio.VSConstants.S_OK;
		}
示例#4
0
		/// <summary>
		/// OnAfterDocumentWindowHide
		/// </summary>
		/// <param name="docCookie"></param>
		/// <param name="pFrame"></param>
		/// <returns></returns>
		public int OnAfterDocumentWindowHide(uint docCookie, VSShellInterop::IVsWindowFrame pFrame)
		{
			// Do Nothing
			return global::Microsoft.VisualStudio.VSConstants.S_OK;
		}