C# Class VsTeXProject.VisualStudio.Project.NestedProjectNode

Inheritance: HierarchyNode, IPropertyNotifySink
Afficher le fichier Open project: mimura1133/vstex Class Usage Examples

Private Properties

Свойство Type Description
CloseNestedProjectNode void
ConnectPropertyNotifySink void
DelegateGetPropertyToNested object
DelegateSetPropertyToNested int
DisconnectPropertyNotifySink void
GetConnectionPointFromPropertySink IConnectionPoint
GetIconHandle object
IgnoreNestedProjectFile void
InitImageHandler void
InitializeInstanceGuid void
LockRDTEntry void
ObserveNestedProjectFile void
SetDocCookieOnNestedHier void
StopObservingNestedProjectFile void
UnlockRDTEntry void

Méthodes publiques

Méthode Description
Close ( ) : int

Return S_OK. Implementation of Closing a nested project is done in CloseNestedProject which is called by CloseChildren.

GetAutomationObject ( ) : object

Get the automation object for the NestedProjectNode

GetEditLabel ( ) : string

Called by the shell to get the node caption when the user tries to rename from the GUI

GetGuidProperty ( int propid, System.Guid &guid ) : int

Gets properties whose values are GUIDs.

GetMkDocument ( ) : string

Returns the moniker of the nested project.

GetProperty ( int propId ) : object

Gets properties of a given node or of the hierarchy.

Init ( string fileName, string destination, string projectName, __VSCREATEPROJFLAGS createFlags ) : void

Initialize the nested hierarhy node.

This methos should be called just after a NestedProjectNode object is created.

IsItemDirty ( uint itemId, IntPtr punkDocData, int &pfDirty ) : int

Determines whether the hierarchy item changed.

NestedProjectNode ( ProjectNode root, ProjectElement element ) : System
OnChanged ( int dispid ) : void

Notifies a sink that the [bindable] property specified by dispID has changed. If dispID is DISPID_UNKNOWN, then multiple properties have changed together. The client (owner of the sink) should then retrieve the current value of each property of interest from the object that generated the notification. In our case we will care about the VSLangProj80.VsProjPropId.VBPROJPROPID_FileName and update the changes in the parent project file.

OnRequestEdit ( int dispid ) : void

Notifies a sink that a [requestedit] property is about to change and that the object is asking the sink how to proceed.

SaveItem ( VSSAVEFLAGS dwSave, string silentSaveAsName, uint itemid, IntPtr punkDocData, int &pfCancelled ) : int

Saves the hierarchy item to disk.

SetEditLabel ( string label ) : int

Called by the shell when a node has been renamed from the GUI

Méthodes protégées

Méthode Description
AddVirtualProject ( ) : void

Links a nested project as a virtual project to the solution.

CanDeleteItem ( __VSDELETEITEMOPERATION deleteOperation ) : bool

This is temporary until we have support for re-adding a nested item

CreateProjectDirectory ( ) : void

Creates the project directory if it does not exist.

Dispose ( bool disposing ) : void

The method that does the cleanup.

GetAddFileFlags ( string files ) : VSADDFILEFLAGS[]

Sets the VSADDFILEFLAGS that will be used to call the IVsTrackProjectDocumentsEvents2 OnAddFiles

GetQueryAddFileFlags ( string files ) : VSQUERYADDFILEFLAGS[]

Sets the VSQUERYADDFILEFLAGS that will be used to call the IVsTrackProjectDocumentsEvents2 OnQueryAddFiles

GetQueryRemoveFileFlags ( string files ) : VSQUERYREMOVEFILEFLAGS[]

Sets the VSQUERYREMOVEFILEFLAGS that will be used to call the IVsTrackProjectDocumentsEvents2 OnQueryRemoveFiles

GetRemoveFileFlags ( string files ) : VSREMOVEFILEFLAGS[]

Sets the VSREMOVEFILEFLAGS that will be used to call the IVsTrackProjectDocumentsEvents2 OnRemoveFiles

IgnoreItemFileChanges ( bool ignoreFlag ) : void

Flag indicating that changes to a file can be ignored when item is saved or reloaded.

NestedProjectNode ( ) : System
ReloadItem ( uint reserved ) : void

Delegates the call to the inner hierarchy.

