Share via


ModelingDocData Class

Definition

Important

This API is not CLS-compliant.

Abstract base class representing a file in memory that is backed by an IMS store.

public ref class ModelingDocData abstract : Microsoft::VisualStudio::Modeling::Shell::DocData, IServiceProvider, Microsoft::VisualStudio::Shell::Interop::IVsHasRelatedSaveItems, Microsoft::VisualStudio::Shell::Interop::IVsTextBufferProvider
[System.CLSCompliant(false)]
public abstract class ModelingDocData : Microsoft.VisualStudio.Modeling.Shell.DocData, IServiceProvider, Microsoft.VisualStudio.Shell.Interop.IVsHasRelatedSaveItems, Microsoft.VisualStudio.Shell.Interop.IVsTextBufferProvider
public abstract class ModelingDocData : Microsoft.VisualStudio.Modeling.Shell.DocData, IServiceProvider, Microsoft.VisualStudio.Shell.Interop.IVsHasRelatedSaveItems, Microsoft.VisualStudio.Shell.Interop.IVsTextBufferProvider
[<System.CLSCompliant(false)>]
type ModelingDocData = class
    inherit DocData
    interface IVsTextBufferProvider
    interface IServiceProvider
    interface IVsHasRelatedSaveItems
type ModelingDocData = class
    inherit DocData
    interface IVsTextBufferProvider
    interface IServiceProvider
    interface IVsHasRelatedSaveItems
Public MustInherit Class ModelingDocData
Inherits DocData
Implements IServiceProvider, IVsHasRelatedSaveItems, IVsTextBufferProvider
Inheritance
ModelingDocData
Attributes
Implements

Constructors

ModelingDocData(IServiceProvider, Guid)

Constructor.

Properties

Cookie

Gets the cookie used to indentify this document in the RDT (running documents table).

(Inherited from DocData)
DocViews

Retrieves the collection of views currently open on this document.

(Inherited from DocData)
Encoding

Gets or sets the encoding that this doc data is persisted in

(Inherited from DocData)
ErrorListProvider

Gets the ErrorListProvider for doc data, which can be used to report error/warning messages to VS Error List window.

FileName

Gets the filename corresponding to this document

(Inherited from DocData)
FormatList

Overriden in derived classes to return a string used to filter the Save As... dialog. Each string should be terminated with a newline (\n) character. The last string in the buffer must be terminated with the newline character as well. The caller can replace each newline character with a NULL (\0) character. Then, the caller can have a string that is the same as the lpstrFilter member of the WinAPI OPENFILENAME structure. The first string in each pair is a display string that describes the filter, such as "Text Only (.txt)". The second string specifies the filter pattern, such as ".txt". To specify multiple filter patterns for a single display string, use a semicolon to separate the patterns: ".htm;.html;.asp". A pattern string can be a combination of valid file name characters and the asterisk () wildcard character. Do not include spaces in the pattern string. The following string is an example of a file pattern string: "HTML File (.htm; .html; .asp)\n.htm;.html;.asp\nText File (.txt)\n.txt\n."

(Inherited from DocData)
HasErrorListItems

True if there're items in the error list for this doc data.

Hierarchy

Gets the hierarchy this document belongs to.

(Inherited from DocData)
InLoad

InLoad.

InReload

InReload.

IsBackupFileObsolete

Is the backup file dirty with respect to this document?

(Inherited from DocData)
IsLoaded

Indicates whether this DocData has been loaded.

(Inherited from DocData)
ItemId

Gets the itemid which identifies this document within its hierarchy.

(Inherited from DocData)
ModelingDocStore

Gets the ModelingDocStore associated with this DocData.

PartitionMapper

The IElementPartitionMapper responsible for mapping elements to the correct partitions of the store owned by this ModelingDocData when ElementGroupPrototypes are reconstituted.

RelatedDocList

Returns the IRelatedDocList which gives access to the collection of DocData's related to this one

