C# 클래스 VsTeXProject.VisualStudio.Project.FileNode

상속: HierarchyNode
파일 보기 프로젝트 열기: mimura1133/vstex 1 사용 예제들

Private Properties

프로퍼티 타입 설명
FileNode System
GetChildNodes List
GetSccSpecialFiles void
OnCustomToolChanged void
RenameCaseOnlyChange void
RenameDocument bool
RenameFileNode FileNode
RunGenerator void
SetNewParentOnChildNodes void

공개 메소드들

메소드 설명
FileNode ( ProjectNode root, ProjectElement element ) : System

Constructor for the FileNode

GetAutomationObject ( ) : object

Get an instance of the automation object for a FileNode

GetIconHandle ( bool open ) : object
GetMkDocument ( ) : string
SetEditLabel ( string label ) : int

Renames a file node.

보호된 메소드들

메소드 설명
AfterSaveItemAs ( IntPtr docData, string newFilePath ) : int

Performs a SaveAs operation of an open document. Called from SaveItem after the running document table has been updated with the new doc data.

CanDeleteItem ( __VSDELETEITEMOPERATION deleteOperation ) : bool
CanShowDefaultIcon ( ) : bool

Determines if this is node a valid node for painting the default file icon.

CreatePropertiesObject ( ) : NodeProperties
CreateSingleFileGenerator ( ) : ISingleFileGenerator

factory method for creating single file generators.

DeleteFromStorage ( string path ) : void

Delete the item corresponding to the specified path from storage.

DoDefaultAction ( ) : void
ExecCommandOnNode ( System.Guid cmdGroup, uint cmd, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut ) : int
GetDocumentManager ( ) : DocumentManager

Returns a specific Document manager to handle files

GetDragTargetHandlerNode ( ) : HierarchyNode

Called by the drag&drop implementation to ask the node which is being dragged/droped over which nodes should process the operation. This allows for dragging to a node that cannot contain items to let its parent accept the drop, while a reference node delegate to the project and a folder/project node to itself.

IsFileOnDisk ( bool showMessage ) : bool

Determine if this item is represented physical on disk and shows a messagebox in case that the file is not present and a UI is to be presented.

IsFileOnDisk ( string path ) : bool

Determine if the file represented by "path" exist in storage. Override this method if your files are not persisted on disk.

QueryStatusOnNode ( System.Guid cmdGroup, uint cmd, IntPtr pCmdText, QueryStatusResult &result ) : int
RecoverFromRenameFailure ( string fileThatFailed, string originalFileName ) : void

Tries recovering from a rename failure.

RenameChildNodes ( FileNode parentNode ) : void

Rename all childnodes

RenameFileNode ( string oldFileName, string newFileName, uint newParentId ) : FileNode

Renames the file in the hierarchy by removing old node and adding a new node in the hierarchy.

While a new node will be used to represent the item, the underlying MSBuild item will be the same and as a result file properties saved in the project file will not be lost.

RenameInStorage ( string oldName, string newName ) : void

This should be overriden for node that are not saved on disk

SetEditLabel ( string label, string relativePath ) : int

Rename the underlying document based on the change the user just made to the edit label.

비공개 메소드들

메소드 설명
FileNode ( ) : System
GetChildNodes ( ) : List
GetSccSpecialFiles ( string sccFile, IList files, IList flags ) : void
OnCustomToolChanged ( object sender, HierarchyNodeEventArgs e ) : void

Event handler for the Custom tool property changes

RenameCaseOnlyChange ( string newFileName ) : void

Renames the file node for a case only change.

RenameDocument ( string oldName, string newName ) : bool

Get's called to rename the eventually running document this hierarchyitem points to

RenameFileNode ( string oldFileName, string newFileName ) : FileNode
RunGenerator ( ) : void

Runs a generator.

SetNewParentOnChildNodes ( FileNode newFileNode ) : void

Update the ChildNodes after the parent node has been renamed

메소드 상세

AfterSaveItemAs() 보호된 메소드

Performs a SaveAs operation of an open document. Called from SaveItem after the running document table has been updated with the new doc data.
protected AfterSaveItemAs ( IntPtr docData, string newFilePath ) : int
docData System.IntPtr A pointer to the document in the rdt
newFilePath string The new file path to the document
리턴 int

CanDeleteItem() 보호된 메소드

protected CanDeleteItem ( __VSDELETEITEMOPERATION deleteOperation ) : bool
deleteOperation __VSDELETEITEMOPERATION
리턴 bool

