C# Class XSharp.Project.VOEditorFactoryBase

Factory for creating our editor object. Extends from the IVsEditoryFactory interface
Inheritance: IVsEditorFactory, IDisposable
Afficher le fichier Open project: X-Sharp/XSharpPublic

Protected Properties

Свойство Type Description
editorPackage XSharpProjectPackage

Méthodes publiques

Méthode Description
Close ( ) : int
CreateEditorInstance ( uint grfCreateDoc, string pszMkDocument, string pszPhysicalView, IVsHierarchy pvHier, uint itemid, System punkDocDataExisting, System &ppunkDocView, System &ppunkDocData, string &pbstrEditorCaption, System.Guid &pguidCmdUI, int &pgrfCDW ) : int

Used by the editor factory to create an editor instance. the environment first determines the editor factory with the highest priority for opening the file and then calls IVsEditorFactory.CreateEditorInstance. If the environment is unable to instantiate the document data in that editor, it will find the editor with the next highest priority and attempt to so that same thing. NOTE: The priority of our editor is 32 as mentioned in the attributes on the package class. Since our editor supports opening only a single view for an instance of the document data, if we are requested to open document data that is already instantiated in another editor, or even our editor, we return a value VS_E_INCOMPATIBLEDOCDATA.

Dispose ( ) : void

Since we create a ServiceProvider which implements IDisposable we also need to implement IDisposable to make sure that the ServiceProvider's Dispose method gets called.

GetService ( Type serviceType ) : object
MapLogicalView ( System.Guid &rguidLogicalView, string &pbstrPhysicalView ) : int
SetSite ( Microsoft psp ) : int

Used for initialization of the editor in the environment

Méthodes protégées

Méthode Description
CalledFromVulcanDLL ( ) : bool
GetProjectNode ( string fileName ) : object
GetVulcanFactory ( string className, string fileName ) : object

Private Methods

Méthode Description
VOEditorFactoryBase ( ) : System

Method Details

CalledFromVulcanDLL() protected méthode

protected CalledFromVulcanDLL ( ) : bool
Résultat bool

Close() public méthode

public Close ( ) : int
Résultat int

CreateEditorInstance() abstract public méthode

Used by the editor factory to create an editor instance. the environment first determines the editor factory with the highest priority for opening the file and then calls IVsEditorFactory.CreateEditorInstance. If the environment is unable to instantiate the document data in that editor, it will find the editor with the next highest priority and attempt to so that same thing. NOTE: The priority of our editor is 32 as mentioned in the attributes on the package class. Since our editor supports opening only a single view for an instance of the document data, if we are requested to open document data that is already instantiated in another editor, or even our editor, we return a value VS_E_INCOMPATIBLEDOCDATA.
abstract public CreateEditorInstance ( uint grfCreateDoc, string pszMkDocument, string pszPhysicalView, IVsHierarchy pvHier, uint itemid, System punkDocDataExisting, System &ppunkDocView, System &ppunkDocData, string &pbstrEditorCaption, System.Guid &pguidCmdUI, int &pgrfCDW ) : int
grfCreateDoc uint Flags determining when to create the editor. Only open and silent flags /// are valid ///
pszMkDocument string path to the file to be opened
pszPhysicalView string name of the physical view
pvHier IVsHierarchy pointer to the IVsHierarchy interface
itemid uint Item identifier of this editor instance
punkDocDataExisting System This parameter is used to determine if a document buffer /// (DocData object) has already been created ///
ppunkDocView System Pointer to the IUnknown interface for the DocView object
ppunkDocData System Pointer to the IUnknown interface for the DocData object
pbstrEditorCaption string Caption mentioned by the editor for the doc window
pguidCmdUI System.Guid the Command UI Guid. Any UI element that is visible in the editor has /// to use this GUID. This is specified in the .vsct file ///
pgrfCDW int Flags for CreateDocumentWindow
Résultat int

Dispose() public méthode

Since we create a ServiceProvider which implements IDisposable we also need to implement IDisposable to make sure that the ServiceProvider's Dispose method gets called.
public Dispose ( ) : void
Résultat void

GetProjectNode() protected méthode

protected GetProjectNode ( string fileName ) : object
fileName string
Résultat object

GetService() public méthode

public GetService ( Type serviceType ) : object
serviceType System.Type
Résultat object

GetVulcanFactory() protected méthode

protected GetVulcanFactory ( string className, string fileName ) : object
className string
fileName string
Résultat object

MapLogicalView() public méthode

public MapLogicalView ( System.Guid &rguidLogicalView, string &pbstrPhysicalView ) : int
rguidLogicalView System.Guid
pbstrPhysicalView string
Résultat int

SetSite() public méthode

Used for initialization of the editor in the environment
public SetSite ( Microsoft psp ) : int
psp Microsoft pointer to the service provider. Can be used to obtain instances of other interfaces ///
Résultat int

Property Details

editorPackage protected_oe property

protected XSharpProjectPackage,XSharp.Project editorPackage
Résultat XSharpProjectPackage