RootElement

The Root Element that identifies the portion of the store owned by this DocData. Can be null, if the DocData represents the entire store.

SerializedModel

Return the model in XML format

ServiceProvider (Inherited from DocData)
Store

Gets the Modeling Store associated with this DocData.

UndoManager

Overriden to retrieve the undo manager associated with the ModelingDocStore. This allows ModelingDocData's that share a primary store to also share an undo manager.

UndoManagerIsShared

ModelingDocData provides an undo manager sharing mechanism.

VSUndoManager

Provides access to the VS undo manager interface.

(Inherited from DocData)

Methods

AddErrorListItem(ModelingErrorListItem)

Add an error/warning for this doc data, which will be displayed into the VS Error/List window.

BackupFile(String)

Make a single file backup of this document. Returns whether the document is expected to re-load without data loss. If there are any actual save errors then an exception should be raised.

(Inherited from DocData)
CanSave(Boolean)

Provides derived classes a mechanism to cancel a save operation.

(Inherited from DocData)
CleanupStores()

Cleanup method, called when the DocData must be reloaded.

ClearErrorListItems()

Clear all error/warning messages

Close()

Called by the shell when it wants to close the document.

(Inherited from DocData)
CreateModelingDocStore(Store)

Creates a ModelingDocStore object for the given store. Derived classes may override to customize per-store behaviors.

CreateObject(ILocalRegistry, Guid, Guid)

Creates an object

CreatePartitionMapper()

Factory method to create the partition mapper responsible for mapping elements to the correct partitions of the store owned by this ModelingDocData when ElementGroupPrototypes are reconstituted.

CreateStore()

Create a Store object for a given key.

CreateSubordinateDocData(IServiceProvider)

Create a subordinate doc data instance

DirectoryChanged(String)

Unused.

(Inherited from DocData)
Dispose(Boolean)

Cleans up resources allocated by the doc data. Allows us to pre-empt the GC.

FilesChanged(UInt32, String[], UInt32[])

Notifies clients of changes made to one or more files.

(Inherited from DocData)
FlushUndoManager()

Flushes the Modeling undo manager, in addition to the base behavior.

GetAllElementsForValidation()

Get all elements for validation. The base implementation returns all elements in the store of this DocData.

GetClassID(Guid)

Returns the GUID of our editor factory.

(Inherited from DocData)
GetCurFile(String, UInt32)

Returns the current file name.

(Inherited from DocData)
GetData(Guid, Object)

Implementation of IVsUserData.GetData

(Inherited from DocData)
GetDomainModels()

Derived classes can override this to return a collection of the SubStores types that they request loaded into the store. This list doesnt contain SubStores that providers request loaded into the Store.

GetFormatList(String)

Returns the list of file formats we support so that the shell can display the Save As dialog.

(Inherited from DocData)
GetGuidEditorType(Guid)

Returns the unique identifier of the editor factory that created the IVsPersistDocData object.

(Inherited from DocData)
GetRelatedSaveTreeItems(VSSAVETREEITEM, UInt32, VSSAVETREEITEM[], UInt32)

Standard implementation of IVsHasRelatedSaveItems. If another DocData was registered using the IRelatedDocList interface with this instance, it will potentially be returned as a RelatedSaveTreeItem.

GetService(Type)

Serve up local services to the Store and users of the Stores service provider

GetTextBuffer(IVsTextLines)

Loads the text into the buffer. This method will allocate a VSTextManagerInterop::IVsTextLines will be created and loaded with the model

HandleLoadDocDataException(String, Exception, Boolean)

Called to handle exception thrown during LoadDocData (if any)

(Inherited from DocData)
HandleSaveDocDataException(String, Exception)

Called to handle exception thrown during SaveDocData (if any)

(Inherited from DocData)
HideErrorListItems()

Hide all error/warning messages in VS Error List window.

IgnoreFileChanges(Int32)