CanShowDefaultIcon() 보호된 메소드

Determines if this is node a valid node for painting the default file icon.
protected CanShowDefaultIcon ( ) : bool
리턴 bool

CreatePropertiesObject() 보호된 메소드

protected CreatePropertiesObject ( ) : NodeProperties
리턴 NodeProperties

CreateSingleFileGenerator() 보호된 메소드

factory method for creating single file generators.
protected CreateSingleFileGenerator ( ) : ISingleFileGenerator
리턴 ISingleFileGenerator

DeleteFromStorage() 보호된 메소드

Delete the item corresponding to the specified path from storage.
protected DeleteFromStorage ( string path ) : void
path string
리턴 void

DoDefaultAction() 보호된 메소드

protected DoDefaultAction ( ) : void
리턴 void

ExecCommandOnNode() 보호된 메소드

protected ExecCommandOnNode ( System.Guid cmdGroup, uint cmd, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut ) : int
cmdGroup System.Guid
cmd uint
nCmdexecopt uint
pvaIn System.IntPtr
pvaOut System.IntPtr
리턴 int

FileNode() 공개 메소드

Constructor for the FileNode
public FileNode ( ProjectNode root, ProjectElement element ) : System
root ProjectNode Root of the hierarchy
element ProjectElement
리턴 System

GetAutomationObject() 공개 메소드

Get an instance of the automation object for a FileNode
public GetAutomationObject ( ) : object
리턴 object

GetDocumentManager() 보호된 메소드

Returns a specific Document manager to handle files
protected GetDocumentManager ( ) : DocumentManager
리턴 DocumentManager

GetDragTargetHandlerNode() 보호된 메소드

Called by the drag&drop implementation to ask the node which is being dragged/droped over which nodes should process the operation. This allows for dragging to a node that cannot contain items to let its parent accept the drop, while a reference node delegate to the project and a folder/project node to itself.
protected GetDragTargetHandlerNode ( ) : HierarchyNode
리턴 HierarchyNode

GetIconHandle() 공개 메소드

public GetIconHandle ( bool open ) : object
open bool
리턴 object

GetMkDocument() 공개 메소드

public GetMkDocument ( ) : string
리턴 string

IsFileOnDisk() 보호된 메소드

Determine if this item is represented physical on disk and shows a messagebox in case that the file is not present and a UI is to be presented.
protected IsFileOnDisk ( bool showMessage ) : bool
showMessage bool true if user should be presented for UI in case the file is not present
리턴 bool

IsFileOnDisk() 보호된 메소드

Determine if the file represented by "path" exist in storage. Override this method if your files are not persisted on disk.
protected IsFileOnDisk ( string path ) : bool
path string Url representing the file
리턴 bool

QueryStatusOnNode() 보호된 메소드

protected QueryStatusOnNode ( System.Guid cmdGroup, uint cmd, IntPtr pCmdText, QueryStatusResult &result ) : int
cmdGroup System.Guid
cmd uint
pCmdText System.IntPtr
result QueryStatusResult
리턴 int

RecoverFromRenameFailure() 보호된 메소드

Tries recovering from a rename failure.
protected RecoverFromRenameFailure ( string fileThatFailed, string originalFileName ) : void
fileThatFailed string The file that failed to be renamed.
originalFileName string The original filenamee
리턴 void

RenameChildNodes() 보호된 메소드

Rename all childnodes
protected RenameChildNodes ( FileNode parentNode ) : void
parentNode FileNode
리턴 void

RenameFileNode() 보호된 메소드

Renames the file in the hierarchy by removing old node and adding a new node in the hierarchy.
While a new node will be used to represent the item, the underlying MSBuild item will be the same and as a result file properties saved in the project file will not be lost.
protected RenameFileNode ( string oldFileName, string newFileName, uint newParentId ) : FileNode
oldFileName string The old file name.
newFileName string The new file name
newParentId uint The new parent id of the item.
리턴 FileNode

RenameInStorage() 보호된 메소드

This should be overriden for node that are not saved on disk
protected RenameInStorage ( string oldName, string newName ) : void
oldName string Previous name in storage
newName string New name in storage
리턴 void

SetEditLabel() 공개 메소드

Renames a file node.
public SetEditLabel ( string label ) : int
label string The new name.
리턴 int

SetEditLabel() 보호된 메소드

Rename the underlying document based on the change the user just made to the edit label.
protected SetEditLabel ( string label, string relativePath ) : int
label string
relativePath string
리턴 int