24#include "UtCallback.hpp"
26#include "UtTextDocument.hpp"
76 void SetDeleted(
bool aIsDeleted);
77 bool CheckForFileModifications(
bool aAlwaysFullyReload);
78 void HandleInsert(
int aPosition,
int aLength,
const char* aText);
79 void HandleDelete(
int aPosition,
int aLength);
82 const std::vector<TextSourceView*>&
GetViews()
const {
return mViews; }
83 void EditorClosed(
Editor* aEditorPtr);
87 void ProjectParseUpdated();
89 void SaveWithNotifications();
91 std::string GetFileName();
94 void Replace(
const UtTextRange& aReplaceRange,
const std::string& aText);
95 void Append(
const std::string& aText);
103 void SavePointReached();
104 bool ReadSource(
bool aAlwaysFullyReload =
false);
108 void WaitForSourceModifications();
115 void ApplyModifications(UtTextRange& aRange,
long long aStartSequenceNumber)
const;
117 size_t ApplyModifications(
size_t aPos,
long long aStartSequenceNumber)
const;
119 void ApplyPendingModifications(UtTextRange& aRange, UtTextDocument& aDocument)
const;
121 bool HasAppliedChanges(
long long aSequenceNumber)
const;
134 static void DiffDocuments(
const char* aOld,
const char* aNew, QVector<TextSourceChange>& aChanges);
135 void FindIncludeLocations();
136 void BrowseContainingFolder();
137 void CopyPathToClipboard();
144 void ApplyChangeToQt(
const TextSourceChange& aChange, QTextCursor& aCursor);
145 int GetNextAppliedChange(
long long aSequenceNumber)
const;
146 void InsertText(
size_t aPosition,
size_t aLength,
const char* aText);
147 void DeleteText(
size_t aPosition,
size_t aLength);
149 void ReloadEditor(
Editor& aEditor,
bool aInitialLoad,
bool aForceUnmodified =
false,
bool aForceReload =
false);
151 void SetModified(
bool aModified,
bool aTellQt =
true)
153 if (mModified != aModified)
155 SetModifiedUpdate(aModified, aTellQt);
158 void SetModifiedUpdate(
bool aModified,
bool aTellQt);
160 void NotifyProjectOfChange();
161 void HandleChangeContents(
int aPos,
int aRemovedChars,
int aAddChars);
163 void SyncChangesToSource();
167 ProjectWorkspace* mProjectWorkspacePtr;
177 std::vector<TextSourceChange> mPendingChanges;
180 std::deque<TextSourceChange> mAppliedChanges;
182 int mAppliedChangesBytes;
183 FileSignature mFileSignature;
185 std::vector<TextSourceView*> mViews;
191 static long long sNextSequenceNumber;
192 static long long sObsoleteSequenceNumber;
#define VI_EXPORT
Definition ViExport.hpp:38
void Load(PakI &aBuff, WsfXIO_PlatformPartInfo *&aPtr)
Definition WsfXIO_ObjectInfo.cpp:345
void Save(PakO &aBuff, WsfXIO_PlatformPartInfo *&aPtr)
Definition WsfXIO_ObjectInfo.cpp:352
Definition WsfParseNode.hpp:61
Definition FileSignature.hpp:22
Definition ProjectWorkspace.hpp:48
A WSF 'project'. Manages WSF sources files in a WSF project.
Definition Project.hpp:66
Definition TextSourceView.hpp:23
const std::vector< TextSourceChange > & GetPendingChanges() const
Definition TextSource.hpp:97
void * GetQtDocument() const
Definition TextSource.hpp:84
ProjectWorkspace * GetWorkspace() const
Definition TextSource.hpp:106
bool IsDeleted() const
Definition TextSource.hpp:75
bool IsModified() const
Definition TextSource.hpp:102
static long long GetNextSequenceNumber()
Definition TextSource.hpp:127
int GetFlags() const
Definition TextSource.hpp:109
QTextDocument * GetDocumentAsQTextDocument() const
Definition TextSource.hpp:85
UtCallbackListN< void(TextSource &)> FileModifiedChange
Executes when file's modification state has changed.
Definition TextSource.hpp:100
const std::vector< TextSourceView * > & GetViews() const
Definition TextSource.hpp:82
bool IsCritical() const
Definition TextSource.hpp:111
bool HasPendingChanges() const
Definition TextSource.hpp:122
bool IsLoaded() const
Definition TextSource.hpp:112
FileSignature FileSignatureAtLoad() const
Definition TextSource.hpp:130
void AddedToWorkspace()
Definition TextSource.cpp:72
std::string GetSystemPath() const
Definition TextSource.hpp:92
Flags
Definition TextSource.hpp:57
@ cCRITICAL
Definition TextSource.hpp:59
@ cINCLUDED
Definition TextSource.hpp:58
@ cCRITICAL_MASK
Definition TextSource.hpp:61
static UtCallbackListN< void(TextSource *, size_t, int)> TextSourceCharDeleted
Definition TextSource.hpp:54
friend class wizard::ProjectWorkspace
Definition TextSource.hpp:64
void SetFlags(int aFlags)
Definition TextSource.hpp:110
UtTextDocument * GetSource()
Definition TextSource.cpp:318
TextSource(ProjectWorkspace *aProjectManagerPtr, const UtPath &aSourcePath)
Definition TextSource.cpp:52
static void SetObsoleteSequenceNumber(long long aNumber)
Definition TextSource.hpp:128
Definition TextSourceChange.hpp:24