IVsDocDataFileChangeControl interface implementation. Allows clients such as SCC to inform the DocData to ignore file changes (in the case a file is reloaded from SCC, for example).

(Inherited from DocData)
Initialize()

Initialize.

Initialize(Store)

Initialize.

InitNew(UInt32)

Initializes a document data class.

(Inherited from DocData)
IsDirty(Int32)

Repeats the functionality provided by IVsPersistDocData2.IsDocDataDirty.

(Inherited from DocData)
IsDocDataDirty(Int32)

Determines whether the document data has changed since the last save.

(Inherited from DocData)
IsDocDataReadOnly(Int32)

Determines if the document data is read-only.

(Inherited from DocData)
IsDocDataReloadable(Int32)

Determines whether or not the document data can be reloaded.

(Inherited from DocData)
IsFlushUndoStackRequiredOnLoad()

Override this method to specify if the undo stack is to be flushed after loading (opening, or creating) the docdata.

Load(String, Boolean)

Overriden by derived classes to load the document.

(Inherited from DocData)
Load(String, UInt32, Int32)

Loads a file.

(Inherited from DocData)
LoadDocData(String)

Loads the document data from a given file name.

(Inherited from DocData)
LoadDocData(String, Boolean)

Loads the document data from a given file name.

LockTextBuffer(Int32)

LockTextBuffer; Currently, there's no code implemented for this method

MarkDocumentChangedForBackup()

Mark that the document has changed and thus a new backup should be created

(Inherited from DocData)
OnDocumentClosed(EventArgs)

When document closed, clear the error list content.

OnDocumentClosing(EventArgs)

Called before the document is closed

(Inherited from DocData)
OnDocumentLoaded(EventArgs)

Called after the document has been initially loaded.

(Inherited from DocData)
OnDocumentLoading(EventArgs)

Called before the document is initially loaded with data.

(Inherited from DocData)
OnDocumentReadOnlyChanged(EventArgs)

Called when the ReadOnly state of the document changes.

(Inherited from DocData)
OnDocumentReloaded(EventArgs)

Called after the document has been reloaded.

(Inherited from DocData)
OnDocumentReloading(EventArgs)

Called before the document is reloaded.

(Inherited from DocData)
OnDocumentSaved(EventArgs)

Called after the document has been saved.

(Inherited from DocData)
OnDocumentSaving(EventArgs)

Called before the document is saved.

(Inherited from DocData)
OnFileNameChanged(EventArgs)

Called when the document's filename changes.

(Inherited from DocData)
OnHierarchyChanged(EventArgs)

When Hierarchy changes, notify the associated ErrorListProvider.

OnRegisterDocData(UInt32, IVsHierarchy, UInt32)

Called by the RDT (running documents table) when it registers the document data.

(Inherited from DocData)
OpenView(Guid, Object)

Called to open a particular view on this DocData.

QueryEditFile()

Helper to perform an SCC QueryEditFiles on the file represented by this DocData.

(Inherited from DocData)
QueryEditFile(String, tagVSQueryEditFlags)

Helper to perform an SCC QueryEditFiles call.

(Inherited from DocData)
QuerySaveFile()

Helper to perform an SCC QuerySaveFiles call on the file represented by this DocData.

(Inherited from DocData)
QuerySaveFile(String, tagVSQuerySaveFlags)

Helper to perform an SCC QuerySaveFiles call.

(Inherited from DocData)
ReloadDocData(UInt32)

Reloads the document data.

(Inherited from DocData)
ReloadDocDataWorker(UInt32)

Overridable implementation for handling ReloadDocData.

(Inherited from DocData)
RenameDocData(UInt32, IVsHierarchy, UInt32, String)

Called by the shell when it wants to rename a document.

(Inherited from DocData)
ResumeErrorListRefresh()

Resumes error list refresh each time an item is added for this doc data. Should be called after SuspendErrorListRefresh, usually right after the last item of a batch has been added.