RenameNestedProjectInParentProject ( string label ) : void

Renames the project file in the parent project structure.

SaveNestedProjectItemInProjectFile ( string newFileName ) : void

Saves the nested project information in the project file.

Private Methods

Méthode Description
CloseNestedProjectNode ( ) : void

Closes a nested project and releases the nested hierrachy pointer.

ConnectPropertyNotifySink ( ) : void

We need to advise property notify sink on project properties so that we know when the project file is renamed through a property.

DelegateGetPropertyToNested ( int propID ) : object

Delegates Getproperty calls to the inner nested.

DelegateSetPropertyToNested ( int propID, object value ) : int

Delegates Setproperty calls to the inner nested.

DisconnectPropertyNotifySink ( ) : void

Disconnects the propertynotify sink

GetConnectionPointFromPropertySink ( ) : IConnectionPoint

Gets a ConnectionPoint for the IPropertyNotifySink interface.

GetIconHandle ( bool open ) : object
IgnoreNestedProjectFile ( bool ignoreFlag ) : void

Ignores observing changes on this file depending on the boolean flag.

InitImageHandler ( ) : void
InitializeInstanceGuid ( ) : void
LockRDTEntry ( ) : void
ObserveNestedProjectFile ( ) : void

Starts observing changes on this file.

SetDocCookieOnNestedHier ( uint itemDocCookie ) : void
StopObservingNestedProjectFile ( ) : void

Stops observing changes on this file.

UnlockRDTEntry ( ) : void

Method Details

AddVirtualProject() protected méthode

Links a nested project as a virtual project to the solution.
protected AddVirtualProject ( ) : void
Résultat void

CanDeleteItem() protected méthode

This is temporary until we have support for re-adding a nested item
protected CanDeleteItem ( __VSDELETEITEMOPERATION deleteOperation ) : bool
deleteOperation __VSDELETEITEMOPERATION
Résultat bool

Close() public méthode

Return S_OK. Implementation of Closing a nested project is done in CloseNestedProject which is called by CloseChildren.
public Close ( ) : int
Résultat int

CreateProjectDirectory() protected méthode

Creates the project directory if it does not exist.
protected CreateProjectDirectory ( ) : void
Résultat void

Dispose() protected méthode

The method that does the cleanup.
protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

GetAddFileFlags() protected méthode

Sets the VSADDFILEFLAGS that will be used to call the IVsTrackProjectDocumentsEvents2 OnAddFiles
protected GetAddFileFlags ( string files ) : VSADDFILEFLAGS[]
files string The files to which an array of VSADDFILEFLAGS has to be specified.
Résultat VSADDFILEFLAGS[]

GetAutomationObject() public méthode

Get the automation object for the NestedProjectNode
public GetAutomationObject ( ) : object
Résultat object

GetEditLabel() public méthode

Called by the shell to get the node caption when the user tries to rename from the GUI
public GetEditLabel ( ) : string
Résultat string

GetGuidProperty() public méthode

Gets properties whose values are GUIDs.
public GetGuidProperty ( int propid, System.Guid &guid ) : int
propid int Identifier of the hierarchy property
guid System.Guid Pointer to a GUID property specified in propid
Résultat int

GetMkDocument() public méthode

Returns the moniker of the nested project.
public GetMkDocument ( ) : string
Résultat string

GetProperty() public méthode

Gets properties of a given node or of the hierarchy.
public GetProperty ( int propId ) : object
propId int Identifier of the hierarchy property
Résultat object

GetQueryAddFileFlags() protected méthode

Sets the VSQUERYADDFILEFLAGS that will be used to call the IVsTrackProjectDocumentsEvents2 OnQueryAddFiles
protected GetQueryAddFileFlags ( string files ) : VSQUERYADDFILEFLAGS[]
files string The files to which an array of VSADDFILEFLAGS has to be specified.
Résultat VSQUERYADDFILEFLAGS[]

GetQueryRemoveFileFlags() protected méthode

Sets the VSQUERYREMOVEFILEFLAGS that will be used to call the IVsTrackProjectDocumentsEvents2 OnQueryRemoveFiles
protected GetQueryRemoveFileFlags ( string files ) : VSQUERYREMOVEFILEFLAGS[]
files string The files to which an array of VSQUERYREMOVEFILEFLAGS has to be specified.
Résultat VSQUERYREMOVEFILEFLAGS[]