ResumeFileChangeNotification(String)

Resume file change notifications for the given file.

(Inherited from DocData)
Save(String)

Overriden by derived classes to save the document.

(Inherited from DocData)
Save(String, Int32, UInt32)

Saves a document.

(Inherited from DocData)
SaveCompleted(String)

Called when the save operation is complete.

(Inherited from DocData)
SaveDocData(VSSAVEFLAGS, String, Int32)

Saves the document data to a given location. May need to display the Save As dialog.

(Inherited from DocData)
SaveDocDataToFile(VSSAVEFLAGS, String, Int32, IVsUIShell)

Save as the doc data to a file

(Inherited from DocData)
SaveSubordinateFile(DocData, String)

Save the given document that is subordinate to this document.

(Inherited from DocData)
SetData(Guid, Object)

Implementation of IVsUserData.SetData Called by IVsCodePageSelection.ShowEncodingDialog to return the selected encoding.

(Inherited from DocData)
SetDocDataDirty(Int32)

Sets the dirty flag for the document data.

(Inherited from DocData)
SetDocDataReadOnly(Int32)

Sets the readOnly flag for the document.

(Inherited from DocData)
SetFileName(String)

Called to initialize/change the filename

(Inherited from DocData)
SetHierarchyInfo(IVsHierarchy, UInt32)

Called to initialize/change the hierarchy.

(Inherited from DocData)
SetRootElement(ModelElement)

Set Root Element.

SetTextBuffer(IVsTextLines)

SetTextBuffer; Currently, there's no code implemented for this method

SetUntitledDocPath(String)

Unused.

(Inherited from DocData)
ShowErrorListItems()

Show all error/warning messages in VS Error List window.

ShowSaveOptionsDlg(UInt32, IntPtr, IntPtr)

Implementation of IVsSaveOptionsDlg.ShowSaveOptionsDlg. Display the AdvancedSaveDialog to gather the encoding from the user.

(Inherited from DocData)
SupportsLogicalView(Guid)

override to specify which types of views are supported by this doc data.

SuspendErrorListRefresh()

Prevents the error list from updating synchronously each time an item is added for this doc data. Calling SuspendErrorListRefresh before adding a large number of items to the error list results in better performance.

SuspendFileChangeNotification(String)

Suspend file change notifications for the given file. Helpful to avoid spurious file reload messages for subordinate files.

(Inherited from DocData)

Events

DocumentClosed

Fired after the document is closed

(Inherited from DocData)
DocumentClosing

Fired before the document is closed

(Inherited from DocData)
DocumentLoaded

Fires after the document has been initially loaded.

(Inherited from DocData)
DocumentLoading

Fires before the document is intitially loaded with data.

(Inherited from DocData)
DocumentReadOnlyChanged

Fired when the ReadOnly state of the document changes.

(Inherited from DocData)
DocumentReloaded

Fires after the document has been reloaded.

(Inherited from DocData)
DocumentReloading

Fires before the document is reloaded.

(Inherited from DocData)
DocumentSaved

Fires after the document has been saved.

(Inherited from DocData)
DocumentSaving

Fires before the document is saved.

(Inherited from DocData)
FileNameChanged

Fired when the document's filename changes.

(Inherited from DocData)
HierarchyChanged

Fired when the document's hierarhcy or itemid changes

(Inherited from DocData)

Explicit Interface Implementations

IDisposable.Dispose()

Cleans up resources allocated by the doc data. Allows us to pre-empt the GC.

(Inherited from DocData)
IPersistFileFormat.GetClassID(Guid)

Returns the GUID of our editor factory.

(Inherited from DocData)
IVsFileBackup.BackupFile(String)

Make a single file backup of this document.

(Inherited from DocData)
IVsFileBackup.IsBackupFileObsolete(Int32)

Is the backup file dirty with respect to this document?

(Inherited from DocData)

Applies to