GetRemoveFileFlags() protected méthode

Sets the VSREMOVEFILEFLAGS that will be used to call the IVsTrackProjectDocumentsEvents2 OnRemoveFiles
protected GetRemoveFileFlags ( string files ) : VSREMOVEFILEFLAGS[]
files string The files to which an array of VSREMOVEFILEFLAGS has to be specified.
Résultat VSREMOVEFILEFLAGS[]

IgnoreItemFileChanges() protected méthode

Flag indicating that changes to a file can be ignored when item is saved or reloaded.
protected IgnoreItemFileChanges ( bool ignoreFlag ) : void
ignoreFlag bool Flag indicating whether or not to ignore changes (1 to ignore, 0 to stop ignoring).
Résultat void

Init() public méthode

Initialize the nested hierarhy node.
This methos should be called just after a NestedProjectNode object is created.
public Init ( string fileName, string destination, string projectName, __VSCREATEPROJFLAGS createFlags ) : void
fileName string The file name of the nested project.
destination string The location of the nested project.
projectName string The name of the project.
createFlags __VSCREATEPROJFLAGS The nested project creation flags
Résultat void

IsItemDirty() public méthode

Determines whether the hierarchy item changed.
public IsItemDirty ( uint itemId, IntPtr punkDocData, int &pfDirty ) : int
itemId uint Item identifier of the hierarchy item contained in VSITEMID
punkDocData System.IntPtr Pointer to the IUnknown interface of the hierarchy item.
pfDirty int TRUE if the hierarchy item changed.
Résultat int

NestedProjectNode() protected méthode

protected NestedProjectNode ( ) : System
Résultat System

NestedProjectNode() public méthode

public NestedProjectNode ( ProjectNode root, ProjectElement element ) : System
root ProjectNode
element ProjectElement
Résultat System

OnChanged() public méthode

Notifies a sink that the [bindable] property specified by dispID has changed. If dispID is DISPID_UNKNOWN, then multiple properties have changed together. The client (owner of the sink) should then retrieve the current value of each property of interest from the object that generated the notification. In our case we will care about the VSLangProj80.VsProjPropId.VBPROJPROPID_FileName and update the changes in the parent project file.
public OnChanged ( int dispid ) : void
dispid int /// Dispatch identifier of the property that is about to change or DISPID_UNKNOWN if multiple /// properties are about to change. ///
Résultat void

OnRequestEdit() public méthode

Notifies a sink that a [requestedit] property is about to change and that the object is asking the sink how to proceed.
public OnRequestEdit ( int dispid ) : void
dispid int /// Dispatch identifier of the property that is about to change or DISPID_UNKNOWN if multiple /// properties are about to change. ///
Résultat void

ReloadItem() protected méthode

Delegates the call to the inner hierarchy.
protected ReloadItem ( uint reserved ) : void
reserved uint Reserved parameter defined at the IVsPersistHierarchyItem2::ReloadItem parameter.
Résultat void

RenameNestedProjectInParentProject() protected méthode

Renames the project file in the parent project structure.
protected RenameNestedProjectInParentProject ( string label ) : void
label string The new label.
Résultat void

SaveItem() public méthode

Saves the hierarchy item to disk.
public SaveItem ( VSSAVEFLAGS dwSave, string silentSaveAsName, uint itemid, IntPtr punkDocData, int &pfCancelled ) : int
dwSave VSSAVEFLAGS Flags whose values are taken from the VSSAVEFLAGS enumeration.
silentSaveAsName string File name to be applied when dwSave is set to VSSAVE_SilentSave.
itemid uint Item identifier of the hierarchy item saved from VSITEMID.
punkDocData System.IntPtr Pointer to the IUnknown interface of the hierarchy item saved.
pfCancelled int TRUE if the save action was canceled.
Résultat int

SaveNestedProjectItemInProjectFile() protected méthode

Saves the nested project information in the project file.
protected SaveNestedProjectItemInProjectFile ( string newFileName ) : void
newFileName string
Résultat void

SetEditLabel() public méthode

Called by the shell when a node has been renamed from the GUI
public SetEditLabel ( string label ) : int
label string The name of the new label.
Résultat int